Merge lp:~mmcm/akiban-server/sql-flatten-expr-subquery into lp:~akiban-technologies/akiban-server/trunk
Proposed by
Mike McMahon
Status: | Merged |
---|---|
Approved by: | Nathan Williams |
Approved revision: | 2732 |
Merged at revision: | 2730 |
Proposed branch: | lp:~mmcm/akiban-server/sql-flatten-expr-subquery |
Merge into: | lp:~akiban-technologies/akiban-server/trunk |
Diff against target: |
109 lines (+44/-36) 4 files modified
src/main/java/com/akiban/sql/optimizer/SubqueryFlattener.java (+40/-36) src/test/resources/com/akiban/sql/optimizer/flatten/README.txt (+2/-0) src/test/resources/com/akiban/sql/optimizer/flatten/select-10.expected (+1/-0) src/test/resources/com/akiban/sql/optimizer/flatten/select-10.sql (+1/-0) |
To merge this branch: | bzr merge lp:~mmcm/akiban-server/sql-flatten-expr-subquery |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nathan Williams | Approve | ||
Review via email: mp+179038@code.launchpad.net |
Description of the change
Fix flattening of comparison with unique expression subquery.
If a subquery is unique (returns at most one row -- this is the basic criterion of flattening), < and < ANY are the same (etc. -- and provided that things are simple enough that UNKNOWN vs. FALSE doesn't matter). The flattener understood this, but dropped the ball at the very end in formulating the new comparison node. Its type comes from the outer comparison, not the inside of the subquery, which will be simply EXPRESSION.
To post a comment you must log in.
Looks good.