Merge lp:~mmcm/akiban-server/query-bindings-cancel into lp:~akiban-technologies/akiban-server/trunk
Status: | Merged |
---|---|
Approved by: | Nathan Williams |
Approved revision: | 2706 |
Merged at revision: | 2703 |
Proposed branch: | lp:~mmcm/akiban-server/query-bindings-cancel |
Merge into: | lp:~akiban-technologies/akiban-server/trunk |
Diff against target: |
601 lines (+266/-33) 20 files modified
src/main/java/com/akiban/qp/operator/Aggregate_Partial.java (+6/-0) src/main/java/com/akiban/qp/operator/AncestorLookup_Default.java (+29/-0) src/main/java/com/akiban/qp/operator/ChainedCursor.java (+6/-0) src/main/java/com/akiban/qp/operator/HKeyUnion_Ordered.java (+7/-0) src/main/java/com/akiban/qp/operator/IndexScan_Default.java (+28/-0) src/main/java/com/akiban/qp/operator/Intersect_Ordered.java (+7/-0) src/main/java/com/akiban/qp/operator/LeafCursor.java (+6/-0) src/main/java/com/akiban/qp/operator/Map_NestedLoops.java (+54/-33) src/main/java/com/akiban/qp/operator/MultipleQueryBindingsCursor.java (+19/-0) src/main/java/com/akiban/qp/operator/Product_NestedLoops.java (+7/-0) src/main/java/com/akiban/qp/operator/QueryBindings.java (+5/-0) src/main/java/com/akiban/qp/operator/QueryBindingsCursor.java (+3/-0) src/main/java/com/akiban/qp/operator/Select_BloomFilter.java (+6/-0) src/main/java/com/akiban/qp/operator/SingletonQueryBindingsCursor.java (+7/-0) src/main/java/com/akiban/qp/operator/SparseArrayQueryBindings.java (+10/-0) src/main/java/com/akiban/qp/operator/UnionAll_Default.java (+8/-0) src/main/java/com/akiban/qp/operator/Union_Ordered.java (+7/-0) src/test/java/com/akiban/qp/operator/QueryBindingsTest.java (+3/-0) src/test/java/com/akiban/server/test/it/qp/Map_NestedLoopsIT.java (+43/-0) src/test/java/com/akiban/server/test/pt/AggregatePT.java (+5/-0) |
To merge this branch: | bzr merge lp:~mmcm/akiban-server/query-bindings-cancel |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nathan Williams | Approve | ||
Review via email: mp+175222@code.launchpad.net |
Description of the change
Enhance query bindings stream to address early close.
When Map output is closed before end-of-stream, it must advance query bindings until the next one at a higher level than the depth it is collapsing. It can do this by actually calling nextBindings(), but that requires upstream operators to continue to process the depth that is actually being skipped. For instance, in the new test added to the Map IT, the 20 and 30 rows would still flow through even after Limit has closed the Map. Also query cancel of, say, a 10-way cross-product would not stop because the level that happened to detect the cancel, which is not likely to be near the leaf, will try to advance.
The new cancelBindings methods advances past the given query bindings. As with open() and close(), trivial operators can assume that their neighbors are taking care of binding complexity and just do like close(), except that they pass along cancel to their input. Operators that do lookahead for pipelining should discard any lookahead state that is under the given bindings.
Looks as expected.