Merge lp:~mmcm/akiban-server/sql-empty-index-range into lp:~akiban-technologies/akiban-server/trunk
Proposed by
Mike McMahon
Status: | Merged |
---|---|
Approved by: | Nathan Williams |
Approved revision: | 2718 |
Merged at revision: | 2719 |
Proposed branch: | lp:~mmcm/akiban-server/sql-empty-index-range |
Merge into: | lp:~akiban-technologies/akiban-server/trunk |
Diff against target: |
59 lines (+15/-0) 5 files modified
src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java (+5/-0) src/main/java/com/akiban/sql/optimizer/rule/cost/PlanCostEstimator.java (+3/-0) src/test/resources/com/akiban/sql/optimizer/rule/operator/README.txt (+2/-0) src/test/resources/com/akiban/sql/optimizer/rule/operator/select-7.expected (+4/-0) src/test/resources/com/akiban/sql/optimizer/rule/operator/select-7.sql (+1/-0) |
To merge this branch: | bzr merge lp:~mmcm/akiban-server/sql-empty-index-range |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nathan Williams | Approve | ||
Review via email: mp+177219@code.launchpad.net |
Description of the change
Properly cost estimate and assemble an empty index scan UNION.
Index range processing merges constant conditions from a disjunction, assemblying the corresponding union of ranges. If each arm of the disjunction is impossible, that is, a contradictory conjunction, then the union is empty. Such contradictions are not always caught earlier. If so, estimate that index scan very cheaply, since it will not do any I/O and assemble it as an empty row set.
To post a comment you must log in.
Looks good.