Merge lp:~mmcm/akiban-server/group-lookup into lp:~akiban-technologies/akiban-server/trunk
- group-lookup
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Nathan Williams |
Approved revision: | 2733 |
Merged at revision: | 2712 |
Proposed branch: | lp:~mmcm/akiban-server/group-lookup |
Merge into: | lp:~akiban-technologies/akiban-server/trunk |
Diff against target: |
3920 lines (+1110/-1031) 119 files modified
src/main/java/com/akiban/qp/operator/API.java (+16/-37) src/main/java/com/akiban/qp/operator/AncestorLookup_Nested.java (+4/-4) src/main/java/com/akiban/qp/operator/GroupLookup_Default.java (+345/-157) src/main/java/com/akiban/qp/operator/IndexScan_Default.java (+1/-0) src/main/java/com/akiban/qp/persistitadapter/OperatorBasedRowCollector.java (+13/-15) src/main/java/com/akiban/server/service/restdml/ModelBuilder.java (+3/-2) src/main/java/com/akiban/server/service/text/FullTextIndexInfo.java (+6/-5) src/main/java/com/akiban/server/store/StoreGIMaintenance.java (+12/-11) src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java (+41/-16) src/main/java/com/akiban/sql/optimizer/rule/PlanGenerator.java (+12/-6) src/test/java/com/akiban/server/service/restdml/DeleteGeneratorIT.java (+4/-4) src/test/java/com/akiban/server/test/it/qp/BranchLookup_DefaultIT.java (+0/-536) src/test/java/com/akiban/server/test/it/qp/GroupLookup_DefaultIT.java (+510/-42) src/test/java/com/akiban/server/test/it/qp/GroupLookup_DefaultLookaheadIT.java (+17/-68) src/test/resources/com/akiban/sql/optimizer/operator/cbo/duplicate-child.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-branch.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-duplicate.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-ordered.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-single-branch.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-1.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-1.t3expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-2.t3expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-1.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-1.t3expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/cbo/three-groups.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/count-3.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/count-3.t3expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/delete-1.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-0.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02a.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02b.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02p.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02r.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-07o.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-10.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-11.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-11.t3expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-14.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15a.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15i.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-3.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-4.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-5.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-6.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-9.expected (+2/-3) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-1.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-3.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-4.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-5.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-6.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-7.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02bt.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02eq.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02ge.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02le.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02lt.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02r.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-03l.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-03m.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07o.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07oo.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07ooo.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-1.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-13.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14p.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14u.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-15d.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17a.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17b.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17bu.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-20.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-20.t3expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-3.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-1.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-1v.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2n.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2v.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-3.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-join.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coia/select-1.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coia/select-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia/select-3.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coia/select-4.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/operator/coia/select-5.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia/select-6.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/coia/select-7.expected (+2/-3) src/test/resources/com/akiban/sql/optimizer/operator/histograms/select-1.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/operator/histograms/select-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02n.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02n.t3expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02s.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02s.t3expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-1.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-2.t3expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/full-text-1.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/full-text-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-1.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-2.t3expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-5.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-5.t3expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10.t3expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10n.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10n.t3expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/select-2.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/select-3.expected (+2/-2) src/test/resources/com/akiban/sql/optimizer/rule/operator/select-5.expected (+1/-1) src/test/resources/com/akiban/sql/optimizer/rule/operator/update-1.expected (+1/-1) src/test/resources/com/akiban/sql/pg/select/explain-2.expected (+1/-1) src/test/resources/com/akiban/sql/pg/yaml/functional/test-statement-cache.yaml (+2/-2) |
To merge this branch: | bzr merge lp:~mmcm/akiban-server/group-lookup |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nathan Williams | Approve | ||
Review via email: mp+176556@code.launchpad.net |
Commit message
Description of the change
Combine AncestorLookup_
The Branch API is somewhat simplified: the combined one is what Ancestor had, namely, an input row type and a collection of output row types. The operator can return any combination of rows that are ancestors or descendants of the input row. Unlike BranchLookup_
The output is filtered by the given row types, even for the branch cases. Someday this filtering might be passed into the storage layer.
A further optimization is that when all descendants are on the same branch, the ordinal of that branchpoint can be added to the lookup hkey, saving having to ignore rows from other branches.
The addition (relative to AncestorLookup) for the pipeline case is actually much more straightforward than for the non-pipeline (usually simpler) case. That is because it's just one more cursor, opened and read at the same time, with just a slightly different rebind hkey and row limit semantics. Whereas doing it in stages means rather more state.
All tests pass locally. I am not 100% confident that everything affected is being tested. For instance, newRowCollector. Any suggestions for what I might have missed would be welcome.
- 2732. By Mike McMahon
-
Missed some log messages.
- 2733. By Mike McMahon
-
Include state in explainer.
Preview Diff
1 | === modified file 'src/main/java/com/akiban/qp/operator/API.java' |
2 | --- src/main/java/com/akiban/qp/operator/API.java 2013-07-19 14:44:52 +0000 |
3 | +++ src/main/java/com/akiban/qp/operator/API.java 2013-07-24 22:52:24 +0000 |
4 | @@ -25,6 +25,7 @@ |
5 | import com.akiban.qp.row.RowBase; |
6 | import com.akiban.qp.rowtype.IndexRowType; |
7 | import com.akiban.qp.rowtype.RowType; |
8 | +import com.akiban.qp.rowtype.Schema; |
9 | import com.akiban.qp.rowtype.UserTableRowType; |
10 | import com.akiban.server.aggregation.AggregatorRegistry; |
11 | import com.akiban.server.aggregation.Aggregators; |
12 | @@ -189,17 +190,13 @@ |
13 | UserTableRowType outputRowType, |
14 | InputPreservationOption flag) |
15 | { |
16 | - return branchLookup_Default(inputOperator, group, inputRowType, outputRowType, flag, NO_LIMIT); |
17 | - } |
18 | - |
19 | - public static Operator branchLookup_Default(Operator inputOperator, |
20 | - Group group, |
21 | - RowType inputRowType, |
22 | - UserTableRowType outputRowType, |
23 | - InputPreservationOption flag, |
24 | - Limit limit) |
25 | - { |
26 | - return new BranchLookup_Default(inputOperator, group, inputRowType, outputRowType, flag, limit); |
27 | + List<UserTableRowType> outputRowTypes = new ArrayList<>(); |
28 | + outputRowTypes.add(outputRowType); |
29 | + Schema schema = (Schema)outputRowType.schema(); |
30 | + for (RowType rowType : schema.descendentTypes(outputRowType, schema.userTableTypes())) { |
31 | + outputRowTypes.add((UserTableRowType)rowType); |
32 | + } |
33 | + return groupLookup_Default(inputOperator, group, inputRowType, outputRowTypes, flag, 1); |
34 | } |
35 | |
36 | /** deprecated */ |
37 | @@ -275,17 +272,17 @@ |
38 | Collection<UserTableRowType> ancestorTypes, |
39 | InputPreservationOption flag) |
40 | { |
41 | - return ancestorLookup_Default(inputOperator, group, rowType, ancestorTypes, flag, 1); |
42 | + return groupLookup_Default(inputOperator, group, rowType, ancestorTypes, flag, 1); |
43 | } |
44 | |
45 | - public static Operator ancestorLookup_Default(Operator inputOperator, |
46 | - Group group, |
47 | - RowType rowType, |
48 | - Collection<UserTableRowType> ancestorTypes, |
49 | - InputPreservationOption flag, |
50 | - int lookaheadQuantum) |
51 | + public static Operator groupLookup_Default(Operator inputOperator, |
52 | + Group group, |
53 | + RowType rowType, |
54 | + Collection<UserTableRowType> ancestorTypes, |
55 | + InputPreservationOption flag, |
56 | + int lookaheadQuantum) |
57 | { |
58 | - return new AncestorLookup_Default(inputOperator, group, rowType, ancestorTypes, flag, lookaheadQuantum); |
59 | + return new GroupLookup_Default(inputOperator, group, rowType, ancestorTypes, flag, lookaheadQuantum); |
60 | } |
61 | |
62 | public static Operator ancestorLookup_Nested(Group group, |
63 | @@ -981,22 +978,4 @@ |
64 | private final List<AkCollator> collators = new ArrayList<>(); |
65 | } |
66 | |
67 | - // Class state |
68 | - |
69 | - private static final Limit NO_LIMIT = new Limit() |
70 | - { |
71 | - |
72 | - @Override |
73 | - public boolean limitReached(RowBase row) |
74 | - { |
75 | - return false; |
76 | - } |
77 | - |
78 | - @Override |
79 | - public String toString() |
80 | - { |
81 | - return "NO LIMIT"; |
82 | - } |
83 | - |
84 | - }; |
85 | } |
86 | |
87 | === modified file 'src/main/java/com/akiban/qp/operator/AncestorLookup_Nested.java' |
88 | --- src/main/java/com/akiban/qp/operator/AncestorLookup_Nested.java 2013-07-17 18:15:10 +0000 |
89 | +++ src/main/java/com/akiban/qp/operator/AncestorLookup_Nested.java 2013-07-24 22:52:24 +0000 |
90 | @@ -44,13 +44,13 @@ |
91 | |
92 | One expected usage is to locate the group row corresponding to an |
93 | index row. For example, an index on customer.name yields index rows |
94 | - which AncestorLookup_Default can then use to locate customer |
95 | + which AncestorLookup_Nested can then use to locate customer |
96 | rows. (The ancestor relationship is reflexive, e.g. customer is |
97 | considered to be an ancestor of customer.) |
98 | |
99 | Another expected usage is to locate ancestors higher in the group. For |
100 | example, given either an item row or an item index row, |
101 | - AncestorLookup_Default can be used to find the corresponding order and |
102 | + AncestorLookup_Nested can be used to find the corresponding order and |
103 | customer. |
104 | |
105 | AncestorLookup_Nested always locates 0-1 row per ancestor type. |
106 | @@ -101,12 +101,12 @@ |
107 | |
108 | <h1>Performance</h1> |
109 | |
110 | - For each input row, AncestorLookup_Default does one random access for |
111 | + For each input row, AncestorLookup_Nested does one random access for |
112 | each ancestor type. |
113 | |
114 | <h1>Memory Requirements</h1> |
115 | |
116 | - AncestorLookup_Default stores in memory up to (ancestorTypes.size() + |
117 | + AncestorLookup_Nested stores in memory up to (ancestorTypes.size() + |
118 | 1) rows. |
119 | |
120 | */ |
121 | |
122 | === renamed file 'src/main/java/com/akiban/qp/operator/AncestorLookup_Default.java' => 'src/main/java/com/akiban/qp/operator/GroupLookup_Default.java' |
123 | --- src/main/java/com/akiban/qp/operator/AncestorLookup_Default.java 2013-07-15 22:01:49 +0000 |
124 | +++ src/main/java/com/akiban/qp/operator/GroupLookup_Default.java 2013-07-24 22:52:24 +0000 |
125 | @@ -35,63 +35,63 @@ |
126 | import org.slf4j.LoggerFactory; |
127 | |
128 | import java.util.*; |
129 | +import static java.lang.Math.min; |
130 | |
131 | /** |
132 | |
133 | <h1>Overview</h1> |
134 | |
135 | - AncestorLookup_Default locates ancestors of both group rows and index rows. |
136 | + GroupLookup_Default locates related group rows of both group rows and index rows. |
137 | |
138 | One expected usage is to locate the group row corresponding to an |
139 | index row. For example, an index on customer.name yields index rows |
140 | - which AncestorLookup_Default can then use to locate customer |
141 | - rows. (The ancestor relationship is reflexive, e.g. customer is |
142 | - considered to be an ancestor of customer.) |
143 | + which GroupLookup_Default can then use to locate customer |
144 | + rows. |
145 | |
146 | Another expected usage is to locate ancestors higher in the group. For |
147 | example, given either an item row or an item index row, |
148 | - AncestorLookup_Default can be used to find the corresponding order and |
149 | + GroupLookup_Default can be used to find the corresponding order and |
150 | customer. |
151 | |
152 | - Unlike BranchLookup, AncestorLookup always locates 0-1 row per ancestor type. |
153 | + Another expected usage is to locate descendants lower in the group. For |
154 | + example, given either an order group row, |
155 | + GroupLookup_Default can be used to find the corresponding items. |
156 | |
157 | <h1>Arguments</h1> |
158 | |
159 | <ul> |
160 | |
161 | - <li><b>GroupTable groupTable:</b> The group table containing the |
162 | - ancestors of interest. |
163 | + <li><b>Group group:</b> The group containing the tables of interest. |
164 | |
165 | - <li><b>RowType rowType:</b> Ancestors will be located for input rows |
166 | + <li><b>RowType inputRowType:</b> Other tables will be located for input rows |
167 | of this type. |
168 | |
169 | - <li><b>Collection<UserTableRowType> ancestorTypes:</b> Ancestor types to be located. |
170 | + <li><b>Collection<UserTableRowType> outputRowTypes:</b> Tables to be located. |
171 | |
172 | <li><b>API.InputPreservationOption flag:</b> Indicates whether rows of type rowType |
173 | will be preserved in the output stream (flag = KEEP_INPUT), or |
174 | discarded (flag = DISCARD_INPUT). |
175 | |
176 | <li><b>int lookaheadQuantum:</b> Number of cursors to try to keep open by looking |
177 | - ahead in input stream, possibly across multiple bindings. |
178 | + ahead in input stream, possibly across multiple outer loops. |
179 | |
180 | </ul> |
181 | |
182 | - rowType may be an index row type or a group row type. For a group row |
183 | - type, rowType must not be one of the ancestorTypes. For an index row |
184 | - type, rowType may be one of the ancestorTypes, and keepInput must be |
185 | - false (this may be relaxed in the future). |
186 | + rowType may be an index row type or a group row type. For an index row |
187 | + type, rowType may be one of the outputRowTypes, and keepInput must be |
188 | + false. |
189 | |
190 | - The groupTable, rowType, and all ancestorTypes must belong to the same |
191 | + The group, inputRowType, and all outputRowTypes must belong to the same |
192 | group. |
193 | |
194 | - Each ancestorType must be an ancestor of the rowType (or, if rowType |
195 | - is an index type, then an ancestor of the index's table's type). |
196 | + Each outputRowType must be an ancestor of the rowType or a descendant of it. |
197 | |
198 | <h1>Behavior</h1> |
199 | |
200 | For each input row, the hkey is obtained. For each ancestor type, the |
201 | - hkey is shortened if necessary, and the groupTable is then search for |
202 | - a record with that exact hkey. All the retrieved records are written |
203 | + hkey is shortened if necessary, and the groupTable is then searched for |
204 | + a record with that exact hkey. For each descendant type, the hkey is lengthened |
205 | + with the ordinal of the shallowest descendant. All the retrieved records are written |
206 | to the output stream in hkey order (ancestors before descendents), as |
207 | is the input row if keepInput is true. |
208 | |
209 | @@ -105,24 +105,24 @@ |
210 | |
211 | <h1>Performance</h1> |
212 | |
213 | - For each input row, AncestorLookup_Default does one random access for |
214 | - each ancestor type. |
215 | + For each input row, GroupLookup_Default does one random access for |
216 | + each ancestor type and one range access if there are any descendant types. |
217 | |
218 | <h1>Memory Requirements</h1> |
219 | |
220 | - AncestorLookup_Default stores in memory up to (ancestorTypes.size() + |
221 | + GroupLookup_Default stores in memory up to (number of ancestors + |
222 | 1) rows. |
223 | |
224 | */ |
225 | |
226 | -class AncestorLookup_Default extends Operator |
227 | +class GroupLookup_Default extends Operator |
228 | { |
229 | // Object interface |
230 | |
231 | @Override |
232 | public String toString() |
233 | { |
234 | - return String.format("%s(%s -> %s)", getClass().getSimpleName(), rowType, ancestors); |
235 | + return String.format("%s(%s -> %s)", getClass().getSimpleName(), inputRowType, outputRowTypes()); |
236 | } |
237 | |
238 | // Operator interface |
239 | @@ -158,111 +158,194 @@ |
240 | return describePlan(inputOperator); |
241 | } |
242 | |
243 | - // AncestorLookup_Default interface |
244 | + // GroupLookup_Default interface |
245 | |
246 | - public AncestorLookup_Default(Operator inputOperator, |
247 | - Group group, |
248 | - RowType rowType, |
249 | - Collection<UserTableRowType> ancestorTypes, |
250 | - API.InputPreservationOption flag, |
251 | - int lookaheadQuantum) |
252 | + public GroupLookup_Default(Operator inputOperator, |
253 | + Group group, |
254 | + RowType inputRowType, |
255 | + Collection<UserTableRowType> outputRowTypes, |
256 | + API.InputPreservationOption flag, |
257 | + int lookaheadQuantum) |
258 | { |
259 | - validateArguments(rowType, ancestorTypes, flag); |
260 | this.inputOperator = inputOperator; |
261 | this.group = group; |
262 | - this.rowType = rowType; |
263 | + this.inputRowType = inputRowType; |
264 | this.keepInput = flag == API.InputPreservationOption.KEEP_INPUT; |
265 | this.lookaheadQuantum = lookaheadQuantum; |
266 | - // Sort ancestor types by depth |
267 | - this.ancestors = new ArrayList<>(ancestorTypes.size()); |
268 | - for (UserTableRowType ancestorType : ancestorTypes) { |
269 | - this.ancestors.add(ancestorType.userTable()); |
270 | - } |
271 | - if (this.ancestors.size() > 1) { |
272 | - Collections.sort(this.ancestors, |
273 | - new Comparator<UserTable>() |
274 | - { |
275 | - @Override |
276 | - public int compare(UserTable x, UserTable y) |
277 | - { |
278 | - return x.getDepth() - y.getDepth(); |
279 | - } |
280 | - }); |
281 | - } |
282 | - } |
283 | - |
284 | - // For use by this class |
285 | |
286 | - private void validateArguments(RowType rowType, Collection<UserTableRowType> ancestorTypes, API.InputPreservationOption flag) |
287 | - { |
288 | - ArgumentValidation.notEmpty("ancestorTypes", ancestorTypes); |
289 | - if (rowType instanceof IndexRowType) { |
290 | + ArgumentValidation.notEmpty("outputRowTypes", outputRowTypes); |
291 | + UserTableRowType tableRowType; |
292 | + if (inputRowType instanceof UserTableRowType) { |
293 | + tableRowType = (UserTableRowType)inputRowType; |
294 | + } else if (inputRowType instanceof IndexRowType) { |
295 | // Keeping index rows not supported |
296 | ArgumentValidation.isTrue("flag == API.InputPreservationOption.DISCARD_INPUT", |
297 | flag == API.InputPreservationOption.DISCARD_INPUT); |
298 | - RowType tableRowType = ((IndexRowType) rowType).tableType(); |
299 | - // Each ancestorType must be an ancestor of rowType. ancestorType = tableRowType is OK only if the input |
300 | - // is from an index. I.e., this operator can be used for an index lookup. |
301 | - for (UserTableRowType ancestorType : ancestorTypes) { |
302 | - ArgumentValidation.isTrue("ancestorType.ancestorOf(tableRowType)", |
303 | - ancestorType.ancestorOf(tableRowType)); |
304 | - ArgumentValidation.isTrue("ancestorType.userTable().getGroup() == tableRowType.userTable().getGroup()", |
305 | - ancestorType.userTable().getGroup() == tableRowType.userTable().getGroup()); |
306 | - } |
307 | - } else if (rowType instanceof UserTableRowType) { |
308 | - // Each ancestorType must be an ancestor of rowType. ancestorType = tableRowType is OK only if the input |
309 | - // is from an index. I.e., this operator can be used for an index lookup. |
310 | - for (RowType ancestorType : ancestorTypes) { |
311 | - ArgumentValidation.isTrue("ancestorType != tableRowType", |
312 | - ancestorType != rowType); |
313 | - ArgumentValidation.isTrue("ancestorType.ancestorOf(tableRowType)", |
314 | - ancestorType.ancestorOf(rowType)); |
315 | - ArgumentValidation.isTrue("ancestorType.userTable().getGroup() == tableRowType.userTable().getGroup()", |
316 | - ancestorType.userTable().getGroup() == rowType.userTable().getGroup()); |
317 | - } |
318 | - } else if (rowType instanceof HKeyRowType) { |
319 | + tableRowType = ((IndexRowType) inputRowType).tableType(); |
320 | + } else if (inputRowType instanceof HKeyRowType) { |
321 | ArgumentValidation.isTrue("flag == API.InputPreservationOption.DISCARD_INPUT", |
322 | flag == API.InputPreservationOption.DISCARD_INPUT); |
323 | - for (UserTableRowType ancestorType : ancestorTypes) { |
324 | - HKeyRowType hKeyRowType = (HKeyRowType) rowType; |
325 | - UserTableRowType tableRowType = ancestorType.schema().userTableRowType(hKeyRowType.hKey().userTable()); |
326 | - ArgumentValidation.isTrue("ancestorType.ancestorOf(tableRowType)", |
327 | - ancestorType.ancestorOf(tableRowType)); |
328 | - ArgumentValidation.isTrue("ancestorType.userTable().getGroup() == tableRowType.userTable().getGroup()", |
329 | - ancestorType.userTable().getGroup() == tableRowType.userTable().getGroup()); |
330 | - } |
331 | + tableRowType = ((Schema) inputRowType.schema()).userTableRowType(((HKeyRowType) inputRowType).hKey().userTable()); |
332 | } else { |
333 | ArgumentValidation.isTrue("invalid rowType", false); |
334 | - } |
335 | + tableRowType = null; |
336 | + } |
337 | + UserTable inputTable = tableRowType.userTable(); |
338 | + this.ancestors = new ArrayList<>(outputRowTypes.size()); |
339 | + List<UserTableRowType> branchOutputRowTypes = null; |
340 | + UserTable branchRoot = null; |
341 | + boolean outputInputTable = false; |
342 | + for (UserTableRowType outputRowType : outputRowTypes) { |
343 | + if (outputRowType == tableRowType) { |
344 | + ArgumentValidation.isTrue("flag == API.InputPreservationOption.DISCARD_INPUT", |
345 | + flag == API.InputPreservationOption.DISCARD_INPUT); |
346 | + outputInputTable = true; |
347 | + } else if (outputRowType.ancestorOf(tableRowType)) { |
348 | + ancestors.add(outputRowType.userTable()); |
349 | + } else if (tableRowType.ancestorOf(outputRowType)) { |
350 | + if (branchOutputRowTypes == null) |
351 | + branchOutputRowTypes = new ArrayList<>(); |
352 | + branchOutputRowTypes.add(outputRowType); |
353 | + if (branchRoot != inputTable) { |
354 | + // Get immediate child of input above desired output. |
355 | + UserTable childTable = outputRowType.userTable(); |
356 | + while (true) { |
357 | + UserTable parentTable = childTable.parentTable(); |
358 | + if (parentTable == inputTable) break; |
359 | + childTable = parentTable; |
360 | + } |
361 | + if (branchRoot != childTable) { |
362 | + if (branchRoot == null) { |
363 | + branchRoot = childTable; |
364 | + } else { |
365 | + branchRoot = inputTable; |
366 | + } |
367 | + } |
368 | + } |
369 | + } else { |
370 | + // The old BranchLookup_Default would allow, say, item |
371 | + // to address, but the optimizer never generates that. |
372 | + ArgumentValidation.isTrue("ancestor or descendant", false); |
373 | + } |
374 | + } |
375 | + if (outputInputTable) { |
376 | + if (branchRoot != inputTable) { |
377 | + ancestors.add(inputTable); |
378 | + } else { |
379 | + branchOutputRowTypes.add(tableRowType); |
380 | + } |
381 | + } |
382 | + if (ancestors.size() > 1) { |
383 | + Collections.sort(ancestors, SORT_TABLE_BY_DEPTH); |
384 | + } |
385 | + if (branchOutputRowTypes == null) { |
386 | + this.branchOutputRowTypes = null; |
387 | + this.branchRootOrdinal = -1; |
388 | + } else { |
389 | + if (branchOutputRowTypes.size() > 1) { |
390 | + Collections.sort(branchOutputRowTypes, SORT_ROWTYPE_BY_DEPTH); |
391 | + } |
392 | + this.branchOutputRowTypes = branchOutputRowTypes; |
393 | + if (branchRoot == inputTable) { |
394 | + this.branchRootOrdinal = -1; |
395 | + } else { |
396 | + this.branchRootOrdinal = ordinal(branchRoot); |
397 | + } |
398 | + } |
399 | + } |
400 | + |
401 | + // For use by this class |
402 | + |
403 | + private static final Comparator<UserTable> SORT_TABLE_BY_DEPTH = |
404 | + new Comparator<UserTable>() |
405 | + { |
406 | + @Override |
407 | + public int compare(UserTable x, UserTable y) |
408 | + { |
409 | + return x.getDepth() - y.getDepth(); |
410 | + } |
411 | + }; |
412 | + private static final Comparator<UserTableRowType> SORT_ROWTYPE_BY_DEPTH = |
413 | + new Comparator<UserTableRowType>() |
414 | + { |
415 | + @Override |
416 | + public int compare(UserTableRowType x, UserTableRowType y) |
417 | + { |
418 | + return x.userTable().getDepth() - y.userTable().getDepth(); |
419 | + } |
420 | + }; |
421 | + |
422 | + private List<UserTableRowType> outputRowTypes() { |
423 | + List<UserTableRowType> types = new ArrayList<>(); |
424 | + for (UserTable table : ancestors) { |
425 | + types.add(((Schema) inputRowType.schema()).userTableRowType(table)); |
426 | + } |
427 | + if (branchOutputRowTypes != null) { |
428 | + types.addAll(branchOutputRowTypes); |
429 | + } |
430 | + return types; |
431 | + } |
432 | + |
433 | + private static UserTable commonAncestor(UserTable inputTable, UserTable outputTable) |
434 | + { |
435 | + int minLevel = min(inputTable.getDepth(), outputTable.getDepth()); |
436 | + UserTable inputAncestor = inputTable; |
437 | + while (inputAncestor.getDepth() > minLevel) { |
438 | + inputAncestor = inputAncestor.parentTable(); |
439 | + } |
440 | + UserTable outputAncestor = outputTable; |
441 | + while (outputAncestor.getDepth() > minLevel) { |
442 | + outputAncestor = outputAncestor.parentTable(); |
443 | + } |
444 | + while (inputAncestor != outputAncestor) { |
445 | + inputAncestor = inputAncestor.parentTable(); |
446 | + outputAncestor = outputAncestor.parentTable(); |
447 | + } |
448 | + return outputAncestor; |
449 | } |
450 | |
451 | // Class state |
452 | |
453 | - private static final Logger LOG = LoggerFactory.getLogger(AncestorLookup_Default.class); |
454 | - private static final InOutTap TAP_OPEN = OPERATOR_TAP.createSubsidiaryTap("operator: AncestorLookup_Default open"); |
455 | - private static final InOutTap TAP_NEXT = OPERATOR_TAP.createSubsidiaryTap("operator: AncestorLookup_Default next"); |
456 | - |
457 | + private static final Logger LOG = LoggerFactory.getLogger(GroupLookup_Default.class); |
458 | + private static final InOutTap TAP_OPEN = OPERATOR_TAP.createSubsidiaryTap("operator: GroupLookup_Default open"); |
459 | + private static final InOutTap TAP_NEXT = OPERATOR_TAP.createSubsidiaryTap("operator: GroupLookup_Default next"); |
460 | + |
461 | // Object state |
462 | |
463 | private final Operator inputOperator; |
464 | private final Group group; |
465 | - private final RowType rowType; |
466 | + private final RowType inputRowType; |
467 | private final List<UserTable> ancestors; |
468 | + private final List<UserTableRowType> branchOutputRowTypes; |
469 | private final boolean keepInput; |
470 | + private final int branchRootOrdinal; |
471 | private final int lookaheadQuantum; |
472 | |
473 | @Override |
474 | public CompoundExplainer getExplainer(ExplainContext context) |
475 | { |
476 | Attributes atts = new Attributes(); |
477 | - for (UserTable table : ancestors) { |
478 | - atts.put(Label.OUTPUT_TYPE, ((Schema)rowType.schema()).userTableRowType(table).getExplainer(context)); |
479 | + for (UserTableRowType outputType : outputRowTypes()) { |
480 | + atts.put(Label.OUTPUT_TYPE, outputType.getExplainer(context)); |
481 | } |
482 | - return new LookUpOperatorExplainer(getName(), atts, rowType, keepInput, inputOperator, context); |
483 | + atts.put(Label.PIPELINE, PrimitiveExplainer.getInstance(lookaheadQuantum)); |
484 | + return new LookUpOperatorExplainer(getName(), atts, inputRowType, keepInput, inputOperator, context); |
485 | } |
486 | |
487 | // Inner classes |
488 | |
489 | + private static enum LookupState |
490 | + { |
491 | + // Just opened or after any branch rows |
492 | + BETWEEN, |
493 | + // Ancestors filled in, any branch not open. |
494 | + ANCESTOR, |
495 | + // Scanning branch rows. |
496 | + BRANCH, |
497 | + // Input ran out. |
498 | + EXHAUSTED |
499 | + } |
500 | + |
501 | private class Execution extends ChainedCursor |
502 | { |
503 | // Cursor interface |
504 | @@ -274,7 +357,7 @@ |
505 | try { |
506 | CursorLifecycle.checkIdle(this); |
507 | input.open(); |
508 | - advance(); |
509 | + lookupState = LookupState.BETWEEN; |
510 | } finally { |
511 | TAP_OPEN.out(); |
512 | } |
513 | @@ -291,12 +374,12 @@ |
514 | CursorLifecycle.checkIdleOrActive(this); |
515 | } |
516 | checkQueryCancelation(); |
517 | - while (pending.isEmpty() && inputRow.isHolding()) { |
518 | + while (pending.isEmpty() && (lookupState != LookupState.EXHAUSTED)) { |
519 | advance(); |
520 | } |
521 | Row row = pending.take(); |
522 | if (LOG_EXECUTION) { |
523 | - LOG.debug("AncestorLookup: {}", row == null ? null : row); |
524 | + LOG.debug("GroupLookup: yield {}", row); |
525 | } |
526 | return row; |
527 | } finally { |
528 | @@ -312,7 +395,8 @@ |
529 | CursorLifecycle.checkIdleOrActive(this); |
530 | if (input.isActive()) { |
531 | input.close(); |
532 | - ancestorRow.release(); |
533 | + lookupCursor.close(); |
534 | + lookupRow.release(); |
535 | pending.clear(); |
536 | } |
537 | } |
538 | @@ -322,6 +406,7 @@ |
539 | { |
540 | close(); |
541 | input.destroy(); |
542 | + lookupCursor.destroy(); |
543 | } |
544 | |
545 | // Execution interface |
546 | @@ -331,17 +416,39 @@ |
547 | super(context, input); |
548 | // Why + 1: Because the input row (whose ancestors get discovered) also goes into pending. |
549 | this.pending = new PendingRows(ancestors.size() + 1); |
550 | - this.ancestorCursor = adapter().newGroupCursor(group); |
551 | + this.lookupCursor = adapter().newGroupCursor(group); |
552 | + if (branchOutputRowTypes != null) { |
553 | + this.lookupRowHKey = adapter().newHKey(inputRowType.hKey()); |
554 | + } |
555 | + else { |
556 | + this.lookupRowHKey = null; |
557 | + } |
558 | } |
559 | |
560 | // For use by this class |
561 | |
562 | private void advance() |
563 | { |
564 | + switch (lookupState) { |
565 | + case BETWEEN: |
566 | + advanceInput(); |
567 | + break; |
568 | + case ANCESTOR: |
569 | + advanceLookup(); |
570 | + break; |
571 | + case BRANCH: |
572 | + advanceBranch(); |
573 | + break; |
574 | + } |
575 | + } |
576 | + |
577 | + private void advanceInput() |
578 | + { |
579 | Row currentRow = input.next(); |
580 | if (currentRow != null) { |
581 | - if (currentRow.rowType() == rowType) { |
582 | + if (currentRow.rowType() == inputRowType) { |
583 | findAncestors(currentRow); |
584 | + lookupState = LookupState.ANCESTOR; |
585 | } |
586 | if (keepInput) { |
587 | pending.add(currentRow); |
588 | @@ -349,6 +456,7 @@ |
589 | inputRow.hold(currentRow); |
590 | } else { |
591 | inputRow.release(); |
592 | + lookupState = LookupState.EXHAUSTED; |
593 | } |
594 | } |
595 | |
596 | @@ -357,8 +465,8 @@ |
597 | assert pending.isEmpty(); |
598 | for (int i = 0; i < ancestors.size(); i++) { |
599 | readAncestorRow(inputRow.ancestorHKey(ancestors.get(i))); |
600 | - if (ancestorRow.isHolding()) { |
601 | - pending.add(ancestorRow.get()); |
602 | + if (lookupRow.isHolding()) { |
603 | + pending.add(lookupRow.get()); |
604 | } |
605 | } |
606 | } |
607 | @@ -366,27 +474,65 @@ |
608 | private void readAncestorRow(HKey hKey) |
609 | { |
610 | try { |
611 | - ancestorCursor.rebind(hKey, false); |
612 | - ancestorCursor.open(); |
613 | - Row retrievedRow = ancestorCursor.next(); |
614 | + lookupCursor.rebind(hKey, false); |
615 | + lookupCursor.open(); |
616 | + Row retrievedRow = lookupCursor.next(); |
617 | if (retrievedRow == null) { |
618 | - ancestorRow.release(); |
619 | + lookupRow.release(); |
620 | } else { |
621 | // Retrieved row might not actually be what we were looking for -- not all ancestors are present, |
622 | // (there are orphan rows). |
623 | - ancestorRow.hold(hKey.equals(retrievedRow.hKey()) ? retrievedRow : null); |
624 | + lookupRow.hold(hKey.equals(retrievedRow.hKey()) ? retrievedRow : null); |
625 | } |
626 | } finally { |
627 | - ancestorCursor.close(); |
628 | + lookupCursor.close(); |
629 | + } |
630 | + } |
631 | + |
632 | + private void advanceLookup() |
633 | + { |
634 | + if (branchOutputRowTypes == null) { |
635 | + lookupState = LookupState.BETWEEN; |
636 | + return; |
637 | + } |
638 | + lookupRow.release(); |
639 | + computeBranchLookupRowHKey(inputRow.get()); |
640 | + lookupCursor.rebind(lookupRowHKey, true); |
641 | + lookupCursor.open(); |
642 | + lookupState = LookupState.BRANCH; |
643 | + } |
644 | + |
645 | + private void computeBranchLookupRowHKey(Row row) |
646 | + { |
647 | + HKey ancestorHKey = row.hKey(); // row.ancestorHKey(commonAncestor); |
648 | + ancestorHKey.copyTo(lookupRowHKey); |
649 | + if (branchRootOrdinal != -1) { |
650 | + lookupRowHKey.extendWithOrdinal(branchRootOrdinal); |
651 | + } |
652 | + } |
653 | + |
654 | + private void advanceBranch() |
655 | + { |
656 | + Row currentLookupRow = lookupCursor.next(); |
657 | + lookupRow.release(); |
658 | + if (currentLookupRow == null) { |
659 | + lookupState = LookupState.BETWEEN; |
660 | + } else if (branchOutputRowTypes.contains(currentLookupRow.rowType())) { |
661 | + lookupRow.hold(currentLookupRow); |
662 | + } |
663 | + if (lookupRow.isHolding()) { |
664 | + pending.add(lookupRow.get()); |
665 | } |
666 | } |
667 | |
668 | // Object state |
669 | |
670 | private final ShareHolder<Row> inputRow = new ShareHolder<>(); |
671 | - private final GroupCursor ancestorCursor; |
672 | - private final ShareHolder<Row> ancestorRow = new ShareHolder<>(); |
673 | + private final GroupCursor lookupCursor; |
674 | + private final ShareHolder<Row> lookupRow = new ShareHolder<>(); |
675 | private final PendingRows pending; |
676 | + private final HKey lookupRowHKey; |
677 | + private LookupState lookupState; |
678 | } |
679 | |
680 | private class LookaheadExecution extends OperatorCursor { |
681 | @@ -398,7 +544,7 @@ |
682 | try { |
683 | CursorLifecycle.checkIdle(this); |
684 | closed = false; |
685 | - ancestorIndex = -1; |
686 | + cursorIndex = 0; |
687 | } finally { |
688 | TAP_OPEN.out(); |
689 | } |
690 | @@ -416,7 +562,6 @@ |
691 | } |
692 | checkQueryCancelation(); |
693 | Row outputRow = null; |
694 | - int nancestors = ancestors.size(); |
695 | while (!closed && outputRow == null) { |
696 | // Get some more input rows, crossing bindings boundaries as |
697 | // necessary, and open cursors for them. |
698 | @@ -444,14 +589,25 @@ |
699 | else { |
700 | inputRows[nextIndex].hold(row); |
701 | if (LOG_EXECUTION) { |
702 | - LOG.debug("AncestorLookup: new input {}", row); |
703 | + LOG.debug("GroupLookup: new input {}", row); |
704 | } |
705 | inputRowBindings[nextIndex] = nextBindings; |
706 | - for (int i = 0; i < nancestors; i++) { |
707 | - int index = nextIndex * nancestors + i; |
708 | - ancestorHKeys[index] = row.ancestorHKey(ancestors.get(i)); |
709 | - ancestorCursors[index].rebind(ancestorHKeys[index], false); |
710 | - ancestorCursors[index].open(); |
711 | + for (int i = 0; i < ncursors; i++) { |
712 | + if (i == keepInputCursorIndex) continue; |
713 | + int index = nextIndex * ncursors + i; |
714 | + boolean deep = false; |
715 | + if (i == branchCursorIndex) { |
716 | + row.hKey().copyTo(lookupHKeys[index]); |
717 | + if (branchRootOrdinal != -1) { |
718 | + lookupHKeys[index].extendWithOrdinal(branchRootOrdinal); |
719 | + } |
720 | + deep = true; |
721 | + } |
722 | + else { |
723 | + lookupHKeys[index] = row.ancestorHKey(ancestors.get(i)); |
724 | + } |
725 | + cursors[index].rebind(lookupHKeys[index], deep); |
726 | + cursors[index].open(); |
727 | } |
728 | nextIndex = (nextIndex + 1) % quantum; |
729 | } |
730 | @@ -463,34 +619,43 @@ |
731 | else if (inputRowBindings[currentIndex] != currentBindings) { |
732 | closed = true; // Row came from another bindings. |
733 | } |
734 | - else if (ancestorIndex < 0) { |
735 | - if (keepInput) { |
736 | - outputRow = inputRows[currentIndex].get(); |
737 | - } |
738 | - ancestorIndex++; |
739 | - } |
740 | - else if (ancestorIndex >= nancestors) { |
741 | + else if (cursorIndex >= ncursors) { |
742 | // Done with this row. |
743 | inputRows[currentIndex].release(); |
744 | inputRowBindings[currentIndex] = null; |
745 | currentIndex = (currentIndex + 1) % quantum; |
746 | - ancestorIndex = -1; |
747 | + cursorIndex = 0; |
748 | + } |
749 | + else if (cursorIndex == keepInputCursorIndex) { |
750 | + outputRow = inputRows[currentIndex].get(); |
751 | + cursorIndex++; |
752 | } |
753 | else { |
754 | - int index = currentIndex * nancestors + ancestorIndex; |
755 | - outputRow = ancestorCursors[index].next(); |
756 | - ancestorCursors[index].close(); |
757 | - if ((outputRow != null) && |
758 | - !ancestorHKeys[index].equals(outputRow.hKey())) { |
759 | - // Not the row we wanted; no matching ancestor. |
760 | - outputRow = null; |
761 | - } |
762 | - ancestorHKeys[index] = null; |
763 | - ancestorIndex++; |
764 | + int index = currentIndex * ncursors + cursorIndex; |
765 | + outputRow = cursors[index].next(); |
766 | + if (cursorIndex == branchCursorIndex) { |
767 | + // Get all matching rows from branch. |
768 | + if (outputRow == null) { |
769 | + cursorIndex++; |
770 | + } |
771 | + else if (!branchOutputRowTypes.contains(outputRow.rowType())) { |
772 | + outputRow = null; |
773 | + } |
774 | + } |
775 | + else { |
776 | + cursors[index].close(); |
777 | + if ((outputRow != null) && |
778 | + !lookupHKeys[index].equals(outputRow.hKey())) { |
779 | + // Not the row we wanted; no matching ancestor. |
780 | + outputRow = null; |
781 | + } |
782 | + lookupHKeys[index] = null; |
783 | + cursorIndex++; |
784 | + } |
785 | } |
786 | } |
787 | if (LOG_EXECUTION) { |
788 | - LOG.debug("AncestorLookup: yield {}", outputRow); |
789 | + LOG.debug("GroupLookup: yield {}", outputRow); |
790 | } |
791 | return outputRow; |
792 | } finally { |
793 | @@ -504,15 +669,15 @@ |
794 | public void close() { |
795 | CursorLifecycle.checkIdleOrActive(this); |
796 | if (!closed) { |
797 | - int nancestors = ancestors.size(); |
798 | // Any rows for the current bindings being closed need to be discarded. |
799 | while (currentBindings == inputRowBindings[currentIndex]) { |
800 | inputRows[currentIndex].release(); |
801 | inputRowBindings[currentIndex] = null; |
802 | - for (int i = 0; i < nancestors; i++) { |
803 | - int index = currentIndex * nancestors + i; |
804 | - ancestorCursors[index].close(); |
805 | - ancestorHKeys[index] = null; |
806 | + for (int i = 0; i < ncursors; i++) { |
807 | + if (i == keepInputCursorIndex) continue; |
808 | + int index = currentIndex * ncursors + i; |
809 | + cursors[index].close(); |
810 | + lookupHKeys[index] = null; |
811 | } |
812 | currentIndex = (currentIndex + 1) % quantum; |
813 | } |
814 | @@ -527,7 +692,7 @@ |
815 | for (ShareHolder<Row> row : inputRows) { |
816 | row.release(); |
817 | } |
818 | - for (GroupCursor ancestorCursor : ancestorCursors) { |
819 | + for (GroupCursor ancestorCursor : cursors) { |
820 | if (ancestorCursor != null) { |
821 | ancestorCursor.destroy(); |
822 | } |
823 | @@ -586,15 +751,15 @@ |
824 | if (!pending.isAncestor(bindings)) break; |
825 | pendingBindings.remove(); |
826 | } |
827 | - int nancestors = ancestors.size(); |
828 | while ((inputRowBindings[currentIndex] != null) && |
829 | inputRowBindings[currentIndex].isAncestor(bindings)) { |
830 | inputRows[currentIndex].release(); |
831 | inputRowBindings[currentIndex] = null; |
832 | - for (int i = 0; i < nancestors; i++) { |
833 | - int index = currentIndex * nancestors + i; |
834 | - ancestorCursors[index].close(); |
835 | - ancestorHKeys[index] = null; |
836 | + for (int i = 0; i < ncursors; i++) { |
837 | + if (i == keepInputCursorIndex) continue; |
838 | + int index = currentIndex * ncursors + i; |
839 | + cursors[index].close(); |
840 | + lookupHKeys[index] = null; |
841 | } |
842 | currentIndex = (currentIndex + 1) % quantum; |
843 | } |
844 | @@ -614,18 +779,40 @@ |
845 | this.input = input; |
846 | this.pendingBindings = new ArrayDeque<>(quantum+1); |
847 | int nancestors = ancestors.size(); |
848 | + int ncursors = nancestors; // Number of actual cursors (for quantum). |
849 | + int nindex = ncursors; // Number of slots. |
850 | + if (keepInput) { |
851 | + this.keepInputCursorIndex = nindex++; |
852 | + } |
853 | + else { |
854 | + this.keepInputCursorIndex = -1; |
855 | + } |
856 | + if (branchOutputRowTypes != null) { |
857 | + this.branchCursorIndex = nindex++; |
858 | + ncursors++; |
859 | + } |
860 | + else { |
861 | + this.branchCursorIndex = -1; |
862 | + } |
863 | // Convert from number of cursors to number of input rows, rounding up. |
864 | - quantum = (quantum + nancestors - 1) / nancestors; |
865 | + quantum = (quantum + ncursors - 1) / ncursors; |
866 | this.quantum = quantum; |
867 | this.inputRows = (ShareHolder<Row>[])new ShareHolder[quantum]; |
868 | this.inputRowBindings = new QueryBindings[quantum]; |
869 | for (int i = 0; i < this.inputRows.length; i++) { |
870 | this.inputRows[i] = new ShareHolder<Row>(); |
871 | } |
872 | - this.ancestorCursors = new GroupCursor[quantum * nancestors]; |
873 | - this.ancestorHKeys = new HKey[quantum * nancestors]; |
874 | - for (int i = 0; i < this.ancestorCursors.length; i++) { |
875 | - this.ancestorCursors[i] = adapter().newGroupCursor(group); |
876 | + this.ncursors = nindex; |
877 | + this.cursors = new GroupCursor[quantum * nindex]; |
878 | + this.lookupHKeys = new HKey[quantum * nindex]; |
879 | + for (int j = 0; j < quantum; j++) { |
880 | + for (int i = 0; i < nindex; i++) { |
881 | + int index = j * nindex + i; |
882 | + if (i != keepInputCursorIndex) |
883 | + this.cursors[index] = adapter().newGroupCursor(group); |
884 | + if (i == branchCursorIndex) |
885 | + this.lookupHKeys[index] = adapter().newHKey(inputRowType.hKey()); |
886 | + } |
887 | } |
888 | } |
889 | |
890 | @@ -650,9 +837,10 @@ |
891 | private final int quantum; |
892 | private final ShareHolder<Row>[] inputRows; |
893 | private final QueryBindings[] inputRowBindings; |
894 | - private final GroupCursor[] ancestorCursors; |
895 | - private final HKey[] ancestorHKeys; |
896 | - private int currentIndex, nextIndex, ancestorIndex; |
897 | + private final int ncursors, keepInputCursorIndex, branchCursorIndex; |
898 | + private final GroupCursor[] cursors; |
899 | + private final HKey[] lookupHKeys; |
900 | + private int currentIndex, nextIndex, cursorIndex; |
901 | private QueryBindings currentBindings, nextBindings; |
902 | private boolean bindingsExhausted, closed = true, newBindings; |
903 | } |
904 | |
905 | === modified file 'src/main/java/com/akiban/qp/operator/IndexScan_Default.java' |
906 | --- src/main/java/com/akiban/qp/operator/IndexScan_Default.java 2013-07-18 18:28:04 +0000 |
907 | +++ src/main/java/com/akiban/qp/operator/IndexScan_Default.java 2013-07-24 22:52:24 +0000 |
908 | @@ -279,6 +279,7 @@ |
909 | for (int i = 0; i < ordering.sortColumns(); i++) { |
910 | atts.put(Label.ORDERING, PrimitiveExplainer.getInstance(ordering.ascending(i) ? "ASC" : "DESC")); |
911 | } |
912 | + atts.put(Label.PIPELINE, PrimitiveExplainer.getInstance(lookaheadQuantum)); |
913 | if (context.hasExtraInfo(this)) |
914 | atts.putAll(context.getExtraInfo(this).get()); |
915 | return new CompoundExplainer(Type.SCAN_OPERATOR, atts); |
916 | |
917 | === modified file 'src/main/java/com/akiban/qp/persistitadapter/OperatorBasedRowCollector.java' |
918 | --- src/main/java/com/akiban/qp/persistitadapter/OperatorBasedRowCollector.java 2013-07-09 21:10:22 +0000 |
919 | +++ src/main/java/com/akiban/qp/persistitadapter/OperatorBasedRowCollector.java 2013-07-24 22:52:24 +0000 |
920 | @@ -274,28 +274,26 @@ |
921 | Operator indexScan = indexScan_Default(indexRowType, |
922 | descending, |
923 | indexKeyRange); |
924 | - plan = branchLookup_Default(indexScan, |
925 | + List<UserTableRowType> outputTypes = ancestorTypes(); |
926 | + outputTypes.add(predicateType); |
927 | + for (RowType rowType : Schema.descendentTypes(predicateType, schema.userTableTypes())) { |
928 | + outputTypes.add((UserTableRowType)rowType); |
929 | + } |
930 | + plan = groupLookup_Default(indexScan, |
931 | group, |
932 | indexRowType, |
933 | - predicateType, |
934 | + outputTypes, |
935 | InputPreservationOption.DISCARD_INPUT, |
936 | - limit); |
937 | + 1); |
938 | } else { |
939 | assert !descending; |
940 | plan = groupScan_Default(group); |
941 | - if (scanLimit != ScanLimit.NONE) { |
942 | - if (scanLimit instanceof FixedCountLimit) { |
943 | - plan = limit_Default(plan, ((FixedCountLimit) scanLimit).getLimit()); |
944 | - } else if (scanLimit instanceof PredicateLimit) { |
945 | - plan = limit_Default(plan, ((PredicateLimit) scanLimit).getLimit()); |
946 | - } |
947 | - } |
948 | } |
949 | - // Fill in ancestors above predicate |
950 | - if (queryRootType != predicateType) { |
951 | - List<UserTableRowType> ancestorTypes = ancestorTypes(); |
952 | - if (!ancestorTypes.isEmpty()) { |
953 | - plan = ancestorLookup_Default(plan, group, predicateType, ancestorTypes, InputPreservationOption.KEEP_INPUT); |
954 | + if (scanLimit != ScanLimit.NONE) { |
955 | + if (scanLimit instanceof FixedCountLimit) { |
956 | + plan = limit_Default(plan, ((FixedCountLimit) scanLimit).getLimit()); |
957 | + } else if (scanLimit instanceof PredicateLimit) { |
958 | + plan = limit_Default(plan, ((PredicateLimit) scanLimit).getLimit()); |
959 | } |
960 | } |
961 | // Get rid of everything above query root table. |
962 | |
963 | === modified file 'src/main/java/com/akiban/server/service/restdml/ModelBuilder.java' |
964 | --- src/main/java/com/akiban/server/service/restdml/ModelBuilder.java 2013-07-09 21:10:22 +0000 |
965 | +++ src/main/java/com/akiban/server/service/restdml/ModelBuilder.java 2013-07-24 22:52:24 +0000 |
966 | @@ -296,7 +296,7 @@ |
967 | UserTable table = ddlFunctions.getUserTable(session, tableName); |
968 | Schema schema = SchemaCache.globalSchema(table.getAIS()); |
969 | IndexRowType indexRowType = schema.indexRowType(table.getPrimaryKey().getIndex()); |
970 | - Operator plan = API.ancestorLookup_Default( |
971 | + Operator plan = API.groupLookup_Default( |
972 | API.indexScan_Default( |
973 | indexRowType, |
974 | true, |
975 | @@ -305,7 +305,8 @@ |
976 | table.getGroup(), |
977 | indexRowType, |
978 | Collections.singleton(schema.userTableRowType(table)), |
979 | - API.InputPreservationOption.DISCARD_INPUT |
980 | + API.InputPreservationOption.DISCARD_INPUT, |
981 | + 1 |
982 | ); |
983 | StoreAdapter adapter = store.createAdapter(session, schema); |
984 | QueryContext queryContext = new SimpleQueryContext(adapter); |
985 | |
986 | === modified file 'src/main/java/com/akiban/server/service/text/FullTextIndexInfo.java' |
987 | --- src/main/java/com/akiban/server/service/text/FullTextIndexInfo.java 2013-04-22 19:01:34 +0000 |
988 | +++ src/main/java/com/akiban/server/service/text/FullTextIndexInfo.java 2013-07-24 22:52:24 +0000 |
989 | @@ -188,11 +188,12 @@ |
990 | if (!ancestors.isEmpty()) |
991 | { |
992 | |
993 | - ret = API.ancestorLookup_Default(ret, |
994 | - group, |
995 | - indexedRowType, |
996 | - ancestors, |
997 | - API.InputPreservationOption.KEEP_INPUT); |
998 | + ret = API.groupLookup_Default(ret, |
999 | + group, |
1000 | + indexedRowType, |
1001 | + ancestors, |
1002 | + API.InputPreservationOption.KEEP_INPUT, |
1003 | + 1); |
1004 | } |
1005 | } |
1006 | else |
1007 | |
1008 | === modified file 'src/main/java/com/akiban/server/store/StoreGIMaintenance.java' |
1009 | --- src/main/java/com/akiban/server/store/StoreGIMaintenance.java 2013-07-09 21:10:22 +0000 |
1010 | +++ src/main/java/com/akiban/server/store/StoreGIMaintenance.java 2013-07-24 22:52:24 +0000 |
1011 | @@ -264,9 +264,8 @@ |
1012 | rowType.userTable(), |
1013 | branchTables.fromRoot().get(0).userTable() |
1014 | ); |
1015 | - plan = API.ancestorLookup_Default(plan, group, rowType, Collections.singleton(parentRowType), API.InputPreservationOption.DISCARD_INPUT); |
1016 | - plan = API.branchLookup_Default(plan, group, parentRowType, rowType, API.InputPreservationOption.DISCARD_INPUT); |
1017 | - plan = API.filter_Default(plan, Collections.singleton(rowType)); |
1018 | + plan = API.groupLookup_Default(plan, group, rowType, Collections.singleton(parentRowType), API.InputPreservationOption.DISCARD_INPUT, 1); |
1019 | + plan = API.groupLookup_Default(plan, group, parentRowType, Collections.singleton(rowType), API.InputPreservationOption.DISCARD_INPUT, 1); |
1020 | return plan; |
1021 | } |
1022 | |
1023 | @@ -307,22 +306,24 @@ |
1024 | } |
1025 | if (!branchTables.leafMost().equals(rowType)) { |
1026 | // the incoming row isn't the leaf, so we have to get its ancestors along the branch |
1027 | - UserTableRowType child = branchTables.childOf(rowType); |
1028 | - plan = API.branchLookup_Default( |
1029 | + List<UserTableRowType> children = branchTables.childrenOf(rowType); |
1030 | + plan = API.groupLookup_Default( |
1031 | plan, |
1032 | groupIndex.getGroup(), |
1033 | rowType, |
1034 | - child, |
1035 | - API.InputPreservationOption.KEEP_INPUT |
1036 | + children, |
1037 | + API.InputPreservationOption.KEEP_INPUT, |
1038 | + 1 |
1039 | ); |
1040 | } |
1041 | if (!branchTables.fromRoot().get(0).equals(rowType)) { |
1042 | - plan = API.ancestorLookup_Default( |
1043 | + plan = API.groupLookup_Default( |
1044 | plan, |
1045 | groupIndex.getGroup(), |
1046 | rowType, |
1047 | ancestors(rowType, branchTables.fromRoot()), |
1048 | - API.InputPreservationOption.KEEP_INPUT |
1049 | + API.InputPreservationOption.KEEP_INPUT, |
1050 | + 1 |
1051 | ); |
1052 | } |
1053 | |
1054 | @@ -424,10 +425,10 @@ |
1055 | return onlyBranch.get(onlyBranch.size()-1); |
1056 | } |
1057 | |
1058 | - public UserTableRowType childOf(UserTableRowType rowType) { |
1059 | + public List<UserTableRowType> childrenOf(UserTableRowType rowType) { |
1060 | int inputDepth = rowType.userTable().getDepth(); |
1061 | int childDepth = inputDepth + 1; |
1062 | - return allTablesForBranch.get(childDepth); |
1063 | + return allTablesForBranch.subList(childDepth, allTablesForBranch.size()); |
1064 | } |
1065 | |
1066 | public UserTableRowType parentRowType(UserTableRowType rowType) { |
1067 | |
1068 | === modified file 'src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java' |
1069 | --- src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java 2013-07-19 18:51:38 +0000 |
1070 | +++ src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java 2013-07-24 22:52:24 +0000 |
1071 | @@ -1434,22 +1434,39 @@ |
1072 | protected RowStream assembleAncestorLookup(AncestorLookup ancestorLookup) { |
1073 | RowStream stream; |
1074 | Group group = ancestorLookup.getDescendant().getGroup(); |
1075 | - List<UserTableRowType> ancestorTypes = |
1076 | + List<UserTableRowType> outputRowTypes = |
1077 | new ArrayList<>(ancestorLookup.getAncestors().size()); |
1078 | for (TableNode table : ancestorLookup.getAncestors()) { |
1079 | - ancestorTypes.add(tableRowType(table)); |
1080 | + outputRowTypes.add(tableRowType(table)); |
1081 | } |
1082 | - if (ancestorLookup.getInput() instanceof GroupLoopScan) { |
1083 | + PlanNode input = ancestorLookup.getInput(); |
1084 | + if (input instanceof GroupLoopScan) { |
1085 | stream = new RowStream(); |
1086 | int rowIndex = lookupNestedBoundRowIndex(((GroupLoopScan)ancestorLookup.getInput())); |
1087 | ColumnExpressionToIndex boundRow = boundRows.get(rowIndex); |
1088 | stream.operator = API.ancestorLookup_Nested(group, |
1089 | boundRow.getRowType(), |
1090 | - ancestorTypes, |
1091 | + outputRowTypes, |
1092 | rowIndex + loopBindingsOffset); |
1093 | } |
1094 | else { |
1095 | - stream = assembleStream(ancestorLookup.getInput()); |
1096 | + BranchLookup branchLookup = null; |
1097 | + if (input instanceof BranchLookup) { |
1098 | + branchLookup = (BranchLookup)input; |
1099 | + if ((branchLookup.getInput() == null) || |
1100 | + (branchLookup.getSource().getGroup() != group)) { |
1101 | + branchLookup = null; |
1102 | + } |
1103 | + } |
1104 | + if (branchLookup != null) { |
1105 | + for (TableSource table : branchLookup.getTables()) { |
1106 | + outputRowTypes.add(tableRowType(table)); |
1107 | + } |
1108 | + stream = assembleStream(branchLookup.getInput()); |
1109 | + stream.unknownTypesPresent = true; |
1110 | + } |
1111 | + else |
1112 | + stream = assembleStream(input); |
1113 | RowType inputRowType = stream.rowType; // The index row type. |
1114 | API.InputPreservationOption flag = API.InputPreservationOption.DISCARD_INPUT; |
1115 | if (!isIndexRowType(inputRowType)) { |
1116 | @@ -1457,12 +1474,12 @@ |
1117 | inputRowType = tableRowType(ancestorLookup.getDescendant()); |
1118 | flag = API.InputPreservationOption.KEEP_INPUT; |
1119 | } |
1120 | - stream.operator = API.ancestorLookup_Default(stream.operator, |
1121 | - group, |
1122 | - inputRowType, |
1123 | - ancestorTypes, |
1124 | - flag, |
1125 | - rulesContext.getPipelineConfiguration().getGroupLookupLookaheadQuantum()); |
1126 | + stream.operator = API.groupLookup_Default(stream.operator, |
1127 | + group, |
1128 | + inputRowType, |
1129 | + outputRowTypes, |
1130 | + flag, |
1131 | + rulesContext.getPipelineConfiguration().getGroupLookupLookaheadQuantum()); |
1132 | } |
1133 | stream.rowType = null; |
1134 | stream.fieldOffsets = null; |
1135 | @@ -1510,11 +1527,19 @@ |
1136 | inputRowType = tableRowType(branchLookup.getSource()); |
1137 | flag = API.InputPreservationOption.KEEP_INPUT; |
1138 | } |
1139 | - stream.operator = API.branchLookup_Default(stream.operator, |
1140 | - group, |
1141 | - inputRowType, |
1142 | - tableRowType(branchLookup.getBranch()), |
1143 | - flag); |
1144 | + List<UserTableRowType> outputRowTypes = |
1145 | + new ArrayList<>(branchLookup.getTables().size()); |
1146 | + if (false) // TODO: Any way to check that this matched? |
1147 | + outputRowTypes.add(tableRowType(branchLookup.getBranch())); |
1148 | + for (TableSource table : branchLookup.getTables()) { |
1149 | + outputRowTypes.add(tableRowType(table)); |
1150 | + } |
1151 | + stream.operator = API.groupLookup_Default(stream.operator, |
1152 | + group, |
1153 | + inputRowType, |
1154 | + outputRowTypes, |
1155 | + flag, |
1156 | + rulesContext.getPipelineConfiguration().getGroupLookupLookaheadQuantum()); |
1157 | } |
1158 | stream.rowType = null; |
1159 | stream.unknownTypesPresent = true; |
1160 | |
1161 | === modified file 'src/main/java/com/akiban/sql/optimizer/rule/PlanGenerator.java' |
1162 | --- src/main/java/com/akiban/sql/optimizer/rule/PlanGenerator.java 2013-04-30 23:01:23 +0000 |
1163 | +++ src/main/java/com/akiban/sql/optimizer/rule/PlanGenerator.java 2013-07-24 22:52:24 +0000 |
1164 | @@ -109,9 +109,14 @@ |
1165 | public static Operator generateBranchPlan (UserTable table, Operator scan, RowType scanType) { |
1166 | final Schema schema = (Schema)scanType.schema(); |
1167 | final UserTableRowType tableType = schema.userTableRowType(table); |
1168 | - Operator plan = API.branchLookup_Default(scan, table.getGroup(), |
1169 | - scanType, tableType, |
1170 | - API.InputPreservationOption.DISCARD_INPUT); |
1171 | + final List<UserTableRowType> tableTypes = new ArrayList<>(); |
1172 | + tableTypes.add(tableType); |
1173 | + for (RowType rowType : Schema.descendentTypes(tableType, schema.userTableTypes())) { |
1174 | + tableTypes.add((UserTableRowType)rowType); |
1175 | + } |
1176 | + Operator plan = API.groupLookup_Default(scan, table.getGroup(), |
1177 | + scanType, tableTypes, |
1178 | + API.InputPreservationOption.DISCARD_INPUT, 1); |
1179 | |
1180 | if (logger.isDebugEnabled()) { |
1181 | DefaultFormatter formatter = new DefaultFormatter(table.getName().getSchemaName()); |
1182 | @@ -120,7 +125,7 @@ |
1183 | } |
1184 | return plan; |
1185 | } |
1186 | - |
1187 | + |
1188 | /** |
1189 | * Scan a table starting with the primary key and return the full data row |
1190 | * Generates a plan like |
1191 | @@ -137,11 +142,12 @@ |
1192 | IndexRowType indexType = schema.indexRowType(table.getPrimaryKeyIncludingInternal().getIndex()); |
1193 | |
1194 | Operator indexScan = generateIndexScan (ais, table); |
1195 | - Operator lookup = API.ancestorLookup_Default(indexScan, |
1196 | + Operator lookup = API.groupLookup_Default(indexScan, |
1197 | table.getGroup(), |
1198 | indexType, |
1199 | ancestorType, |
1200 | - API.InputPreservationOption.DISCARD_INPUT); |
1201 | + API.InputPreservationOption.DISCARD_INPUT, |
1202 | + 1); |
1203 | if (logger.isDebugEnabled()) { |
1204 | DefaultFormatter formatter = new DefaultFormatter(table.getName().getSchemaName()); |
1205 | logger.debug("Ancestor Plan for {}:\n{}", table, |
1206 | |
1207 | === modified file 'src/test/java/com/akiban/server/service/restdml/DeleteGeneratorIT.java' |
1208 | --- src/test/java/com/akiban/server/service/restdml/DeleteGeneratorIT.java 2013-03-22 20:05:57 +0000 |
1209 | +++ src/test/java/com/akiban/server/service/restdml/DeleteGeneratorIT.java 2013-07-24 22:52:24 +0000 |
1210 | @@ -60,7 +60,7 @@ |
1211 | assertEquals( |
1212 | getExplain(delete, table.getSchemaName()), |
1213 | "\n Delete_Returning()\n"+ |
1214 | - " AncestorLookup_Default(Index(c.PRIMARY) -> c)\n"+ |
1215 | + " GroupLookup_Default(Index(c.PRIMARY) -> c)\n"+ |
1216 | " IndexScan_Default(Index(c.PRIMARY), cid = $1)"); |
1217 | } |
1218 | |
1219 | @@ -77,7 +77,7 @@ |
1220 | assertEquals( |
1221 | getExplain(delete, table.getSchemaName()), |
1222 | "\n Delete_Returning()\n"+ |
1223 | - " AncestorLookup_Default(Index(c.PRIMARY) -> c)\n"+ |
1224 | + " GroupLookup_Default(Index(c.PRIMARY) -> c)\n"+ |
1225 | " IndexScan_Default(Index(c.PRIMARY), cid = $1)"); |
1226 | } |
1227 | |
1228 | @@ -95,7 +95,7 @@ |
1229 | assertEquals( |
1230 | getExplain(delete, table.getSchemaName()), |
1231 | "\n Delete_Returning()\n"+ |
1232 | - " AncestorLookup_Default(Index(o.PRIMARY) -> o)\n"+ |
1233 | + " GroupLookup_Default(Index(o.PRIMARY) -> o)\n"+ |
1234 | " IndexScan_Default(Index(o.PRIMARY), cid = $1, oid = $2)"); |
1235 | } |
1236 | |
1237 | @@ -112,7 +112,7 @@ |
1238 | assertEquals ( |
1239 | getExplain(delete, table.getSchemaName()), |
1240 | "\n Delete_Returning()\n"+ |
1241 | - " AncestorLookup_Default(Index(c.PRIMARY) -> c)\n"+ |
1242 | + " GroupLookup_Default(Index(c.PRIMARY) -> c)\n"+ |
1243 | " IndexScan_Default(Index(c.PRIMARY), __akiban_pk = $1)"); |
1244 | } |
1245 | |
1246 | |
1247 | === removed file 'src/test/java/com/akiban/server/test/it/qp/BranchLookup_DefaultIT.java' |
1248 | --- src/test/java/com/akiban/server/test/it/qp/BranchLookup_DefaultIT.java 2013-07-08 18:16:50 +0000 |
1249 | +++ src/test/java/com/akiban/server/test/it/qp/BranchLookup_DefaultIT.java 1970-01-01 00:00:00 +0000 |
1250 | @@ -1,536 +0,0 @@ |
1251 | -/** |
1252 | - * Copyright (C) 2009-2013 Akiban Technologies, Inc. |
1253 | - * |
1254 | - * This program is free software: you can redistribute it and/or modify |
1255 | - * it under the terms of the GNU Affero General Public License as published by |
1256 | - * the Free Software Foundation, either version 3 of the License, or |
1257 | - * (at your option) any later version. |
1258 | - * |
1259 | - * This program is distributed in the hope that it will be useful, |
1260 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1261 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1262 | - * GNU Affero General Public License for more details. |
1263 | - * |
1264 | - * You should have received a copy of the GNU Affero General Public License |
1265 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1266 | - */ |
1267 | - |
1268 | -package com.akiban.server.test.it.qp; |
1269 | - |
1270 | -import com.akiban.qp.expression.IndexBound; |
1271 | -import com.akiban.qp.expression.IndexKeyRange; |
1272 | -import com.akiban.qp.operator.Cursor; |
1273 | -import com.akiban.qp.operator.Operator; |
1274 | -import com.akiban.qp.row.RowBase; |
1275 | -import com.akiban.qp.rowtype.IndexRowType; |
1276 | -import com.akiban.server.api.dml.SetColumnSelector; |
1277 | -import com.akiban.server.api.dml.scan.NewRow; |
1278 | -import org.junit.Before; |
1279 | -import org.junit.Test; |
1280 | - |
1281 | -import java.util.Arrays; |
1282 | -import java.util.Collections; |
1283 | - |
1284 | -import static com.akiban.qp.operator.API.*; |
1285 | - |
1286 | -public class BranchLookup_DefaultIT extends OperatorITBase |
1287 | -{ |
1288 | - @Override |
1289 | - protected void setupPostCreateSchema() { |
1290 | - super.setupPostCreateSchema(); |
1291 | - NewRow[] dbWithOrphans = new NewRow[]{ |
1292 | - createNewRow(customer, 1L, "northbridge"), |
1293 | - createNewRow(customer, 2L, "foundation"), |
1294 | - createNewRow(customer, 4L, "highland"), |
1295 | - createNewRow(address, 1001L, 1L, "111 1111 st"), |
1296 | - createNewRow(address, 1002L, 1L, "111 2222 st"), |
1297 | - createNewRow(address, 2001L, 2L, "222 1111 st"), |
1298 | - createNewRow(address, 2002L, 2L, "222 2222 st"), |
1299 | - createNewRow(address, 4001L, 4L, "444 1111 st"), |
1300 | - createNewRow(address, 4002L, 4L, "444 2222 st"), |
1301 | - createNewRow(order, 11L, 1L, "ori"), |
1302 | - createNewRow(order, 12L, 1L, "david"), |
1303 | - createNewRow(order, 21L, 2L, "tom"), |
1304 | - createNewRow(order, 22L, 2L, "jack"), |
1305 | - createNewRow(order, 31L, 3L, "peter"), |
1306 | - createNewRow(item, 111L, 11L), |
1307 | - createNewRow(item, 112L, 11L), |
1308 | - createNewRow(item, 121L, 12L), |
1309 | - createNewRow(item, 122L, 12L), |
1310 | - createNewRow(item, 211L, 21L), |
1311 | - createNewRow(item, 212L, 21L), |
1312 | - createNewRow(item, 221L, 22L), |
1313 | - createNewRow(item, 222L, 22L), |
1314 | - // orphans |
1315 | - createNewRow(address, 5001L, 5L, "555 1111 st"), |
1316 | - createNewRow(item, 311L, 31L), |
1317 | - createNewRow(item, 312L, 31L)}; |
1318 | - use(dbWithOrphans); |
1319 | - } |
1320 | - |
1321 | - // IllegalArumentException tests |
1322 | - |
1323 | - @Test(expected = IllegalArgumentException.class) |
1324 | - public void testNullInputRowType() |
1325 | - { |
1326 | - branchLookup_Default(groupScan_Default(coi), |
1327 | - coi, |
1328 | - null, |
1329 | - customerRowType, |
1330 | - InputPreservationOption.KEEP_INPUT); |
1331 | - } |
1332 | - |
1333 | - @Test(expected = IllegalArgumentException.class) |
1334 | - public void testNullOutputRowType() |
1335 | - { |
1336 | - branchLookup_Default(groupScan_Default(coi), |
1337 | - coi, |
1338 | - customerRowType, |
1339 | - null, |
1340 | - InputPreservationOption.KEEP_INPUT); |
1341 | - } |
1342 | - |
1343 | - @Test(expected = IllegalArgumentException.class) |
1344 | - public void testLookupSelf() |
1345 | - { |
1346 | - branchLookup_Default(groupScan_Default(coi), |
1347 | - coi, |
1348 | - customerRowType, |
1349 | - customerRowType, |
1350 | - InputPreservationOption.KEEP_INPUT); |
1351 | - } |
1352 | - |
1353 | - @Test |
1354 | - public void testLookupSelfFromIndex() |
1355 | - { |
1356 | - branchLookup_Default(groupScan_Default(coi), |
1357 | - coi, |
1358 | - customerNameIndexRowType, |
1359 | - customerRowType, |
1360 | - InputPreservationOption.DISCARD_INPUT); |
1361 | - } |
1362 | - |
1363 | - @Test(expected = IllegalArgumentException.class) |
1364 | - public void testKeepIndexInput() |
1365 | - { |
1366 | - branchLookup_Default(groupScan_Default(coi), |
1367 | - coi, |
1368 | - customerNameIndexRowType, |
1369 | - customerRowType, |
1370 | - InputPreservationOption.KEEP_INPUT); |
1371 | - } |
1372 | - |
1373 | - @Test(expected = IllegalArgumentException.class) |
1374 | - public void testBranchNonRootLookup() |
1375 | - { |
1376 | - branchLookup_Default(groupScan_Default(coi), |
1377 | - coi, |
1378 | - addressRowType, |
1379 | - itemRowType, |
1380 | - InputPreservationOption.KEEP_INPUT); |
1381 | - } |
1382 | - |
1383 | - @Test |
1384 | - public void testBranchRootLookup() |
1385 | - { |
1386 | - branchLookup_Default(groupScan_Default(coi), |
1387 | - coi, |
1388 | - addressRowType, |
1389 | - orderRowType, |
1390 | - InputPreservationOption.KEEP_INPUT); |
1391 | - } |
1392 | - |
1393 | - // customer index -> customer + descendents |
1394 | - |
1395 | - @Test |
1396 | - public void testCustomerIndexToMissingCustomer() |
1397 | - { |
1398 | - Operator plan = customerNameToCustomerPlan("matrix"); |
1399 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1400 | - RowBase[] expected = new RowBase[]{}; |
1401 | - compareRows(expected, cursor); |
1402 | - } |
1403 | - |
1404 | - @Test |
1405 | - public void testCustomerIndexToCustomer() |
1406 | - { |
1407 | - Operator plan = customerNameToCustomerPlan("northbridge"); |
1408 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1409 | - RowBase[] expected = new RowBase[]{ |
1410 | - row(customerRowType, 1L, "northbridge"), |
1411 | - row(orderRowType, 11L, 1L, "ori"), |
1412 | - row(itemRowType, 111L, 11L), |
1413 | - row(itemRowType, 112L, 11L), |
1414 | - row(orderRowType, 12L, 1L, "david"), |
1415 | - row(itemRowType, 121L, 12L), |
1416 | - row(itemRowType, 122L, 12L), |
1417 | - row(addressRowType, 1001L, 1L, "111 1111 st"), |
1418 | - row(addressRowType, 1002L, 1L, "111 2222 st") |
1419 | - }; |
1420 | - compareRows(expected, cursor); |
1421 | - } |
1422 | - |
1423 | - @Test |
1424 | - public void testCustomerIndexToCustomerWithNoOrders() |
1425 | - { |
1426 | - Operator plan = customerNameToCustomerPlan("highland"); |
1427 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1428 | - RowBase[] expected = new RowBase[]{ |
1429 | - row(customerRowType, 4L, "highland"), |
1430 | - row(addressRowType, 4001L, 4L, "444 1111 st"), |
1431 | - row(addressRowType, 4002L, 4L, "444 2222 st") |
1432 | - }; |
1433 | - compareRows(expected, cursor); |
1434 | - } |
1435 | - |
1436 | - // address index -> customer + descendents |
1437 | - |
1438 | - @Test |
1439 | - public void testAddressIndexToMissingCustomer() |
1440 | - { |
1441 | - Operator plan = addressAddressToCustomerPlan("555 1111 st"); |
1442 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1443 | - RowBase[] expected = new RowBase[]{ |
1444 | - row(addressRowType, 5001L, 5L, "555 1111 st"), |
1445 | - }; |
1446 | - compareRows(expected, cursor); |
1447 | - } |
1448 | - |
1449 | - @Test |
1450 | - public void testAddressIndexToCustomer() |
1451 | - { |
1452 | - Operator plan = addressAddressToCustomerPlan("222 2222 st"); |
1453 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1454 | - RowBase[] expected = new RowBase[]{ |
1455 | - row(customerRowType, 2L, "foundation"), |
1456 | - row(orderRowType, 21L, 2L, "tom"), |
1457 | - row(itemRowType, 211L, 21L), |
1458 | - row(itemRowType, 212L, 21L), |
1459 | - row(orderRowType, 22L, 2L, "jack"), |
1460 | - row(itemRowType, 221L, 22L), |
1461 | - row(itemRowType, 222L, 22L), |
1462 | - row(addressRowType, 2001L, 2L, "222 1111 st"), |
1463 | - row(addressRowType, 2002L, 2L, "222 2222 st") |
1464 | - }; |
1465 | - compareRows(expected, cursor); |
1466 | - } |
1467 | - |
1468 | - // address row -> customer + descendents |
1469 | - |
1470 | - @Test |
1471 | - public void testAddressToMissingCustomer() |
1472 | - { |
1473 | - Operator plan = addressToCustomerPlan("555 1111 st"); |
1474 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1475 | - RowBase[] expected = new RowBase[]{ |
1476 | - row(addressRowType, 5001L, 5L, "555 1111 st"), |
1477 | - }; |
1478 | - compareRows(expected, cursor); |
1479 | - } |
1480 | - |
1481 | - @Test |
1482 | - public void testAddressToCustomer() |
1483 | - { |
1484 | - Operator plan = addressToCustomerPlan("222 2222 st"); |
1485 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1486 | - RowBase[] expected = new RowBase[]{ |
1487 | - row(customerRowType, 2L, "foundation"), |
1488 | - row(orderRowType, 21L, 2L, "tom"), |
1489 | - row(itemRowType, 211L, 21L), |
1490 | - row(itemRowType, 212L, 21L), |
1491 | - row(orderRowType, 22L, 2L, "jack"), |
1492 | - row(itemRowType, 221L, 22L), |
1493 | - row(itemRowType, 222L, 22L), |
1494 | - row(addressRowType, 2001L, 2L, "222 1111 st"), |
1495 | - row(addressRowType, 2002L, 2L, "222 2222 st") |
1496 | - }; |
1497 | - compareRows(expected, cursor); |
1498 | - } |
1499 | - |
1500 | - // address row -> order + descendents |
1501 | - |
1502 | - @Test |
1503 | - public void testAddressToOrder() |
1504 | - { |
1505 | - Operator plan = addressToOrderPlan("222 2222 st", false); |
1506 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1507 | - RowBase[] expected = new RowBase[]{ |
1508 | - row(orderRowType, 21L, 2L, "tom"), |
1509 | - row(itemRowType, 211L, 21L), |
1510 | - row(itemRowType, 212L, 21L), |
1511 | - row(orderRowType, 22L, 2L, "jack"), |
1512 | - row(itemRowType, 221L, 22L), |
1513 | - row(itemRowType, 222L, 22L) |
1514 | - }; |
1515 | - compareRows(expected, cursor); |
1516 | - } |
1517 | - |
1518 | - @Test |
1519 | - public void testAddressToMissingOrder() |
1520 | - { |
1521 | - Operator plan = addressToOrderPlan("444 2222 st", false); |
1522 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1523 | - RowBase[] expected = new RowBase[]{ |
1524 | - }; |
1525 | - compareRows(expected, cursor); |
1526 | - } |
1527 | - |
1528 | - // Ordering of input row relative to branch |
1529 | - |
1530 | - @Test |
1531 | - public void testAddressToOrderAndAddress() |
1532 | - { |
1533 | - Operator plan = addressToOrderPlan("222 2222 st", true); |
1534 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1535 | - RowBase[] expected = new RowBase[]{ |
1536 | - row(orderRowType, 21L, 2L, "tom"), |
1537 | - row(itemRowType, 211L, 21L), |
1538 | - row(itemRowType, 212L, 21L), |
1539 | - row(orderRowType, 22L, 2L, "jack"), |
1540 | - row(itemRowType, 221L, 22L), |
1541 | - row(itemRowType, 222L, 22L), |
1542 | - row(addressRowType, 2002L, 2L, "222 2222 st"), |
1543 | - }; |
1544 | - compareRows(expected, cursor); |
1545 | - } |
1546 | - |
1547 | - @Test |
1548 | - public void testOrderToOrderAndAddress() |
1549 | - { |
1550 | - Operator plan = orderToAddressPlan("tom", true); |
1551 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1552 | - RowBase[] expected = new RowBase[]{ |
1553 | - row(orderRowType, 21L, 2L, "tom"), |
1554 | - row(addressRowType, 2001L, 2L, "222 1111 st"), |
1555 | - row(addressRowType, 2002L, 2L, "222 2222 st") |
1556 | - }; |
1557 | - compareRows(expected, cursor); |
1558 | - } |
1559 | - |
1560 | - @Test |
1561 | - public void testItemToItemAndAddress() |
1562 | - { |
1563 | - Operator plan = itemToAddressPlan(111L, true); |
1564 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1565 | - RowBase[] expected = new RowBase[]{ |
1566 | - row(itemRowType, 111L, 11L), |
1567 | - row(addressRowType, 1001L, 1L, "111 1111 st"), |
1568 | - row(addressRowType, 1002L, 1L, "111 2222 st"), |
1569 | - }; |
1570 | - compareRows(expected, cursor); |
1571 | - } |
1572 | - |
1573 | - @Test |
1574 | - public void testOrderUnionToAddress() |
1575 | - { |
1576 | - Operator orderOrItem = |
1577 | - hKeyUnion_Ordered( |
1578 | - indexScan_Default(orderSalesmanIndexRowType, false, orderSalesmanEQ("ori")), |
1579 | - indexScan_Default(orderSalesmanIndexRowType, false, orderSalesmanEQ("david")), |
1580 | - orderSalesmanIndexRowType, |
1581 | - orderSalesmanIndexRowType, |
1582 | - 2, |
1583 | - 2, |
1584 | - 1, |
1585 | - customerRowType); |
1586 | - Operator plan = |
1587 | - branchLookup_Default( |
1588 | - orderOrItem, |
1589 | - coi, |
1590 | - orderOrItem.rowType(), |
1591 | - addressRowType, |
1592 | - InputPreservationOption.DISCARD_INPUT); |
1593 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1594 | - RowBase[] expected = new RowBase[]{ |
1595 | - row(addressRowType, 1001L, 1L, "111 1111 st"), |
1596 | - row(addressRowType, 1002L, 1L, "111 2222 st"), |
1597 | - }; |
1598 | - compareRows(expected, cursor); |
1599 | - } |
1600 | - |
1601 | - @Test |
1602 | - public void testCursor() |
1603 | - { |
1604 | - Operator plan = |
1605 | - branchLookup_Default( |
1606 | - filter_Default( |
1607 | - groupScan_Default(coi), |
1608 | - Collections.singleton(customerRowType)), |
1609 | - coi, |
1610 | - customerRowType, |
1611 | - addressRowType, |
1612 | - InputPreservationOption.DISCARD_INPUT); |
1613 | - CursorLifecycleTestCase testCase = new CursorLifecycleTestCase() |
1614 | - { |
1615 | - @Override |
1616 | - public RowBase[] firstExpectedRows() |
1617 | - { |
1618 | - return new RowBase[] { |
1619 | - row(addressRowType, 1001L, 1L, "111 1111 st"), |
1620 | - row(addressRowType, 1002L, 1L, "111 2222 st"), |
1621 | - row(addressRowType, 2001L, 2L, "222 1111 st"), |
1622 | - row(addressRowType, 2002L, 2L, "222 2222 st"), |
1623 | - row(addressRowType, 4001L, 4L, "444 1111 st"), |
1624 | - row(addressRowType, 4002L, 4L, "444 2222 st"), |
1625 | - }; |
1626 | - } |
1627 | - }; |
1628 | - testCursorLifecycle(plan, testCase); |
1629 | - } |
1630 | - |
1631 | - @Test |
1632 | - public void testPKAccess() { |
1633 | - Operator plan = |
1634 | - branchLookup_Default( |
1635 | - indexScan_Default(indexType(order, "oid"), false, orderIdEQ(11L)), |
1636 | - coi, |
1637 | - indexType(order, "oid"), |
1638 | - orderRowType, |
1639 | - InputPreservationOption.DISCARD_INPUT); |
1640 | - Cursor cursor = cursor(plan, queryContext, queryBindings); |
1641 | - RowBase[] expected = new RowBase[]{ |
1642 | - row(orderRowType, 11L, 1L, "ori"), |
1643 | - row(itemRowType, 111L, 11L), |
1644 | - row(itemRowType, 112L, 11L), |
1645 | - }; |
1646 | - compareRows(expected, cursor); |
1647 | - } |
1648 | - // For use by this class |
1649 | - |
1650 | - private Operator customerNameToCustomerPlan(String customerName) |
1651 | - { |
1652 | - return |
1653 | - branchLookup_Default( |
1654 | - indexScan_Default(customerNameIndexRowType, false, customerNameEQ(customerName)), |
1655 | - coi, |
1656 | - customerNameIndexRowType, |
1657 | - customerRowType, |
1658 | - InputPreservationOption.DISCARD_INPUT); |
1659 | - } |
1660 | - |
1661 | - private Operator addressAddressToCustomerPlan(String address) |
1662 | - { |
1663 | - return |
1664 | - branchLookup_Default( |
1665 | - indexScan_Default(addressAddressIndexRowType, false, addressAddressEQ(address)), |
1666 | - coi, |
1667 | - addressAddressIndexRowType, |
1668 | - customerRowType, |
1669 | - InputPreservationOption.DISCARD_INPUT); |
1670 | - } |
1671 | - |
1672 | - private Operator addressToCustomerPlan(String address) |
1673 | - { |
1674 | - return |
1675 | - branchLookup_Default( |
1676 | - branchLookup_Default( |
1677 | - indexScan_Default(addressAddressIndexRowType, false, addressAddressEQ(address)), |
1678 | - coi, |
1679 | - addressAddressIndexRowType, |
1680 | - addressRowType, |
1681 | - InputPreservationOption.DISCARD_INPUT), |
1682 | - coi, |
1683 | - addressRowType, |
1684 | - customerRowType, |
1685 | - InputPreservationOption.DISCARD_INPUT); |
1686 | - } |
1687 | - |
1688 | - private Operator addressToOrderPlan(String address, boolean keepInput) |
1689 | - { |
1690 | - return |
1691 | - branchLookup_Default( |
1692 | - ancestorLookup_Default( |
1693 | - indexScan_Default(addressAddressIndexRowType, false, addressAddressEQ(address)), |
1694 | - coi, |
1695 | - addressAddressIndexRowType, |
1696 | - Arrays.asList(addressRowType), |
1697 | - InputPreservationOption.DISCARD_INPUT), |
1698 | - coi, |
1699 | - addressRowType, |
1700 | - orderRowType, |
1701 | - keepInput ? InputPreservationOption.KEEP_INPUT : InputPreservationOption.DISCARD_INPUT); |
1702 | - } |
1703 | - |
1704 | - private Operator orderToAddressPlan(String salesman, boolean keepInput) |
1705 | - { |
1706 | - return |
1707 | - branchLookup_Default( |
1708 | - ancestorLookup_Default( |
1709 | - indexScan_Default(orderSalesmanIndexRowType, false, orderSalesmanEQ(salesman)), |
1710 | - coi, |
1711 | - orderSalesmanIndexRowType, |
1712 | - Arrays.asList(orderRowType), |
1713 | - InputPreservationOption.DISCARD_INPUT), |
1714 | - coi, |
1715 | - orderRowType, |
1716 | - addressRowType, |
1717 | - keepInput ? InputPreservationOption.KEEP_INPUT : InputPreservationOption.DISCARD_INPUT); |
1718 | - } |
1719 | - |
1720 | - private Operator itemToAddressPlan(long iid, boolean keepInput) |
1721 | - { |
1722 | - return |
1723 | - branchLookup_Default( |
1724 | - ancestorLookup_Default( |
1725 | - indexScan_Default(itemIidIndexRowType, false, itemIidEQ(iid)), |
1726 | - coi, |
1727 | - itemIidIndexRowType, |
1728 | - Arrays.asList(itemRowType), |
1729 | - InputPreservationOption.DISCARD_INPUT), |
1730 | - coi, |
1731 | - itemRowType, |
1732 | - addressRowType, |
1733 | - keepInput ? InputPreservationOption.KEEP_INPUT : InputPreservationOption.DISCARD_INPUT); |
1734 | - } |
1735 | - |
1736 | - private IndexKeyRange customerNameEQ(String name) |
1737 | - { |
1738 | - IndexBound bound = customerNameIndexBound(name); |
1739 | - return IndexKeyRange.bounded(customerNameIndexRowType, bound, true, bound, true); |
1740 | - } |
1741 | - |
1742 | - private IndexKeyRange addressAddressEQ(String address) |
1743 | - { |
1744 | - IndexBound bound = addressAddressIndexBound(address); |
1745 | - return IndexKeyRange.bounded(addressAddressIndexRowType, bound, true, bound, true); |
1746 | - } |
1747 | - |
1748 | - private IndexKeyRange orderSalesmanEQ(String salesman) |
1749 | - { |
1750 | - IndexBound bound = orderSalesmanIndexBound(salesman); |
1751 | - return IndexKeyRange.bounded(orderSalesmanIndexRowType, bound, true, bound, true); |
1752 | - } |
1753 | - |
1754 | - private IndexKeyRange orderIdEQ(long oid) |
1755 | - { |
1756 | - IndexRowType indexRowType = indexType(order, "oid"); |
1757 | - IndexBound bound = new IndexBound(row(indexRowType, oid), new SetColumnSelector(0)); |
1758 | - return IndexKeyRange.bounded(indexRowType, bound, true, bound, true); |
1759 | - |
1760 | - } |
1761 | - private IndexKeyRange itemIidEQ(long iid) |
1762 | - { |
1763 | - IndexBound bound = itemIidIndexBound(iid); |
1764 | - return IndexKeyRange.bounded(itemIidIndexRowType, bound, true, bound, true); |
1765 | - } |
1766 | - |
1767 | - private IndexBound customerNameIndexBound(String name) |
1768 | - { |
1769 | - return new IndexBound(row(customerNameIndexRowType, name), new SetColumnSelector(0)); |
1770 | - } |
1771 | - |
1772 | - private IndexBound addressAddressIndexBound(String addr) |
1773 | - { |
1774 | - return new IndexBound(row(addressAddressIndexRowType, addr), new SetColumnSelector(0)); |
1775 | - } |
1776 | - |
1777 | - private IndexBound orderSalesmanIndexBound(String salesman) |
1778 | - { |
1779 | - return new IndexBound(row(orderSalesmanIndexRowType, salesman), new SetColumnSelector(0)); |
1780 | - } |
1781 | - |
1782 | - private IndexBound itemIidIndexBound(long iid) |
1783 | - { |
1784 | - return new IndexBound(row(itemIidIndexRowType, iid), new SetColumnSelector(0)); |
1785 | - } |
1786 | -} |
1787 | |
1788 | === renamed file 'src/test/java/com/akiban/server/test/it/qp/AncestorLookup_DefaultIT.java' => 'src/test/java/com/akiban/server/test/it/qp/GroupLookup_DefaultIT.java' |
1789 | --- src/test/java/com/akiban/server/test/it/qp/AncestorLookup_DefaultIT.java 2013-07-08 18:16:50 +0000 |
1790 | +++ src/test/java/com/akiban/server/test/it/qp/GroupLookup_DefaultIT.java 2013-07-24 22:52:24 +0000 |
1791 | @@ -22,19 +22,24 @@ |
1792 | import com.akiban.qp.operator.Cursor; |
1793 | import com.akiban.qp.operator.Operator; |
1794 | import com.akiban.qp.row.RowBase; |
1795 | +import com.akiban.qp.rowtype.IndexRowType; |
1796 | +import com.akiban.qp.rowtype.RowType; |
1797 | +import com.akiban.qp.rowtype.Schema; |
1798 | import com.akiban.qp.rowtype.UserTableRowType; |
1799 | import com.akiban.server.api.dml.SetColumnSelector; |
1800 | import com.akiban.server.api.dml.scan.NewRow; |
1801 | import org.junit.Before; |
1802 | +import org.junit.Ignore; |
1803 | import org.junit.Test; |
1804 | |
1805 | +import java.util.ArrayList; |
1806 | import java.util.Arrays; |
1807 | import java.util.Collections; |
1808 | import java.util.List; |
1809 | |
1810 | import static com.akiban.qp.operator.API.*; |
1811 | |
1812 | -public class AncestorLookup_DefaultIT extends OperatorITBase |
1813 | +public class GroupLookup_DefaultIT extends OperatorITBase |
1814 | { |
1815 | @Override |
1816 | protected void setupPostCreateSchema() { |
1817 | @@ -42,6 +47,13 @@ |
1818 | NewRow[] dbWithOrphans = new NewRow[]{ |
1819 | createNewRow(customer, 1L, "northbridge"), |
1820 | createNewRow(customer, 2L, "foundation"), |
1821 | + createNewRow(customer, 4L, "highland"), |
1822 | + createNewRow(address, 1001L, 1L, "111 1111 st"), |
1823 | + createNewRow(address, 1002L, 1L, "111 2222 st"), |
1824 | + createNewRow(address, 2001L, 2L, "222 1111 st"), |
1825 | + createNewRow(address, 2002L, 2L, "222 2222 st"), |
1826 | + createNewRow(address, 4001L, 4L, "444 1111 st"), |
1827 | + createNewRow(address, 4002L, 4L, "444 2222 st"), |
1828 | createNewRow(order, 11L, 1L, "ori"), |
1829 | createNewRow(order, 12L, 1L, "david"), |
1830 | createNewRow(order, 21L, 2L, "tom"), |
1831 | @@ -56,51 +68,71 @@ |
1832 | createNewRow(item, 221L, 22L), |
1833 | createNewRow(item, 222L, 22L), |
1834 | // orphans |
1835 | + createNewRow(address, 5001L, 5L, "555 1111 st"), |
1836 | createNewRow(item, 311L, 31L), |
1837 | createNewRow(item, 312L, 31L)}; |
1838 | use(dbWithOrphans); |
1839 | } |
1840 | |
1841 | + protected int lookaheadQuantum() { |
1842 | + return 1; |
1843 | + } |
1844 | + |
1845 | // IllegalArumentException tests |
1846 | |
1847 | @Test(expected = IllegalArgumentException.class) |
1848 | public void testAtLeastOneAncestor() |
1849 | { |
1850 | - ancestorLookup_Default(groupScan_Default(coi), |
1851 | - coi, |
1852 | - customerRowType, |
1853 | - list(), |
1854 | - InputPreservationOption.KEEP_INPUT); |
1855 | - } |
1856 | - |
1857 | - @Test(expected = IllegalArgumentException.class) |
1858 | - public void testDescendentIsNotAncestor() |
1859 | - { |
1860 | - ancestorLookup_Default(groupScan_Default(coi), |
1861 | - coi, |
1862 | - customerRowType, |
1863 | - list(itemRowType), |
1864 | - InputPreservationOption.KEEP_INPUT); |
1865 | - } |
1866 | - |
1867 | - @Test(expected = IllegalArgumentException.class) |
1868 | - public void testSelfIsNotAncestor() |
1869 | - { |
1870 | - ancestorLookup_Default(groupScan_Default(coi), |
1871 | - coi, |
1872 | - customerRowType, |
1873 | - list(customerRowType), |
1874 | - InputPreservationOption.KEEP_INPUT); |
1875 | + groupLookup_Default(groupScan_Default(coi), |
1876 | + coi, |
1877 | + customerRowType, |
1878 | + list(), |
1879 | + InputPreservationOption.KEEP_INPUT, |
1880 | + lookaheadQuantum()); |
1881 | + } |
1882 | + |
1883 | + @Test(expected = IllegalArgumentException.class) |
1884 | + public void testKeepInputSelf() |
1885 | + { |
1886 | + groupLookup_Default(groupScan_Default(coi), |
1887 | + coi, |
1888 | + customerRowType, |
1889 | + list(customerRowType), |
1890 | + InputPreservationOption.KEEP_INPUT, |
1891 | + lookaheadQuantum()); |
1892 | } |
1893 | |
1894 | @Test(expected = IllegalArgumentException.class) |
1895 | public void testKeepIndexInput() |
1896 | { |
1897 | - ancestorLookup_Default(groupScan_Default(coi), |
1898 | - coi, |
1899 | - customerNameIndexRowType, |
1900 | - list(customerRowType), |
1901 | - InputPreservationOption.KEEP_INPUT); |
1902 | + groupLookup_Default(groupScan_Default(coi), |
1903 | + coi, |
1904 | + customerNameIndexRowType, |
1905 | + list(customerRowType), |
1906 | + InputPreservationOption.KEEP_INPUT, |
1907 | + lookaheadQuantum()); |
1908 | + } |
1909 | + |
1910 | + @Test(expected = IllegalArgumentException.class) |
1911 | + public void testBranchNonRootLookup() |
1912 | + { |
1913 | + groupLookup_Default(groupScan_Default(coi), |
1914 | + coi, |
1915 | + addressRowType, |
1916 | + list(itemRowType), |
1917 | + InputPreservationOption.KEEP_INPUT, |
1918 | + lookaheadQuantum()); |
1919 | + } |
1920 | + |
1921 | + @Test(expected = IllegalArgumentException.class) |
1922 | + public void testBranchRootLookup() |
1923 | + { |
1924 | + groupLookup_Default(groupScan_Default(coi), |
1925 | + coi, |
1926 | + addressRowType, |
1927 | + list(orderRowType, itemRowType), |
1928 | + InputPreservationOption.KEEP_INPUT, |
1929 | + lookaheadQuantum()); |
1930 | } |
1931 | |
1932 | // Test ancestor lookup given index row |
1933 | @@ -334,18 +366,292 @@ |
1934 | compareRows(expected, cursor(plan, queryContext, queryBindings)); |
1935 | } |
1936 | |
1937 | + // customer index -> customer + descendents |
1938 | + |
1939 | + @Test |
1940 | + public void testCustomerIndexToMissingCustomer() |
1941 | + { |
1942 | + Operator plan = customerNameToCustomerPlan("matrix"); |
1943 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
1944 | + RowBase[] expected = new RowBase[]{}; |
1945 | + compareRows(expected, cursor); |
1946 | + } |
1947 | + |
1948 | + @Test |
1949 | + public void testCustomerIndexToCustomer() |
1950 | + { |
1951 | + Operator plan = customerNameToCustomerPlan("northbridge"); |
1952 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
1953 | + RowBase[] expected = new RowBase[]{ |
1954 | + row(customerRowType, 1L, "northbridge"), |
1955 | + row(orderRowType, 11L, 1L, "ori"), |
1956 | + row(itemRowType, 111L, 11L), |
1957 | + row(itemRowType, 112L, 11L), |
1958 | + row(orderRowType, 12L, 1L, "david"), |
1959 | + row(itemRowType, 121L, 12L), |
1960 | + row(itemRowType, 122L, 12L), |
1961 | + row(addressRowType, 1001L, 1L, "111 1111 st"), |
1962 | + row(addressRowType, 1002L, 1L, "111 2222 st") |
1963 | + }; |
1964 | + compareRows(expected, cursor); |
1965 | + } |
1966 | + |
1967 | + @Test |
1968 | + public void testCustomerIndexToCustomerWithNoOrders() |
1969 | + { |
1970 | + Operator plan = customerNameToCustomerPlan("highland"); |
1971 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
1972 | + RowBase[] expected = new RowBase[]{ |
1973 | + row(customerRowType, 4L, "highland"), |
1974 | + row(addressRowType, 4001L, 4L, "444 1111 st"), |
1975 | + row(addressRowType, 4002L, 4L, "444 2222 st") |
1976 | + }; |
1977 | + compareRows(expected, cursor); |
1978 | + } |
1979 | + |
1980 | + // address index -> customer + descendents |
1981 | + // MOSTLY IGNORE since not supported by GroupLookup_Default currently. |
1982 | + |
1983 | + @Test @Ignore |
1984 | + public void testAddressIndexToMissingCustomer() |
1985 | + { |
1986 | + Operator plan = addressAddressToCustomerPlan("555 1111 st"); |
1987 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
1988 | + RowBase[] expected = new RowBase[]{ |
1989 | + row(addressRowType, 5001L, 5L, "555 1111 st"), |
1990 | + }; |
1991 | + compareRows(expected, cursor); |
1992 | + } |
1993 | + |
1994 | + @Test @Ignore |
1995 | + public void testAddressIndexToCustomer() |
1996 | + { |
1997 | + Operator plan = addressAddressToCustomerPlan("222 2222 st"); |
1998 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
1999 | + RowBase[] expected = new RowBase[]{ |
2000 | + row(customerRowType, 2L, "foundation"), |
2001 | + row(orderRowType, 21L, 2L, "tom"), |
2002 | + row(itemRowType, 211L, 21L), |
2003 | + row(itemRowType, 212L, 21L), |
2004 | + row(orderRowType, 22L, 2L, "jack"), |
2005 | + row(itemRowType, 221L, 22L), |
2006 | + row(itemRowType, 222L, 22L), |
2007 | + row(addressRowType, 2001L, 2L, "222 1111 st"), |
2008 | + row(addressRowType, 2002L, 2L, "222 2222 st") |
2009 | + }; |
2010 | + compareRows(expected, cursor); |
2011 | + } |
2012 | + |
2013 | + // address row -> customer + descendents |
2014 | + |
2015 | + @Test @Ignore |
2016 | + public void testAddressToMissingCustomer() |
2017 | + { |
2018 | + Operator plan = addressToCustomerPlan("555 1111 st"); |
2019 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2020 | + RowBase[] expected = new RowBase[]{ |
2021 | + row(addressRowType, 5001L, 5L, "555 1111 st"), |
2022 | + }; |
2023 | + compareRows(expected, cursor); |
2024 | + } |
2025 | + |
2026 | + @Test @Ignore |
2027 | + public void testAddressToCustomer() |
2028 | + { |
2029 | + Operator plan = addressToCustomerPlan("222 2222 st"); |
2030 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2031 | + RowBase[] expected = new RowBase[]{ |
2032 | + row(customerRowType, 2L, "foundation"), |
2033 | + row(orderRowType, 21L, 2L, "tom"), |
2034 | + row(itemRowType, 211L, 21L), |
2035 | + row(itemRowType, 212L, 21L), |
2036 | + row(orderRowType, 22L, 2L, "jack"), |
2037 | + row(itemRowType, 221L, 22L), |
2038 | + row(itemRowType, 222L, 22L), |
2039 | + row(addressRowType, 2001L, 2L, "222 1111 st"), |
2040 | + row(addressRowType, 2002L, 2L, "222 2222 st") |
2041 | + }; |
2042 | + compareRows(expected, cursor); |
2043 | + } |
2044 | + |
2045 | + // address row -> order + descendents |
2046 | + |
2047 | + @Test @Ignore |
2048 | + public void testAddressToOrder() |
2049 | + { |
2050 | + Operator plan = addressToOrderPlan("222 2222 st", false); |
2051 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2052 | + RowBase[] expected = new RowBase[]{ |
2053 | + row(orderRowType, 21L, 2L, "tom"), |
2054 | + row(itemRowType, 211L, 21L), |
2055 | + row(itemRowType, 212L, 21L), |
2056 | + row(orderRowType, 22L, 2L, "jack"), |
2057 | + row(itemRowType, 221L, 22L), |
2058 | + row(itemRowType, 222L, 22L) |
2059 | + }; |
2060 | + compareRows(expected, cursor); |
2061 | + } |
2062 | + |
2063 | + @Test @Ignore |
2064 | + public void testAddressToMissingOrder() |
2065 | + { |
2066 | + Operator plan = addressToOrderPlan("444 2222 st", false); |
2067 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2068 | + RowBase[] expected = new RowBase[]{ |
2069 | + }; |
2070 | + compareRows(expected, cursor); |
2071 | + } |
2072 | + |
2073 | + // Ordering of input row relative to branch |
2074 | + |
2075 | + @Test @Ignore |
2076 | + public void testAddressToOrderAndAddress() |
2077 | + { |
2078 | + Operator plan = addressToOrderPlan("222 2222 st", true); |
2079 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2080 | + RowBase[] expected = new RowBase[]{ |
2081 | + row(orderRowType, 21L, 2L, "tom"), |
2082 | + row(itemRowType, 211L, 21L), |
2083 | + row(itemRowType, 212L, 21L), |
2084 | + row(orderRowType, 22L, 2L, "jack"), |
2085 | + row(itemRowType, 221L, 22L), |
2086 | + row(itemRowType, 222L, 22L), |
2087 | + row(addressRowType, 2002L, 2L, "222 2222 st"), |
2088 | + }; |
2089 | + compareRows(expected, cursor); |
2090 | + } |
2091 | + |
2092 | + @Test @Ignore |
2093 | + public void testOrderToOrderAndAddress() |
2094 | + { |
2095 | + Operator plan = orderToAddressPlan("tom", true); |
2096 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2097 | + RowBase[] expected = new RowBase[]{ |
2098 | + row(orderRowType, 21L, 2L, "tom"), |
2099 | + row(addressRowType, 2001L, 2L, "222 1111 st"), |
2100 | + row(addressRowType, 2002L, 2L, "222 2222 st") |
2101 | + }; |
2102 | + compareRows(expected, cursor); |
2103 | + } |
2104 | + |
2105 | + @Test @Ignore |
2106 | + public void testItemToItemAndAddress() |
2107 | + { |
2108 | + Operator plan = itemToAddressPlan(111L, true); |
2109 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2110 | + RowBase[] expected = new RowBase[]{ |
2111 | + row(itemRowType, 111L, 11L), |
2112 | + row(addressRowType, 1001L, 1L, "111 1111 st"), |
2113 | + row(addressRowType, 1002L, 1L, "111 2222 st"), |
2114 | + }; |
2115 | + compareRows(expected, cursor); |
2116 | + } |
2117 | + |
2118 | + @Test |
2119 | + public void testOrderToOrderAndCustomerAndItems() |
2120 | + { |
2121 | + Operator plan = |
2122 | + groupLookup_Default( |
2123 | + indexScan_Default(orderSalesmanIndexRowType, false, orderSalesmanEQ("ori")), |
2124 | + coi, |
2125 | + orderSalesmanIndexRowType, |
2126 | + list(orderRowType, customerRowType, itemRowType), |
2127 | + InputPreservationOption.DISCARD_INPUT, |
2128 | + lookaheadQuantum()); |
2129 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2130 | + RowBase[] expected = new RowBase[]{ |
2131 | + row(customerRowType, 1L, "northbridge"), |
2132 | + row(orderRowType, 11L, 1L, "ori"), |
2133 | + row(itemRowType, 111L, 11L), |
2134 | + row(itemRowType, 112L, 11L), |
2135 | + }; |
2136 | + compareRows(expected, cursor); |
2137 | + } |
2138 | + |
2139 | + @Test |
2140 | + public void testCustomerToOrderOnly() |
2141 | + { |
2142 | + Operator plan = |
2143 | + groupLookup_Default( |
2144 | + indexScan_Default(customerNameIndexRowType, false, customerNameEQ("foundation")), |
2145 | + coi, |
2146 | + customerNameIndexRowType, |
2147 | + list(orderRowType), |
2148 | + InputPreservationOption.DISCARD_INPUT, |
2149 | + lookaheadQuantum()); |
2150 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2151 | + RowBase[] expected = new RowBase[]{ |
2152 | + row(orderRowType, 21L, 2L, "tom"), |
2153 | + row(orderRowType, 22L, 2L, "jack"), |
2154 | + }; |
2155 | + compareRows(expected, cursor); |
2156 | + } |
2157 | + |
2158 | + @Test |
2159 | + public void testOrderUnionToOrder() |
2160 | + { |
2161 | + Operator orderOrItem = |
2162 | + hKeyUnion_Ordered( |
2163 | + indexScan_Default(orderSalesmanIndexRowType, false, orderSalesmanEQ("ori")), |
2164 | + indexScan_Default(orderSalesmanIndexRowType, false, orderSalesmanEQ("david")), |
2165 | + orderSalesmanIndexRowType, |
2166 | + orderSalesmanIndexRowType, |
2167 | + 2, |
2168 | + 2, |
2169 | + 1, |
2170 | + customerRowType); |
2171 | + Operator plan = |
2172 | + groupLookup_Default( |
2173 | + orderOrItem, |
2174 | + coi, |
2175 | + orderOrItem.rowType(), |
2176 | + descendants(orderRowType), |
2177 | + InputPreservationOption.DISCARD_INPUT, |
2178 | + lookaheadQuantum()); |
2179 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2180 | + RowBase[] expected = new RowBase[]{ |
2181 | + row(orderRowType, 11L, 1L, "ori"), |
2182 | + row(itemRowType, 111L, 11L), |
2183 | + row(itemRowType, 112L, 11L), |
2184 | + row(orderRowType, 12L, 1L, "david"), |
2185 | + row(itemRowType, 121L, 12L), |
2186 | + row(itemRowType, 122L, 12L), |
2187 | + }; |
2188 | + compareRows(expected, cursor); |
2189 | + } |
2190 | + |
2191 | + @Test |
2192 | + public void testPKAccess() { |
2193 | + Operator plan = |
2194 | + groupLookup_Default( |
2195 | + indexScan_Default(indexType(order, "oid"), false, orderIdEQ(11L)), |
2196 | + coi, |
2197 | + indexType(order, "oid"), |
2198 | + descendants(orderRowType), |
2199 | + InputPreservationOption.DISCARD_INPUT, |
2200 | + lookaheadQuantum()); |
2201 | + Cursor cursor = cursor(plan, queryContext, queryBindings); |
2202 | + RowBase[] expected = new RowBase[]{ |
2203 | + row(orderRowType, 11L, 1L, "ori"), |
2204 | + row(itemRowType, 111L, 11L), |
2205 | + row(itemRowType, 112L, 11L), |
2206 | + }; |
2207 | + compareRows(expected, cursor); |
2208 | + } |
2209 | + |
2210 | @Test |
2211 | public void testCursor() |
2212 | { |
2213 | Operator plan = |
2214 | - ancestorLookup_Default( |
2215 | + groupLookup_Default( |
2216 | filter_Default( |
2217 | groupScan_Default(coi), |
2218 | Collections.singleton(orderRowType)), |
2219 | coi, |
2220 | orderRowType, |
2221 | Collections.singleton(customerRowType), |
2222 | - InputPreservationOption.DISCARD_INPUT); |
2223 | + InputPreservationOption.DISCARD_INPUT, |
2224 | + lookaheadQuantum()); |
2225 | CursorLifecycleTestCase testCase = new CursorLifecycleTestCase() |
2226 | { |
2227 | @Override |
2228 | @@ -358,6 +664,11 @@ |
2229 | row(customerRowType, 2L, "foundation"), |
2230 | }; |
2231 | } |
2232 | + |
2233 | + @Override |
2234 | + public boolean reopenTopLevel() { |
2235 | + return (lookaheadQuantum() > 1); |
2236 | + } |
2237 | }; |
2238 | testCursorLifecycle(plan, testCase); |
2239 | } |
2240 | @@ -367,28 +678,31 @@ |
2241 | private Operator indexRowToAncestorPlan(int iid, UserTableRowType ... rowTypes) |
2242 | { |
2243 | return |
2244 | - ancestorLookup_Default |
2245 | + groupLookup_Default |
2246 | (indexScan_Default(itemIidIndexRowType, false, itemIidEQ(iid)), |
2247 | coi, |
2248 | itemIidIndexRowType, |
2249 | list(rowTypes), |
2250 | - InputPreservationOption.DISCARD_INPUT); |
2251 | + InputPreservationOption.DISCARD_INPUT, |
2252 | + lookaheadQuantum()); |
2253 | } |
2254 | |
2255 | private Operator groupRowToAncestorPlan(int iid, boolean keepInput, UserTableRowType ... rowTypes) |
2256 | { |
2257 | return |
2258 | - ancestorLookup_Default |
2259 | - (branchLookup_Default |
2260 | + groupLookup_Default |
2261 | + (groupLookup_Default |
2262 | (indexScan_Default(itemIidIndexRowType, false, itemIidEQ(iid)), |
2263 | coi, |
2264 | itemIidIndexRowType, |
2265 | - itemRowType, |
2266 | - InputPreservationOption.DISCARD_INPUT), |
2267 | + list(itemRowType), |
2268 | + InputPreservationOption.DISCARD_INPUT, |
2269 | + lookaheadQuantum()), |
2270 | coi, |
2271 | itemRowType, |
2272 | list(rowTypes), |
2273 | - keepInput ? InputPreservationOption.KEEP_INPUT : InputPreservationOption.DISCARD_INPUT); |
2274 | + keepInput ? InputPreservationOption.KEEP_INPUT : InputPreservationOption.DISCARD_INPUT, |
2275 | + lookaheadQuantum()); |
2276 | } |
2277 | |
2278 | private Operator orderHKeyToCustomerAndOrderPlan(String salesman) |
2279 | @@ -403,12 +717,105 @@ |
2280 | 2, |
2281 | orderRowType); |
2282 | return |
2283 | - ancestorLookup_Default( |
2284 | + groupLookup_Default( |
2285 | indexMerge, |
2286 | coi, |
2287 | indexMerge.rowType(), |
2288 | Arrays.asList(customerRowType, orderRowType), |
2289 | - InputPreservationOption.DISCARD_INPUT); |
2290 | + InputPreservationOption.DISCARD_INPUT, |
2291 | + lookaheadQuantum()); |
2292 | + } |
2293 | + |
2294 | + private Operator customerNameToCustomerPlan(String customerName) |
2295 | + { |
2296 | + return |
2297 | + groupLookup_Default( |
2298 | + indexScan_Default(customerNameIndexRowType, false, customerNameEQ(customerName)), |
2299 | + coi, |
2300 | + customerNameIndexRowType, |
2301 | + descendants(customerRowType), |
2302 | + InputPreservationOption.DISCARD_INPUT, |
2303 | + lookaheadQuantum()); |
2304 | + } |
2305 | + |
2306 | + private Operator addressAddressToCustomerPlan(String address) |
2307 | + { |
2308 | + return |
2309 | + groupLookup_Default( |
2310 | + indexScan_Default(addressAddressIndexRowType, false, addressAddressEQ(address)), |
2311 | + coi, |
2312 | + addressAddressIndexRowType, |
2313 | + descendants(customerRowType), |
2314 | + InputPreservationOption.DISCARD_INPUT, |
2315 | + lookaheadQuantum()); |
2316 | + } |
2317 | + |
2318 | + private Operator addressToCustomerPlan(String address) |
2319 | + { |
2320 | + return |
2321 | + groupLookup_Default( |
2322 | + branchLookup_Default( |
2323 | + indexScan_Default(addressAddressIndexRowType, false, addressAddressEQ(address)), |
2324 | + coi, |
2325 | + addressAddressIndexRowType, |
2326 | + addressRowType, |
2327 | + InputPreservationOption.DISCARD_INPUT), |
2328 | + coi, |
2329 | + addressRowType, |
2330 | + descendants(customerRowType), |
2331 | + InputPreservationOption.DISCARD_INPUT, |
2332 | + lookaheadQuantum()); |
2333 | + } |
2334 | + |
2335 | + private Operator addressToOrderPlan(String address, boolean keepInput) |
2336 | + { |
2337 | + return |
2338 | + groupLookup_Default( |
2339 | + ancestorLookup_Default( |
2340 | + indexScan_Default(addressAddressIndexRowType, false, addressAddressEQ(address)), |
2341 | + coi, |
2342 | + addressAddressIndexRowType, |
2343 | + Arrays.asList(addressRowType), |
2344 | + InputPreservationOption.DISCARD_INPUT), |
2345 | + coi, |
2346 | + addressRowType, |
2347 | + descendants(orderRowType), |
2348 | + keepInput ? InputPreservationOption.KEEP_INPUT : InputPreservationOption.DISCARD_INPUT, |
2349 | + lookaheadQuantum()); |
2350 | + } |
2351 | + |
2352 | + private Operator orderToAddressPlan(String salesman, boolean keepInput) |
2353 | + { |
2354 | + return |
2355 | + groupLookup_Default( |
2356 | + ancestorLookup_Default( |
2357 | + indexScan_Default(orderSalesmanIndexRowType, false, orderSalesmanEQ(salesman)), |
2358 | + coi, |
2359 | + orderSalesmanIndexRowType, |
2360 | + Arrays.asList(orderRowType), |
2361 | + InputPreservationOption.DISCARD_INPUT), |
2362 | + coi, |
2363 | + orderRowType, |
2364 | + descendants(addressRowType), |
2365 | + keepInput ? InputPreservationOption.KEEP_INPUT : InputPreservationOption.DISCARD_INPUT, |
2366 | + lookaheadQuantum()); |
2367 | + } |
2368 | + |
2369 | + private Operator itemToAddressPlan(long iid, boolean keepInput) |
2370 | + { |
2371 | + return |
2372 | + groupLookup_Default( |
2373 | + ancestorLookup_Default( |
2374 | + indexScan_Default(itemIidIndexRowType, false, itemIidEQ(iid)), |
2375 | + coi, |
2376 | + itemIidIndexRowType, |
2377 | + Arrays.asList(itemRowType), |
2378 | + InputPreservationOption.DISCARD_INPUT), |
2379 | + coi, |
2380 | + itemRowType, |
2381 | + descendants(addressRowType), |
2382 | + keepInput ? InputPreservationOption.KEEP_INPUT : InputPreservationOption.DISCARD_INPUT, |
2383 | + lookaheadQuantum()); |
2384 | } |
2385 | |
2386 | private IndexKeyRange itemIidEQ(int iid) |
2387 | @@ -433,6 +840,67 @@ |
2388 | return new IndexBound(row(orderSalesmanIndexRowType, salesman), new SetColumnSelector(0)); |
2389 | } |
2390 | |
2391 | + private IndexKeyRange customerNameEQ(String name) |
2392 | + { |
2393 | + IndexBound bound = customerNameIndexBound(name); |
2394 | + return IndexKeyRange.bounded(customerNameIndexRowType, bound, true, bound, true); |
2395 | + } |
2396 | + |
2397 | + private IndexKeyRange addressAddressEQ(String address) |
2398 | + { |
2399 | + IndexBound bound = addressAddressIndexBound(address); |
2400 | + return IndexKeyRange.bounded(addressAddressIndexRowType, bound, true, bound, true); |
2401 | + } |
2402 | + |
2403 | + private IndexKeyRange orderSalesmanEQ(String salesman) |
2404 | + { |
2405 | + IndexBound bound = orderSalesmanIndexBound(salesman); |
2406 | + return IndexKeyRange.bounded(orderSalesmanIndexRowType, bound, true, bound, true); |
2407 | + } |
2408 | + |
2409 | + private IndexKeyRange orderIdEQ(long oid) |
2410 | + { |
2411 | + IndexRowType indexRowType = indexType(order, "oid"); |
2412 | + IndexBound bound = new IndexBound(row(indexRowType, oid), new SetColumnSelector(0)); |
2413 | + return IndexKeyRange.bounded(indexRowType, bound, true, bound, true); |
2414 | + |
2415 | + } |
2416 | + private IndexKeyRange itemIidEQ(long iid) |
2417 | + { |
2418 | + IndexBound bound = itemIidIndexBound(iid); |
2419 | + return IndexKeyRange.bounded(itemIidIndexRowType, bound, true, bound, true); |
2420 | + } |
2421 | + |
2422 | + private IndexBound customerNameIndexBound(String name) |
2423 | + { |
2424 | + return new IndexBound(row(customerNameIndexRowType, name), new SetColumnSelector(0)); |
2425 | + } |
2426 | + |
2427 | + private IndexBound addressAddressIndexBound(String addr) |
2428 | + { |
2429 | + return new IndexBound(row(addressAddressIndexRowType, addr), new SetColumnSelector(0)); |
2430 | + } |
2431 | + |
2432 | + private IndexBound orderSalesmanIndexBound(String salesman) |
2433 | + { |
2434 | + return new IndexBound(row(orderSalesmanIndexRowType, salesman), new SetColumnSelector(0)); |
2435 | + } |
2436 | + |
2437 | + private IndexBound itemIidIndexBound(long iid) |
2438 | + { |
2439 | + return new IndexBound(row(itemIidIndexRowType, iid), new SetColumnSelector(0)); |
2440 | + } |
2441 | + |
2442 | + private List<UserTableRowType> descendants(UserTableRowType root) |
2443 | + { |
2444 | + List<UserTableRowType> result = new ArrayList<>(); |
2445 | + result.add(root); |
2446 | + for (RowType rowType : Schema.descendentTypes(root, schema.userTableTypes())) { |
2447 | + result.add((UserTableRowType)rowType); |
2448 | + } |
2449 | + return result; |
2450 | + } |
2451 | + |
2452 | private List<UserTableRowType> list(UserTableRowType... rowTypes) |
2453 | { |
2454 | return Arrays.asList(rowTypes); |
2455 | |
2456 | === renamed file 'src/test/java/com/akiban/server/test/it/qp/GroupLookupLookaheadIT.java' => 'src/test/java/com/akiban/server/test/it/qp/GroupLookup_DefaultLookaheadIT.java' |
2457 | --- src/test/java/com/akiban/server/test/it/qp/GroupLookupLookaheadIT.java 2013-07-13 21:17:31 +0000 |
2458 | +++ src/test/java/com/akiban/server/test/it/qp/GroupLookup_DefaultLookaheadIT.java 2013-07-24 22:52:24 +0000 |
2459 | @@ -54,87 +54,32 @@ |
2460 | import static com.akiban.qp.operator.API.*; |
2461 | import static com.akiban.server.test.ExpressionGenerators.*; |
2462 | |
2463 | -public class GroupLookupLookaheadIT extends OperatorITBase |
2464 | +public class GroupLookup_DefaultLookaheadIT extends GroupLookup_DefaultIT |
2465 | { |
2466 | + protected void moreDB() { |
2467 | + NewRow[] daves = new NewRow[]{ |
2468 | + createNewRow(order, 23L, 2L, "dave"), |
2469 | + createNewRow(order, 24L, 2L, "dave"), |
2470 | + createNewRow(order, 25L, 2L, "dave")}; |
2471 | + writeRows(daves); |
2472 | + } |
2473 | + |
2474 | @Override |
2475 | protected boolean pipelineMap() { |
2476 | return true; |
2477 | } |
2478 | |
2479 | + @Override |
2480 | protected int lookaheadQuantum() { |
2481 | return 4; |
2482 | } |
2483 | |
2484 | - @Override |
2485 | - protected void setupPostCreateSchema() { |
2486 | - super.setupPostCreateSchema(); |
2487 | - NewRow[] dbWithOrphans = new NewRow[]{ |
2488 | - createNewRow(customer, 1L, "northbridge"), |
2489 | - createNewRow(customer, 2L, "foundation"), |
2490 | - createNewRow(order, 11L, 1L, "ori"), |
2491 | - createNewRow(order, 12L, 1L, "david"), |
2492 | - createNewRow(order, 21L, 2L, "tom"), |
2493 | - createNewRow(order, 22L, 2L, "jack"), |
2494 | - createNewRow(order, 23L, 2L, "dave"), |
2495 | - createNewRow(order, 24L, 2L, "dave"), |
2496 | - createNewRow(order, 25L, 2L, "dave"), |
2497 | - createNewRow(order, 31L, 3L, "peter"), |
2498 | - createNewRow(item, 111L, 11L), |
2499 | - createNewRow(item, 112L, 11L), |
2500 | - createNewRow(item, 121L, 12L), |
2501 | - createNewRow(item, 122L, 12L), |
2502 | - createNewRow(item, 211L, 21L), |
2503 | - createNewRow(item, 212L, 21L), |
2504 | - createNewRow(item, 221L, 22L), |
2505 | - createNewRow(item, 222L, 22L), |
2506 | - // orphans |
2507 | - createNewRow(item, 311L, 31L), |
2508 | - createNewRow(item, 312L, 31L)}; |
2509 | - use(dbWithOrphans); |
2510 | - } |
2511 | - |
2512 | @Test |
2513 | - public void testAncestorLookupCursor() |
2514 | - { |
2515 | - Operator plan = |
2516 | - ancestorLookup_Default( |
2517 | - filter_Default( |
2518 | - groupScan_Default(coi), |
2519 | - Collections.singleton(orderRowType)), |
2520 | - coi, |
2521 | - orderRowType, |
2522 | - Collections.singleton(customerRowType), |
2523 | - InputPreservationOption.DISCARD_INPUT, |
2524 | - lookaheadQuantum()); |
2525 | - CursorLifecycleTestCase testCase = new CursorLifecycleTestCase() |
2526 | - { |
2527 | - @Override |
2528 | - public RowBase[] firstExpectedRows() |
2529 | - { |
2530 | - return new RowBase[] { |
2531 | - row(customerRowType, 1L, "northbridge"), |
2532 | - row(customerRowType, 1L, "northbridge"), |
2533 | - row(customerRowType, 2L, "foundation"), |
2534 | - row(customerRowType, 2L, "foundation"), |
2535 | - row(customerRowType, 2L, "foundation"), |
2536 | - row(customerRowType, 2L, "foundation"), |
2537 | - row(customerRowType, 2L, "foundation"), |
2538 | - }; |
2539 | - } |
2540 | - |
2541 | - @Override |
2542 | - public boolean reopenTopLevel() { |
2543 | - return true; |
2544 | - } |
2545 | - }; |
2546 | - testCursorLifecycle(plan, testCase); |
2547 | - } |
2548 | - |
2549 | - @Test @Ignore // Same check in testCursor |
2550 | public void testAncestorLookupSimple() |
2551 | { |
2552 | + moreDB(); |
2553 | Operator plan = |
2554 | - ancestorLookup_Default( |
2555 | + groupLookup_Default( |
2556 | filter_Default( |
2557 | groupScan_Default(coi), |
2558 | Collections.singleton(orderRowType)), |
2559 | @@ -148,6 +93,9 @@ |
2560 | row(customerRowType, 1L, "northbridge"), |
2561 | row(customerRowType, 2L, "foundation"), |
2562 | row(customerRowType, 2L, "foundation"), |
2563 | + row(customerRowType, 2L, "foundation"), |
2564 | + row(customerRowType, 2L, "foundation"), |
2565 | + row(customerRowType, 2L, "foundation"), |
2566 | }; |
2567 | compareRows(expected, cursor(plan, queryContext, queryBindings)); |
2568 | } |
2569 | @@ -155,6 +103,7 @@ |
2570 | @Test |
2571 | public void testAncestorLookupMap() |
2572 | { |
2573 | + moreDB(); |
2574 | RowType cidValueRowType = schema.newValuesType(AkType.INT); |
2575 | List<ExpressionGenerator> cidExprs = Arrays.asList(boundField(cidValueRowType, 1, 0)); |
2576 | IndexBound cidBound = |
2577 | @@ -169,7 +118,7 @@ |
2578 | intRow(cidValueRowType, 2), |
2579 | intRow(cidValueRowType, 10)), |
2580 | cidValueRowType), |
2581 | - ancestorLookup_Default( |
2582 | + groupLookup_Default( |
2583 | indexScan_Default(orderCidIndexRowType, cidRange, ordering(orderCidIndexRowType), IndexScanSelector.leftJoinAfter(orderCidIndexRowType.index(), orderRowType.userTable()), lookaheadQuantum()), |
2584 | coi, |
2585 | orderCidIndexRowType, |
2586 | |
2587 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/duplicate-child.expected' |
2588 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/duplicate-child.expected 2012-08-29 13:38:58 +0000 |
2589 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/duplicate-child.expected 2013-07-24 22:52:24 +0000 |
2590 | @@ -3,6 +3,6 @@ |
2591 | Filter_Default(customers - orders) |
2592 | Flatten_HKeyOrdered(customers INNER orders) |
2593 | Select_HKeyOrdered(o2.order_date == DATE '2011-03-02') |
2594 | - BranchLookup_Default(customers -> orders) |
2595 | - AncestorLookup_Default(Index(orders.order_date) -> customers) |
2596 | + GroupLookup_Default(customers -> orders) |
2597 | + GroupLookup_Default(Index(orders.order_date) -> customers) |
2598 | IndexScan_Default(Index(orders.order_date), order_date = DATE '2011-03-01') |
2599 | \ No newline at end of file |
2600 | |
2601 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-branch.expected' |
2602 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-branch.expected 2012-08-29 13:38:58 +0000 |
2603 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-branch.expected 2013-07-24 22:52:24 +0000 |
2604 | @@ -3,8 +3,8 @@ |
2605 | Filter_Default(customers - addresses) |
2606 | Flatten_HKeyOrdered(customers INNER addresses) |
2607 | Select_HKeyOrdered(addresses.state == 'CA') |
2608 | - BranchLookup_Default(customers -> addresses) |
2609 | - AncestorLookup_Default(Index(orders.order_date) -> customers) |
2610 | + GroupLookup_Default(customers -> addresses) |
2611 | + GroupLookup_Default(Index(orders.order_date) -> customers) |
2612 | Intersect_Ordered(skip 1 left, skip 1 right, compare 1) |
2613 | IndexScan_Default(Index(orders.order_date), order_date = DATE '2010-04-22') |
2614 | IndexScan_Default(Index(addresses.state), state = 'CA') |
2615 | \ No newline at end of file |
2616 | |
2617 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-duplicate.expected' |
2618 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-duplicate.expected 2013-07-17 21:00:35 +0000 |
2619 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-duplicate.expected 2013-07-24 22:52:24 +0000 |
2620 | @@ -3,7 +3,7 @@ |
2621 | Map_NestedLoops() |
2622 | Flatten_HKeyOrdered(customers - orders INNER items) |
2623 | Flatten_HKeyOrdered(customers INNER orders) |
2624 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
2625 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
2626 | Intersect_Ordered(skip 1 left, skip 1 right, compare 1) |
2627 | IndexScan_Default(Index(items.sku), sku = '1234') |
2628 | IndexScan_Default(Index(items.sku), sku = '4567') |
2629 | |
2630 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-ordered.expected' |
2631 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-ordered.expected 2013-07-17 21:00:35 +0000 |
2632 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-multi-ordered.expected 2013-07-24 22:52:24 +0000 |
2633 | @@ -3,7 +3,7 @@ |
2634 | Map_NestedLoops() |
2635 | Flatten_HKeyOrdered(customers - orders INNER items) |
2636 | Flatten_HKeyOrdered(customers INNER orders) |
2637 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
2638 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
2639 | Intersect_Ordered(skip 1 left, skip 1 right, compare 1) |
2640 | IndexScan_Default(Index(items.sku), sku = '1234', orders.cid DESC, oid, iid) |
2641 | IndexScan_Default(Index(items.sku), sku = '4567', orders.cid DESC, oid, iid) |
2642 | |
2643 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-single-branch.expected' |
2644 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-single-branch.expected 2012-08-29 13:38:58 +0000 |
2645 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiindex-single-branch.expected 2013-07-24 22:52:24 +0000 |
2646 | @@ -1,7 +1,7 @@ |
2647 | PhysicalSelect[cid:int[INT], name:varchar(32)[VARCHAR], aid:int[INT], cid:int[INT], state:char(2)[VARCHAR], city:varchar(100)[VARCHAR]] |
2648 | Project_Default(customers.cid, customers.name, addresses.aid, addresses.cid, addresses.state, addresses.city) |
2649 | Flatten_HKeyOrdered(customers INNER addresses) |
2650 | - AncestorLookup_Default(Index(addresses.state) -> customers, addresses) |
2651 | + GroupLookup_Default(Index(addresses.state) -> customers, addresses) |
2652 | Intersect_Ordered(skip 1 left, skip 1 right, compare 1) |
2653 | IndexScan_Default(Index(addresses.state), state = 'CA') |
2654 | IndexScan_Default(Index(customers.name), name = 'Awwyqrezr') |
2655 | \ No newline at end of file |
2656 | |
2657 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-1.expected' |
2658 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-1.expected 2013-07-17 21:00:35 +0000 |
2659 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-1.expected 2013-07-24 22:52:24 +0000 |
2660 | @@ -1,12 +1,12 @@ |
2661 | PhysicalSelect[cid:int[INT]] |
2662 | Map_NestedLoops() |
2663 | - AncestorLookup_Default(Index(parent.PRIMARY) -> parent) |
2664 | + GroupLookup_Default(Index(parent.PRIMARY) -> parent) |
2665 | IndexScan_Default(Index(parent.PRIMARY), id > 1) |
2666 | Project_Default(customers.cid) |
2667 | Map_NestedLoops() |
2668 | Flatten_HKeyOrdered(customers INNER items) |
2669 | Select_HKeyOrdered(items.quan > 100) |
2670 | - AncestorLookup_Default(Index(customers.cname_and_sku) -> customers, items) |
2671 | + GroupLookup_Default(Index(customers.cname_and_sku) -> customers, items) |
2672 | IndexScan_Default(Index(customers.cname_and_sku), customers.name = parent.name, items.sku = '1234') |
2673 | Product_Nested(customers - items x customers - addresses) |
2674 | Select_HKeyOrdered(addresses.city != customers.name) |
2675 | |
2676 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-1.t3expected' |
2677 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-1.t3expected 2013-07-17 21:00:35 +0000 |
2678 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-1.t3expected 2013-07-24 22:52:24 +0000 |
2679 | @@ -1,12 +1,12 @@ |
2680 | PhysicalSelect[cid:int[INT]] |
2681 | Map_NestedLoops() |
2682 | - AncestorLookup_Default(Index(parent.PRIMARY) -> parent) |
2683 | + GroupLookup_Default(Index(parent.PRIMARY) -> parent) |
2684 | IndexScan_Default(Index(parent.PRIMARY), id > 1) |
2685 | Project_Default(customers.cid) |
2686 | Map_NestedLoops() |
2687 | Flatten_HKeyOrdered(customers INNER items) |
2688 | Select_HKeyOrdered(items.quan > 100) |
2689 | - AncestorLookup_Default(Index(customers.cname_and_sku) -> customers, items) |
2690 | + GroupLookup_Default(Index(customers.cname_and_sku) -> customers, items) |
2691 | IndexScan_Default(Index(customers.cname_and_sku), customers.name = parent.name, items.sku = '1234') |
2692 | Product_Nested(customers - items x customers - addresses) |
2693 | Select_HKeyOrdered(addresses.city != customers.name) |
2694 | |
2695 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-2.expected' |
2696 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-2.expected 2012-08-29 13:38:58 +0000 |
2697 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-2.expected 2013-07-24 22:52:24 +0000 |
2698 | @@ -6,6 +6,6 @@ |
2699 | IndexScan_Default(Index(customers.name), name = parent.name) |
2700 | Project_Default(customers.name) |
2701 | Select_HKeyOrdered(parent.name != addresses.city) |
2702 | - AncestorLookup_Default(Index(addresses.state) -> addresses) |
2703 | + GroupLookup_Default(Index(addresses.state) -> addresses) |
2704 | Select_HKeyOrdered((addresses.state != customers.name) AND (addresses.state != 'WY')) |
2705 | IndexScan_Default(Index(addresses.state), state > 'M') |
2706 | \ No newline at end of file |
2707 | |
2708 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-2.t3expected' |
2709 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-2.t3expected 2012-10-05 00:49:38 +0000 |
2710 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/multiple-table-conds-2.t3expected 2013-07-24 22:52:24 +0000 |
2711 | @@ -6,6 +6,6 @@ |
2712 | IndexScan_Default(Index(customers.name), name = parent.name) |
2713 | Project_Default(customers.name) |
2714 | Select_HKeyOrdered(parent.name != addresses.city) |
2715 | - AncestorLookup_Default(Index(addresses.state) -> addresses) |
2716 | + GroupLookup_Default(Index(addresses.state) -> addresses) |
2717 | Select_HKeyOrdered((addresses.state != customers.name) AND (addresses.state != 'WY')) |
2718 | IndexScan_Default(Index(addresses.state), state > 'M') |
2719 | \ No newline at end of file |
2720 | |
2721 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-1.expected' |
2722 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-1.expected 2012-08-29 13:38:58 +0000 |
2723 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-1.expected 2013-07-24 22:52:24 +0000 |
2724 | @@ -5,5 +5,5 @@ |
2725 | IfEmpty_Default(NULL, NULL) |
2726 | Project_Default(orders.cid, orders.order_date) |
2727 | Select_HKeyOrdered(orders.order_date < DATE '2011-01-01') |
2728 | - AncestorLookup_Default(Index(orders.__akiban_fk_0) -> orders) |
2729 | + GroupLookup_Default(Index(orders.__akiban_fk_0) -> orders) |
2730 | IndexScan_Default(Index(orders.__akiban_fk_0), cid = c.cid) |
2731 | \ No newline at end of file |
2732 | |
2733 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-1.t3expected' |
2734 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-1.t3expected 2012-10-02 13:14:54 +0000 |
2735 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-1.t3expected 2013-07-24 22:52:24 +0000 |
2736 | @@ -5,5 +5,5 @@ |
2737 | IfEmpty_Default(NULL, NULL) |
2738 | Project_Default(orders.cid, orders.order_date) |
2739 | Select_HKeyOrdered(orders.order_date < DATE '2011-01-01') |
2740 | - AncestorLookup_Default(Index(orders.__akiban_fk_0) -> orders) |
2741 | + GroupLookup_Default(Index(orders.__akiban_fk_0) -> orders) |
2742 | IndexScan_Default(Index(orders.__akiban_fk_0), cid = c.cid) |
2743 | \ No newline at end of file |
2744 | |
2745 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-2.expected' |
2746 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-2.expected 2012-10-19 19:07:51 +0000 |
2747 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/subquery-join-2.expected 2013-07-24 22:52:24 +0000 |
2748 | @@ -3,5 +3,5 @@ |
2749 | ValuesScan_Default(['1234'], ['9876']) |
2750 | Project_Default(orders.order_date, items.quan) |
2751 | Flatten_HKeyOrdered(orders INNER items) |
2752 | - AncestorLookup_Default(Index(customers.sku_and_date) -> orders, items) |
2753 | + GroupLookup_Default(Index(customers.sku_and_date) -> orders, items) |
2754 | IndexScan_Default(Index(customers.sku_and_date), items.sku = Bound(0, 0), orders.order_date < DATE '2011-01-01') |
2755 | |
2756 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/cbo/three-groups.expected' |
2757 | --- src/test/resources/com/akiban/sql/optimizer/operator/cbo/three-groups.expected 2012-08-29 13:38:58 +0000 |
2758 | +++ src/test/resources/com/akiban/sql/optimizer/operator/cbo/three-groups.expected 2013-07-24 22:52:24 +0000 |
2759 | @@ -4,8 +4,8 @@ |
2760 | GroupScan_Default(parent) |
2761 | Map_NestedLoops() |
2762 | Flatten_HKeyOrdered(customers INNER orders) |
2763 | - AncestorLookup_Default(Index(orders.PRIMARY) -> customers, orders) |
2764 | + GroupLookup_Default(Index(orders.PRIMARY) -> customers, orders) |
2765 | IndexScan_Default(Index(orders.PRIMARY), oid = child.pid) |
2766 | Project_Default(customers.cid, customers.name, orders.oid, orders.cid, orders.order_date, child.id, child.pid, child.name, items.iid, items.oid, items.sku, items.quan) |
2767 | - AncestorLookup_Default(Index(items.__akiban_fk_1) -> items) |
2768 | + GroupLookup_Default(Index(items.__akiban_fk_1) -> items) |
2769 | IndexScan_Default(Index(items.__akiban_fk_1), oid = child.id, orders.cid, iid) |
2770 | \ No newline at end of file |
2771 | |
2772 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/count-3.expected' |
2773 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/count-3.expected 2012-09-27 21:19:38 +0000 |
2774 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/count-3.expected 2013-07-24 22:52:24 +0000 |
2775 | @@ -4,5 +4,5 @@ |
2776 | Flatten_HKeyOrdered(customers - orders INNER items) |
2777 | Flatten_HKeyOrdered(customers INNER orders) |
2778 | Select_HKeyOrdered(items.quan == 100) |
2779 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
2780 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
2781 | IndexScan_Default(Index(items.sku), sku < '8888') |
2782 | \ No newline at end of file |
2783 | |
2784 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/count-3.t3expected' |
2785 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/count-3.t3expected 2012-10-02 13:14:54 +0000 |
2786 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/count-3.t3expected 2013-07-24 22:52:24 +0000 |
2787 | @@ -4,5 +4,5 @@ |
2788 | Flatten_HKeyOrdered(customers - orders INNER items) |
2789 | Flatten_HKeyOrdered(customers INNER orders) |
2790 | Select_HKeyOrdered(items.quan == 100) |
2791 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
2792 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
2793 | IndexScan_Default(Index(items.sku), sku < '8888') |
2794 | \ No newline at end of file |
2795 | |
2796 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/delete-1.expected' |
2797 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/delete-1.expected 2012-09-26 01:25:08 +0000 |
2798 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/delete-1.expected 2013-07-24 22:52:24 +0000 |
2799 | @@ -1,4 +1,4 @@ |
2800 | PhysicalUpdate |
2801 | Delete_Returning(FROM items) |
2802 | - AncestorLookup_Default(Index(items.PRIMARY) -> items) |
2803 | + GroupLookup_Default(Index(items.PRIMARY) -> items) |
2804 | IndexScan_Default(Index(items.PRIMARY), iid = 1012) |
2805 | \ No newline at end of file |
2806 | |
2807 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-0.expected' |
2808 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-0.expected 2012-08-26 04:29:21 +0000 |
2809 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-0.expected 2013-07-24 22:52:24 +0000 |
2810 | @@ -1,4 +1,4 @@ |
2811 | PhysicalSelect[name:varchar(32)[VARCHAR]] |
2812 | Project_Default(customers.name) |
2813 | - AncestorLookup_Default(Index(customers.PRIMARY) -> customers) |
2814 | + GroupLookup_Default(Index(customers.PRIMARY) -> customers) |
2815 | IndexScan_Default(Index(customers.PRIMARY), cid = 1) |
2816 | \ No newline at end of file |
2817 | |
2818 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02a.expected' |
2819 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02a.expected 2012-08-29 13:38:58 +0000 |
2820 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02a.expected 2013-07-24 22:52:24 +0000 |
2821 | @@ -2,5 +2,5 @@ |
2822 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
2823 | Flatten_HKeyOrdered(customers - orders INNER items) |
2824 | Flatten_HKeyOrdered(customers INNER orders) |
2825 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
2826 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
2827 | IndexScan_Default(Index(items.sku), sku = '1234') |
2828 | \ No newline at end of file |
2829 | |
2830 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02b.expected' |
2831 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02b.expected 2012-08-29 13:38:58 +0000 |
2832 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02b.expected 2013-07-24 22:52:24 +0000 |
2833 | @@ -2,5 +2,5 @@ |
2834 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
2835 | Flatten_HKeyOrdered(customers - orders INNER items) |
2836 | Flatten_HKeyOrdered(customers INNER orders) |
2837 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
2838 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
2839 | IndexScan_Default(Index(items.sku), sku >= '0' AND < '8888') |
2840 | \ No newline at end of file |
2841 | |
2842 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02p.expected' |
2843 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02p.expected 2012-08-29 13:38:58 +0000 |
2844 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02p.expected 2013-07-24 22:52:24 +0000 |
2845 | @@ -2,5 +2,5 @@ |
2846 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
2847 | Flatten_HKeyOrdered(customers - orders INNER items) |
2848 | Flatten_HKeyOrdered(customers INNER orders) |
2849 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
2850 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
2851 | IndexScan_Default(Index(items.sku), sku < $1) |
2852 | \ No newline at end of file |
2853 | |
2854 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02r.expected' |
2855 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02r.expected 2012-08-29 13:38:58 +0000 |
2856 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-02r.expected 2013-07-24 22:52:24 +0000 |
2857 | @@ -2,5 +2,5 @@ |
2858 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
2859 | Flatten_HKeyOrdered(customers - orders INNER items) |
2860 | Flatten_HKeyOrdered(customers INNER orders) |
2861 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
2862 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
2863 | IndexScan_Default(Index(items.sku), sku < '8888') |
2864 | \ No newline at end of file |
2865 | |
2866 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-07o.expected' |
2867 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-07o.expected 2012-08-29 13:38:58 +0000 |
2868 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-07o.expected 2013-07-24 22:52:24 +0000 |
2869 | @@ -1,5 +1,5 @@ |
2870 | PhysicalSelect[order_date:date[DATE]] |
2871 | Project_Default(orders.order_date) |
2872 | Flatten_HKeyOrdered(customers INNER orders) |
2873 | - AncestorLookup_Default(Index(orders.order_date) -> customers, orders) |
2874 | + GroupLookup_Default(Index(orders.order_date) -> customers, orders) |
2875 | IndexScan_Default(Index(orders.order_date), order_date > DATE '2011-01-01') |
2876 | \ No newline at end of file |
2877 | |
2878 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-10.expected' |
2879 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-10.expected 2012-12-31 22:39:46 +0000 |
2880 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-10.expected 2013-07-24 22:52:24 +0000 |
2881 | @@ -1,5 +1,5 @@ |
2882 | PhysicalSelect[oid:int[INT], sku:varchar(32)[VARCHAR], quan:int[INT]] |
2883 | Project_Default(items.oid, items.sku, items.quan) |
2884 | Select_HKeyOrdered(in(items.quan, 100, 200, 300)) |
2885 | - AncestorLookup_Default(Index(items.sku) -> items) |
2886 | + GroupLookup_Default(Index(items.sku) -> items) |
2887 | IndexScan_Default(Index(items.sku), sku ASC, orders.cid, oid, iid) |
2888 | \ No newline at end of file |
2889 | |
2890 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-11.expected' |
2891 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-11.expected 2012-08-28 17:36:05 +0000 |
2892 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-11.expected 2013-07-24 22:52:24 +0000 |
2893 | @@ -3,8 +3,8 @@ |
2894 | Project_Default(Field(0), Field(1)) |
2895 | Aggregate_Partial(GROUP BY cid: MAX) |
2896 | Project_Default(orders.cid, orders.order_date) |
2897 | - AncestorLookup_Default(Index(orders.__akiban_fk_0) -> orders) |
2898 | + GroupLookup_Default(Index(orders.__akiban_fk_0) -> orders) |
2899 | IndexScan_Default(Index(orders.__akiban_fk_0), cid ASC) |
2900 | Project_Default(customers.name, Bound(0, 1)) |
2901 | - AncestorLookup_Default(Index(customers.PRIMARY) -> customers) |
2902 | + GroupLookup_Default(Index(customers.PRIMARY) -> customers) |
2903 | IndexScan_Default(Index(customers.PRIMARY), cid = Bound(0, 0)) |
2904 | \ No newline at end of file |
2905 | |
2906 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-11.t3expected' |
2907 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-11.t3expected 2012-10-02 13:14:54 +0000 |
2908 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-11.t3expected 2013-07-24 22:52:24 +0000 |
2909 | @@ -3,8 +3,8 @@ |
2910 | Project_Default(Field(0), Field(1)) |
2911 | Aggregate_Partial(GROUP BY cid: MAX) |
2912 | Project_Default(orders.cid, orders.order_date) |
2913 | - AncestorLookup_Default(Index(orders.__akiban_fk_0) -> orders) |
2914 | + GroupLookup_Default(Index(orders.__akiban_fk_0) -> orders) |
2915 | IndexScan_Default(Index(orders.__akiban_fk_0), cid ASC) |
2916 | Project_Default(customers.name, Bound(0, 1)) |
2917 | - AncestorLookup_Default(Index(customers.PRIMARY) -> customers) |
2918 | + GroupLookup_Default(Index(customers.PRIMARY) -> customers) |
2919 | IndexScan_Default(Index(customers.PRIMARY), cid = Bound(0, 0)) |
2920 | \ No newline at end of file |
2921 | |
2922 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-14.expected' |
2923 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-14.expected 2012-11-15 23:51:50 +0000 |
2924 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-14.expected 2013-07-24 22:52:24 +0000 |
2925 | @@ -1,7 +1,7 @@ |
2926 | PhysicalSelect[order_date:date[DATE]] |
2927 | Map_NestedLoops() |
2928 | Filter_Default(orders) |
2929 | - BranchLookup_Default(Index(customers.name) -> customers) |
2930 | + GroupLookup_Default(Index(customers.name) -> orders) |
2931 | IndexScan_Default(Index(customers.name), name = 'Smith') |
2932 | Project_Default(orders.order_date) |
2933 | IfEmpty_Default(NULL, NULL, NULL, NULL, DISCARD_INPUT) |
2934 | |
2935 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15.expected' |
2936 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15.expected 2012-11-21 20:30:27 +0000 |
2937 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15.expected 2013-07-24 22:52:24 +0000 |
2938 | @@ -1,7 +1,7 @@ |
2939 | PhysicalSelect[oid:int[INT], cid:int[INT], order_date:date[DATE], iid:int[INT], oid:int[INT], sku:varchar(32)[VARCHAR], quan:int[INT]] |
2940 | Project_Default(orders.oid, orders.cid, orders.order_date, items.iid, items.oid, items.sku, items.quan) |
2941 | Flatten_HKeyOrdered(orders INNER items) |
2942 | - AncestorLookup_Default(Index(items.sku) -> orders, items) |
2943 | + GroupLookup_Default(Index(items.sku) -> orders, items) |
2944 | Intersect_Ordered(skip 1 left, skip 1 right, compare 2) |
2945 | Union_Ordered(all, skip 1, compare 3) |
2946 | IndexScan_Default(Index(items.sku), sku = '1234', orders.cid ASC, oid, iid) |
2947 | |
2948 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15a.expected' |
2949 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15a.expected 2012-11-23 19:13:43 +0000 |
2950 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15a.expected 2013-07-24 22:52:24 +0000 |
2951 | @@ -1,7 +1,7 @@ |
2952 | PhysicalSelect[oid:int[INT], cid:int[INT], order_date:date[DATE], iid:int[INT], oid:int[INT], sku:varchar(32)[VARCHAR], quan:int[INT]] |
2953 | Project_Default(orders.oid, orders.cid, orders.order_date, items.iid, items.oid, items.sku, items.quan) |
2954 | Flatten_HKeyOrdered(orders INNER items) |
2955 | - AncestorLookup_Default(Index(items.PRIMARY) -> orders, items) |
2956 | + GroupLookup_Default(Index(items.PRIMARY) -> orders, items) |
2957 | Intersect_Ordered(skip 1 left, skip 1 right, compare 2) |
2958 | Union_Ordered(all, skip 1, compare 2) |
2959 | IndexScan_Default(Index(items.PRIMARY), iid = 100, orders.cid ASC, oid) |
2960 | |
2961 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15i.expected' |
2962 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15i.expected 2012-11-21 20:30:27 +0000 |
2963 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-15i.expected 2013-07-24 22:52:24 +0000 |
2964 | @@ -1,7 +1,7 @@ |
2965 | PhysicalSelect[oid:int[INT], cid:int[INT], order_date:date[DATE], iid:int[INT], oid:int[INT], sku:varchar(32)[VARCHAR], quan:int[INT]] |
2966 | Project_Default(orders.oid, orders.cid, orders.order_date, items.iid, items.oid, items.sku, items.quan) |
2967 | Flatten_HKeyOrdered(orders INNER items) |
2968 | - AncestorLookup_Default(Index(items.PRIMARY) -> orders, items) |
2969 | + GroupLookup_Default(Index(items.PRIMARY) -> orders, items) |
2970 | Intersect_Ordered(skip 1 left, skip 1 right, compare 2) |
2971 | Union_Ordered(all, skip 1, compare 2) |
2972 | Union_Ordered(all, skip 1, compare 2) |
2973 | |
2974 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-2.expected' |
2975 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-2.expected 2012-08-26 04:29:21 +0000 |
2976 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-2.expected 2013-07-24 22:52:24 +0000 |
2977 | @@ -2,5 +2,5 @@ |
2978 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
2979 | Flatten_HKeyOrdered(customers - orders INNER items) |
2980 | Flatten_HKeyOrdered(customers INNER orders) |
2981 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
2982 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
2983 | IndexScan_Default(Index(items.sku), sku < '8888') |
2984 | \ No newline at end of file |
2985 | |
2986 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-3.expected' |
2987 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-3.expected 2012-08-26 04:29:21 +0000 |
2988 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-3.expected 2013-07-24 22:52:24 +0000 |
2989 | @@ -3,5 +3,5 @@ |
2990 | Flatten_HKeyOrdered(customers - orders INNER items) |
2991 | Flatten_HKeyOrdered(customers INNER orders) |
2992 | Select_HKeyOrdered(items.quan == 100) |
2993 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
2994 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
2995 | IndexScan_Default(Index(items.sku), sku < '8888') |
2996 | \ No newline at end of file |
2997 | |
2998 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-4.expected' |
2999 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-4.expected 2012-08-26 04:29:21 +0000 |
3000 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-4.expected 2013-07-24 22:52:24 +0000 |
3001 | @@ -2,5 +2,5 @@ |
3002 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3003 | Flatten_HKeyOrdered(customers - orders INNER items) |
3004 | Flatten_HKeyOrdered(customers INNER orders) |
3005 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
3006 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
3007 | IndexScan_Default(Index(items.sku), sku < '8888') |
3008 | \ No newline at end of file |
3009 | |
3010 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-5.expected' |
3011 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-5.expected 2012-08-26 04:29:21 +0000 |
3012 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-5.expected 2013-07-24 22:52:24 +0000 |
3013 | @@ -1,5 +1,5 @@ |
3014 | PhysicalSelect[name:varchar(32)[VARCHAR], order_date:date[DATE]] |
3015 | Project_Default(customers.name, orders.order_date) |
3016 | Flatten_HKeyOrdered(customers INNER orders) |
3017 | - AncestorLookup_Default(Index(orders.order_date) -> customers, orders) |
3018 | + GroupLookup_Default(Index(orders.order_date) -> customers, orders) |
3019 | IndexScan_Default(Index(orders.order_date), order_date DESC) |
3020 | \ No newline at end of file |
3021 | |
3022 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-6.expected' |
3023 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-6.expected 2012-08-26 04:29:21 +0000 |
3024 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-6.expected 2013-07-24 22:52:24 +0000 |
3025 | @@ -3,7 +3,7 @@ |
3026 | Filter_Default(customers - orders - items) |
3027 | Flatten_HKeyOrdered(customers - orders INNER items) |
3028 | Flatten_HKeyOrdered(customers INNER orders) |
3029 | - AncestorLookup_Default(orders -> customers) |
3030 | + GroupLookup_Default(orders -> customers) |
3031 | Select_HKeyOrdered(items.quan > 100) |
3032 | - BranchLookup_Default(Index(orders.order_date) -> orders) |
3033 | + GroupLookup_Default(Index(orders.order_date) -> orders, items) |
3034 | IndexScan_Default(Index(orders.order_date), order_date DESC) |
3035 | \ No newline at end of file |
3036 | |
3037 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-9.expected' |
3038 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-9.expected 2012-08-26 04:29:21 +0000 |
3039 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/select-9.expected 2013-07-24 22:52:24 +0000 |
3040 | @@ -2,6 +2,5 @@ |
3041 | Project_Default(customers.name) |
3042 | Filter_Default(customers - items) |
3043 | Flatten_HKeyOrdered(customers INNER items) |
3044 | - AncestorLookup_Default(orders -> customers) |
3045 | - BranchLookup_Default(Index(orders.order_date) -> orders) |
3046 | - IndexScan_Default(Index(orders.order_date), order_date = DATE '2011-03-01') |
3047 | \ No newline at end of file |
3048 | + GroupLookup_Default(Index(orders.order_date) -> customers, items) |
3049 | + IndexScan_Default(Index(orders.order_date), order_date = DATE '2011-03-01') |
3050 | \ No newline at end of file |
3051 | |
3052 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-1.expected' |
3053 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-1.expected 2012-09-26 01:25:08 +0000 |
3054 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-1.expected 2013-07-24 22:52:24 +0000 |
3055 | @@ -1,4 +1,4 @@ |
3056 | PhysicalUpdate/STEP_ISOLATE |
3057 | Update_Returning(customers SET name = 'Smyth') |
3058 | - AncestorLookup_Default(Index(customers.name) -> customers) |
3059 | + GroupLookup_Default(Index(customers.name) -> customers) |
3060 | IndexScan_Default(Index(customers.name), name = 'Smith') |
3061 | \ No newline at end of file |
3062 | |
3063 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-3.expected' |
3064 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-3.expected 2012-09-26 01:25:08 +0000 |
3065 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-3.expected 2013-07-24 22:52:24 +0000 |
3066 | @@ -1,5 +1,5 @@ |
3067 | PhysicalUpdate |
3068 | Update_Returning(items SET quan = 66) |
3069 | Filter_Default(items) |
3070 | - BranchLookup_Default(Index(orders.order_date) -> orders) |
3071 | + GroupLookup_Default(Index(orders.order_date) -> items) |
3072 | IndexScan_Default(Index(orders.order_date), order_date > DATE '2011-04-01') |
3073 | \ No newline at end of file |
3074 | |
3075 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-4.expected' |
3076 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-4.expected 2012-09-28 04:07:13 +0000 |
3077 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-4.expected 2013-07-24 22:52:24 +0000 |
3078 | @@ -2,5 +2,5 @@ |
3079 | Project_Default(items.iid, items.quan) |
3080 | Update_Returning(items SET quan = items.quan + 2) |
3081 | Filter_Default(items) |
3082 | - BranchLookup_Default(Index(orders.order_date) -> orders) |
3083 | + GroupLookup_Default(Index(orders.order_date) -> items) |
3084 | IndexScan_Default(Index(orders.order_date), order_date > DATE '2011-04-01') |
3085 | \ No newline at end of file |
3086 | |
3087 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-5.expected' |
3088 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-5.expected 2012-09-28 04:07:13 +0000 |
3089 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-5.expected 2013-07-24 22:52:24 +0000 |
3090 | @@ -2,5 +2,5 @@ |
3091 | Project_Default(items.oid, items.iid, items.quan - 2) |
3092 | Update_Returning(items SET quan = items.quan + 2) |
3093 | Filter_Default(items) |
3094 | - BranchLookup_Default(Index(orders.order_date) -> orders) |
3095 | + GroupLookup_Default(Index(orders.order_date) -> items) |
3096 | IndexScan_Default(Index(orders.order_date), order_date > DATE '2011-04-01') |
3097 | \ No newline at end of file |
3098 | |
3099 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-6.expected' |
3100 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-6.expected 2012-11-28 20:08:33 +0000 |
3101 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-6.expected 2013-07-24 22:52:24 +0000 |
3102 | @@ -8,5 +8,5 @@ |
3103 | Filter_Default(orders - items) |
3104 | Flatten_HKeyOrdered(orders INNER items) |
3105 | Select_HKeyOrdered(orders.order_date > DATE '2011-03-02') |
3106 | - BranchLookup_Default(Index(orders.PRIMARY) -> orders) |
3107 | + GroupLookup_Default(Index(orders.PRIMARY) -> orders, items) |
3108 | IndexScan_Default(Index(orders.PRIMARY), oid = items.oid) |
3109 | \ No newline at end of file |
3110 | |
3111 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-7.expected' |
3112 | --- src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-7.expected 2013-07-19 18:51:59 +0000 |
3113 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coi-index/update-7.expected 2013-07-24 22:52:24 +0000 |
3114 | @@ -1,9 +1,9 @@ |
3115 | PhysicalUpdate/STEP_ISOLATE |
3116 | Update_Returning(items SET quan = items.quan * 2) |
3117 | Map_NestedLoops() |
3118 | - AncestorLookup_Default(Index(items.PRIMARY) -> items) |
3119 | + GroupLookup_Default(Index(items.PRIMARY) -> items) |
3120 | IndexScan_Default(Index(items.PRIMARY), iid = 3) |
3121 | EmitBoundRow_Nested(items -> items) |
3122 | - AncestorLookup_Default(Index(items.PRIMARY) -> items) |
3123 | + GroupLookup_Default(Index(items.PRIMARY) -> items) |
3124 | Select_HKeyOrdered(items.iid == i2.iid) |
3125 | IndexScan_Default(Index(items.PRIMARY), iid = 3) |
3126 | \ No newline at end of file |
3127 | |
3128 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02bt.expected' |
3129 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02bt.expected 2012-10-19 19:07:51 +0000 |
3130 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02bt.expected 2013-07-24 22:52:24 +0000 |
3131 | @@ -2,5 +2,5 @@ |
3132 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3133 | Flatten_HKeyOrdered(customers - orders INNER items) |
3134 | Flatten_HKeyOrdered(customers INNER orders) |
3135 | - AncestorLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3136 | + GroupLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3137 | IndexScan_Default(Index(customers.sku_and_date), items.sku = '1234', orders.order_date BETWEEN DATE '2011-01-01' AND DATE '2011-06-30' ASC) |
3138 | |
3139 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02eq.expected' |
3140 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02eq.expected 2012-10-19 19:07:51 +0000 |
3141 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02eq.expected 2013-07-24 22:52:24 +0000 |
3142 | @@ -2,5 +2,5 @@ |
3143 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3144 | Flatten_HKeyOrdered(customers - orders INNER items) |
3145 | Flatten_HKeyOrdered(customers INNER orders) |
3146 | - AncestorLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3147 | + GroupLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3148 | IndexScan_Default(Index(customers.sku_and_date), items.sku = '1234', orders.order_date = DATE '2011-01-01') |
3149 | |
3150 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02ge.expected' |
3151 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02ge.expected 2012-10-19 19:07:51 +0000 |
3152 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02ge.expected 2013-07-24 22:52:24 +0000 |
3153 | @@ -2,5 +2,5 @@ |
3154 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3155 | Flatten_HKeyOrdered(customers - orders INNER items) |
3156 | Flatten_HKeyOrdered(customers INNER orders) |
3157 | - AncestorLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3158 | + GroupLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3159 | IndexScan_Default(Index(customers.sku_and_date), items.sku = '1234', orders.order_date >= DATE '2011-01-01' ASC) |
3160 | |
3161 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02le.expected' |
3162 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02le.expected 2012-10-19 19:07:51 +0000 |
3163 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02le.expected 2013-07-24 22:52:24 +0000 |
3164 | @@ -2,5 +2,5 @@ |
3165 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3166 | Flatten_HKeyOrdered(customers - orders INNER items) |
3167 | Flatten_HKeyOrdered(customers INNER orders) |
3168 | - AncestorLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3169 | + GroupLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3170 | IndexScan_Default(Index(customers.sku_and_date), items.sku = '1234', orders.order_date <= DATE '2011-01-01' ASC) |
3171 | |
3172 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02lt.expected' |
3173 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02lt.expected 2012-10-19 19:07:51 +0000 |
3174 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02lt.expected 2013-07-24 22:52:24 +0000 |
3175 | @@ -2,5 +2,5 @@ |
3176 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3177 | Flatten_HKeyOrdered(customers - orders INNER items) |
3178 | Flatten_HKeyOrdered(customers INNER orders) |
3179 | - AncestorLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3180 | + GroupLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3181 | IndexScan_Default(Index(customers.sku_and_date), items.sku = '1234', orders.order_date < DATE '2011-01-01' ASC) |
3182 | |
3183 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02r.expected' |
3184 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02r.expected 2012-10-19 19:07:51 +0000 |
3185 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-02r.expected 2013-07-24 22:52:24 +0000 |
3186 | @@ -2,5 +2,5 @@ |
3187 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3188 | Flatten_HKeyOrdered(customers - orders INNER items) |
3189 | Flatten_HKeyOrdered(customers INNER orders) |
3190 | - AncestorLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3191 | + GroupLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3192 | IndexScan_Default(Index(customers.sku_and_date), items.sku = '1234', orders.order_date > DATE '2011-01-01' DESC) |
3193 | |
3194 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-03l.expected' |
3195 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-03l.expected 2012-10-19 19:07:51 +0000 |
3196 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-03l.expected 2013-07-24 22:52:24 +0000 |
3197 | @@ -2,5 +2,5 @@ |
3198 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3199 | Flatten_HKeyOrdered(customers - orders LEFT items) |
3200 | Flatten_HKeyOrdered(customers INNER orders) |
3201 | - AncestorLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3202 | + GroupLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3203 | IndexScan_Default(Index(customers.sku_and_date), items.sku ASC, orders.order_date) |
3204 | |
3205 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-03m.expected' |
3206 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-03m.expected 2012-10-19 19:07:51 +0000 |
3207 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-03m.expected 2013-07-24 22:52:24 +0000 |
3208 | @@ -2,5 +2,5 @@ |
3209 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3210 | Flatten_HKeyOrdered(customers - orders INNER items) |
3211 | Flatten_HKeyOrdered(customers INNER orders) |
3212 | - AncestorLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3213 | + GroupLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3214 | IndexScan_Default(Index(customers.sku_and_date), items.sku DESC, orders.order_date ASC) |
3215 | |
3216 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07o.expected' |
3217 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07o.expected 2012-10-19 19:07:51 +0000 |
3218 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07o.expected 2013-07-24 22:52:24 +0000 |
3219 | @@ -1,4 +1,4 @@ |
3220 | PhysicalSelect[order_date:date[DATE]] |
3221 | Project_Default(orders.order_date) |
3222 | - AncestorLookup_Default(Index(customers.cname_and_sku) -> orders) |
3223 | + GroupLookup_Default(Index(customers.cname_and_sku) -> orders) |
3224 | IndexScan_Default(Index(customers.cname_and_sku), customers.name ASC, items.sku) |
3225 | |
3226 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07oo.expected' |
3227 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07oo.expected 2012-10-19 19:07:51 +0000 |
3228 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07oo.expected 2013-07-24 22:52:24 +0000 |
3229 | @@ -1,4 +1,4 @@ |
3230 | PhysicalSelect[order_date:date[DATE]] |
3231 | Project_Default(orders.order_date) |
3232 | - AncestorLookup_Default(Index(customers.cname_and_sku) -> orders) |
3233 | + GroupLookup_Default(Index(customers.cname_and_sku) -> orders) |
3234 | IndexScan_Default(Index(customers.cname_and_sku), customers.name ASC, items.sku) |
3235 | |
3236 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07ooo.expected' |
3237 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07ooo.expected 2012-10-19 19:07:51 +0000 |
3238 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-07ooo.expected 2013-07-24 22:52:24 +0000 |
3239 | @@ -1,4 +1,4 @@ |
3240 | PhysicalSelect[order_date:date[DATE]] |
3241 | Project_Default(orders.order_date) |
3242 | - AncestorLookup_Default(Index(customers.cname_and_sku) -> orders) |
3243 | + GroupLookup_Default(Index(customers.cname_and_sku) -> orders) |
3244 | IndexScan_Default(Index(customers.cname_and_sku), customers.name ASC, items.sku) |
3245 | |
3246 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-1.expected' |
3247 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-1.expected 2012-10-19 19:07:51 +0000 |
3248 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-1.expected 2013-07-24 22:52:24 +0000 |
3249 | @@ -2,5 +2,5 @@ |
3250 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3251 | Flatten_HKeyOrdered(customers - orders INNER items) |
3252 | Flatten_HKeyOrdered(customers INNER orders) |
3253 | - AncestorLookup_Default(Index(customers.cname_and_sku) -> customers, orders, items) |
3254 | + GroupLookup_Default(Index(customers.cname_and_sku) -> customers, orders, items) |
3255 | IndexScan_Default(Index(customers.cname_and_sku), customers.name = 'Smith', items.sku = '1234') |
3256 | |
3257 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-13.expected' |
3258 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-13.expected 2012-08-29 13:38:58 +0000 |
3259 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-13.expected 2013-07-24 22:52:24 +0000 |
3260 | @@ -2,7 +2,7 @@ |
3261 | Project_Default(orders.order_date, items.sku, items.quan) |
3262 | Flatten_HKeyOrdered(customers - orders INNER items) |
3263 | Flatten_HKeyOrdered(customers INNER orders) |
3264 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
3265 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
3266 | UnionAll_Default() |
3267 | IndexScan_Default(Index(items.sku), sku = '1234', orders.cid ASC, oid, iid) |
3268 | IndexScan_Default(Index(items.sku), sku = '4567', orders.cid ASC, oid, iid) |
3269 | \ No newline at end of file |
3270 | |
3271 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14.expected' |
3272 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14.expected 2012-10-19 19:07:51 +0000 |
3273 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14.expected 2013-07-24 22:52:24 +0000 |
3274 | @@ -3,5 +3,5 @@ |
3275 | ValuesScan_Default(['1234'], ['4567'], ['6666']) |
3276 | Project_Default(orders.order_date, items.sku, items.quan) |
3277 | Flatten_HKeyOrdered(orders INNER items) |
3278 | - AncestorLookup_Default(Index(customers.cname_and_sku) -> orders, items) |
3279 | + GroupLookup_Default(Index(customers.cname_and_sku) -> orders, items) |
3280 | IndexScan_Default(Index(customers.cname_and_sku), customers.name = 'Smith', items.sku = Bound(0, 0)) |
3281 | |
3282 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14p.expected' |
3283 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14p.expected 2012-10-19 19:07:51 +0000 |
3284 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14p.expected 2013-07-24 22:52:24 +0000 |
3285 | @@ -4,5 +4,5 @@ |
3286 | ValuesScan_Default(['1234'], [$1], [$2], [$3]) |
3287 | Project_Default(orders.order_date, items.sku, items.quan) |
3288 | Flatten_HKeyOrdered(orders INNER items) |
3289 | - AncestorLookup_Default(Index(customers.cname_and_sku) -> orders, items) |
3290 | + GroupLookup_Default(Index(customers.cname_and_sku) -> orders, items) |
3291 | IndexScan_Default(Index(customers.cname_and_sku), customers.name = 'Smith', items.sku = Bound(3, 0)) |
3292 | |
3293 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14u.expected' |
3294 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14u.expected 2013-01-09 21:36:37 +0000 |
3295 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-14u.expected 2013-07-24 22:52:24 +0000 |
3296 | @@ -2,7 +2,7 @@ |
3297 | Project_Default(orders.order_date, items.sku, items.quan) |
3298 | Flatten_HKeyOrdered(customers - orders INNER items) |
3299 | Flatten_HKeyOrdered(customers INNER orders) |
3300 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
3301 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
3302 | Intersect_Ordered(skip 1 left, skip 1 right, compare 1) |
3303 | Union_Ordered(all, skip 1, compare 3) |
3304 | Union_Ordered(all, skip 1, compare 3) |
3305 | |
3306 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-15d.expected' |
3307 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-15d.expected 2012-10-19 19:07:51 +0000 |
3308 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-15d.expected 2013-07-24 22:52:24 +0000 |
3309 | @@ -4,5 +4,5 @@ |
3310 | Project_Default(i2.sku) |
3311 | IndexScan_Default(Index(customers.cname_and_sku), customers.name = 'Smith', items.sku) |
3312 | Project_Default(items.iid, items.oid, items.sku, items.quan) |
3313 | - AncestorLookup_Default(Index(items.sku) -> items) |
3314 | + GroupLookup_Default(Index(items.sku) -> items) |
3315 | IndexScan_Default(Index(items.sku), sku = Bound(0, 0), orders.cid, oid, iid) |
3316 | |
3317 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17a.expected' |
3318 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17a.expected 2013-06-06 19:56:32 +0000 |
3319 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17a.expected 2013-07-24 22:52:24 +0000 |
3320 | @@ -4,6 +4,6 @@ |
3321 | Filter_Default(customers - orders - items) |
3322 | Flatten_HKeyOrdered(customers - orders INNER items) |
3323 | Flatten_HKeyOrdered(customers INNER orders) |
3324 | - BranchLookup_Default(customers -> orders) |
3325 | - AncestorLookup_Default(Index(addresses.state) -> customers) |
3326 | + GroupLookup_Default(customers -> orders, items) |
3327 | + GroupLookup_Default(Index(addresses.state) -> customers) |
3328 | IndexScan_Default(Index(addresses.state), state = 'MA') |
3329 | \ No newline at end of file |
3330 | |
3331 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17b.expected' |
3332 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17b.expected 2013-06-06 19:56:32 +0000 |
3333 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17b.expected 2013-07-24 22:52:24 +0000 |
3334 | @@ -6,6 +6,6 @@ |
3335 | Filter_Default(customers - orders - items) |
3336 | Flatten_HKeyOrdered(customers - orders INNER items) |
3337 | Flatten_HKeyOrdered(customers INNER orders) |
3338 | - BranchLookup_Default(customers -> orders) |
3339 | - AncestorLookup_Default(Index(addresses.state) -> customers) |
3340 | + GroupLookup_Default(customers -> orders, items) |
3341 | + GroupLookup_Default(Index(addresses.state) -> customers) |
3342 | IndexScan_Default(Index(addresses.state), state = Bound(0, 0)) |
3343 | \ No newline at end of file |
3344 | |
3345 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17bu.expected' |
3346 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17bu.expected 2013-07-17 21:00:35 +0000 |
3347 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-17bu.expected 2013-07-24 22:52:24 +0000 |
3348 | @@ -3,7 +3,7 @@ |
3349 | Sort_General(items.quan DESC) |
3350 | Map_NestedLoops() |
3351 | Flatten_HKeyOrdered(customers INNER addresses) |
3352 | - AncestorLookup_Default(Index(addresses.state) -> customers, addresses) |
3353 | + GroupLookup_Default(Index(addresses.state) -> customers, addresses) |
3354 | UnionAll_Default() |
3355 | UnionAll_Default() |
3356 | IndexScan_Default(Index(addresses.state), state = 'MA', cid ASC, aid) |
3357 | |
3358 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-2.expected' |
3359 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-2.expected 2012-10-19 19:07:51 +0000 |
3360 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-2.expected 2013-07-24 22:52:24 +0000 |
3361 | @@ -2,5 +2,5 @@ |
3362 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3363 | Flatten_HKeyOrdered(customers - orders INNER items) |
3364 | Flatten_HKeyOrdered(customers INNER orders) |
3365 | - AncestorLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3366 | + GroupLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3367 | IndexScan_Default(Index(customers.sku_and_date), items.sku = '1234', orders.order_date > DATE '2011-01-01' ASC) |
3368 | |
3369 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-20.expected' |
3370 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-20.expected 2012-08-29 13:38:58 +0000 |
3371 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-20.expected 2013-07-24 22:52:24 +0000 |
3372 | @@ -7,5 +7,5 @@ |
3373 | GroupScan_Default(customers) |
3374 | Project_Default(i2.sku) |
3375 | Select_HKeyOrdered(i1.quan == (i2.quan * 10)) |
3376 | - AncestorLookup_Default(Index(items.sku) -> items) |
3377 | + GroupLookup_Default(Index(items.sku) -> items) |
3378 | IndexScan_Default(Index(items.sku), sku = customers.name) |
3379 | \ No newline at end of file |
3380 | |
3381 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-20.t3expected' |
3382 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-20.t3expected 2012-10-02 13:14:54 +0000 |
3383 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-20.t3expected 2013-07-24 22:52:24 +0000 |
3384 | @@ -7,5 +7,5 @@ |
3385 | GroupScan_Default(customers) |
3386 | Project_Default(i2.sku) |
3387 | Select_HKeyOrdered(i1.quan == (i2.quan * 10)) |
3388 | - AncestorLookup_Default(Index(items.sku) -> items) |
3389 | + GroupLookup_Default(Index(items.sku) -> items) |
3390 | IndexScan_Default(Index(items.sku), sku = customers.name) |
3391 | \ No newline at end of file |
3392 | |
3393 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-3.expected' |
3394 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-3.expected 2012-10-19 19:07:51 +0000 |
3395 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-group-index/select-3.expected 2013-07-24 22:52:24 +0000 |
3396 | @@ -2,5 +2,5 @@ |
3397 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3398 | Flatten_HKeyOrdered(customers - orders INNER items) |
3399 | Flatten_HKeyOrdered(customers INNER orders) |
3400 | - AncestorLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3401 | + GroupLookup_Default(Index(customers.sku_and_date) -> customers, orders, items) |
3402 | IndexScan_Default(Index(customers.sku_and_date), items.sku ASC, orders.order_date) |
3403 | |
3404 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-1.expected' |
3405 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-1.expected 2013-03-06 16:01:20 +0000 |
3406 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-1.expected 2013-07-24 22:52:24 +0000 |
3407 | @@ -1,4 +1,4 @@ |
3408 | PhysicalSelect[cid:int[INT], name:varchar(32)[VARCHAR]] |
3409 | Project_Default(customers.cid, customers.name) |
3410 | - AncestorLookup_Default(HKey -> customers) |
3411 | + GroupLookup_Default(HKey -> customers) |
3412 | IndexScan_FullText(test.customers.cust_ft, name:"john smith") |
3413 | \ No newline at end of file |
3414 | |
3415 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-1v.expected' |
3416 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-1v.expected 2013-03-06 16:01:20 +0000 |
3417 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-1v.expected 2013-07-24 22:52:24 +0000 |
3418 | @@ -1,4 +1,4 @@ |
3419 | PhysicalSelect[null][cid:int[INT], name:varchar(32)[VARCHAR]] |
3420 | Project_Default(customers.cid, customers.name) |
3421 | - AncestorLookup_Default(HKey -> customers) |
3422 | + GroupLookup_Default(HKey -> customers) |
3423 | IndexScan_FullText(test.customers.cust_ft, $1) |
3424 | \ No newline at end of file |
3425 | |
3426 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2.expected' |
3427 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2.expected 2013-07-17 21:00:35 +0000 |
3428 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2.expected 2013-07-24 22:52:24 +0000 |
3429 | @@ -3,7 +3,7 @@ |
3430 | Map_NestedLoops() |
3431 | Filter_Default(customers - addresses) |
3432 | Flatten_HKeyOrdered(customers INNER addresses) |
3433 | - BranchLookup_Default(HKey -> customers) |
3434 | + GroupLookup_Default(HKey -> customers, addresses) |
3435 | IndexScan_FullText(test.customers.cust_ft, +state:MA +sku:1234) |
3436 | Product_Nested(customers - addresses x customers - orders - items) |
3437 | Filter_Default(customers - orders - items) |
3438 | |
3439 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2n.expected' |
3440 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2n.expected 2013-07-17 21:00:35 +0000 |
3441 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2n.expected 2013-07-24 22:52:24 +0000 |
3442 | @@ -3,7 +3,7 @@ |
3443 | Map_NestedLoops() |
3444 | Filter_Default(customers - addresses) |
3445 | Flatten_HKeyOrdered(customers INNER addresses) |
3446 | - BranchLookup_Default(HKey -> customers) |
3447 | + GroupLookup_Default(HKey -> customers, addresses) |
3448 | IndexScan_FullText(test.customers.cust_ft, -state:MA +sku:1234) |
3449 | Product_Nested(customers - addresses x customers - orders - items) |
3450 | Filter_Default(customers - orders - items) |
3451 | |
3452 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2v.expected' |
3453 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2v.expected 2013-07-17 21:00:35 +0000 |
3454 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-2v.expected 2013-07-24 22:52:24 +0000 |
3455 | @@ -3,7 +3,7 @@ |
3456 | Map_NestedLoops() |
3457 | Filter_Default(customers - addresses) |
3458 | Flatten_HKeyOrdered(customers INNER addresses) |
3459 | - BranchLookup_Default(HKey -> customers) |
3460 | + GroupLookup_Default(HKey -> customers, addresses) |
3461 | IndexScan_FullText(test.customers.cust_ft, TERM($1), TERM($2)) |
3462 | Product_Nested(customers - addresses x customers - orders - items) |
3463 | Filter_Default(customers - orders - items) |
3464 | |
3465 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-3.expected' |
3466 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-3.expected 2013-03-06 16:01:20 +0000 |
3467 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-3.expected 2013-07-24 22:52:24 +0000 |
3468 | @@ -1,5 +1,5 @@ |
3469 | PhysicalSelect[cid:int[INT], name:varchar(32)[VARCHAR]] |
3470 | Project_Default(customers.cid, customers.name) |
3471 | Select_HKeyOrdered(in(customers.cid, 1, 2, 3)) |
3472 | - AncestorLookup_Default(HKey -> customers) |
3473 | + GroupLookup_Default(HKey -> customers) |
3474 | IndexScan_FullText(test.customers.cust_ft, name:john) |
3475 | \ No newline at end of file |
3476 | |
3477 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-join.expected' |
3478 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-join.expected 2013-03-06 16:01:20 +0000 |
3479 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia-text-index/full-text-join.expected 2013-07-24 22:52:24 +0000 |
3480 | @@ -1,8 +1,8 @@ |
3481 | PhysicalSelect[cid:int[INT], name:varchar(32)[VARCHAR], id:int[INT], name:varchar(256)[VARCHAR], state:char(2)[VARCHAR]] |
3482 | Map_NestedLoops() |
3483 | - AncestorLookup_Default(HKey -> customers) |
3484 | + GroupLookup_Default(HKey -> customers) |
3485 | IndexScan_FullText(test.customers.cust_ft, name:john) |
3486 | Project_Default(customers.cid, customers.name, parent.id, parent.name, parent.state) |
3487 | Select_HKeyOrdered(parent.name == 'X') |
3488 | - AncestorLookup_Default(Index(parent.PRIMARY) -> parent) |
3489 | + GroupLookup_Default(Index(parent.PRIMARY) -> parent) |
3490 | IndexScan_Default(Index(parent.PRIMARY), id = customers.cid) |
3491 | \ No newline at end of file |
3492 | |
3493 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia/select-1.expected' |
3494 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia/select-1.expected 2012-08-26 04:29:21 +0000 |
3495 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia/select-1.expected 2013-07-24 22:52:24 +0000 |
3496 | @@ -2,6 +2,6 @@ |
3497 | Project_Default(customers.name, orders.order_date) |
3498 | Filter_Default(customers - orders) |
3499 | Flatten_HKeyOrdered(customers INNER orders) |
3500 | - BranchLookup_Default(customers -> orders) |
3501 | - AncestorLookup_Default(Index(addresses.state) -> customers) |
3502 | + GroupLookup_Default(customers -> orders) |
3503 | + GroupLookup_Default(Index(addresses.state) -> customers) |
3504 | IndexScan_Default(Index(addresses.state), state = 'MA') |
3505 | \ No newline at end of file |
3506 | |
3507 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia/select-2.expected' |
3508 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia/select-2.expected 2013-07-17 21:00:35 +0000 |
3509 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia/select-2.expected 2013-07-24 22:52:24 +0000 |
3510 | @@ -2,7 +2,7 @@ |
3511 | Project_Default(customers.name, orders.order_date, addresses.city) |
3512 | Map_NestedLoops() |
3513 | Flatten_HKeyOrdered(customers INNER addresses) |
3514 | - AncestorLookup_Default(Index(addresses.state) -> customers, addresses) |
3515 | + GroupLookup_Default(Index(addresses.state) -> customers, addresses) |
3516 | IndexScan_Default(Index(addresses.state), state = 'MA') |
3517 | Product_Nested(customers - addresses x customers - orders) |
3518 | Filter_Default(customers - orders) |
3519 | |
3520 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia/select-3.expected' |
3521 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia/select-3.expected 2012-08-26 04:29:21 +0000 |
3522 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia/select-3.expected 2013-07-24 22:52:24 +0000 |
3523 | @@ -2,6 +2,6 @@ |
3524 | Project_Default(customers.cid, orders.order_date) |
3525 | Filter_Default(customers - orders) |
3526 | Flatten_HKeyOrdered(customers INNER orders) |
3527 | - BranchLookup_Default(customers -> orders) |
3528 | - AncestorLookup_Default(Index(addresses.state) -> customers) |
3529 | + GroupLookup_Default(customers -> orders) |
3530 | + GroupLookup_Default(Index(addresses.state) -> customers) |
3531 | IndexScan_Default(Index(addresses.state), state = 'MA') |
3532 | \ No newline at end of file |
3533 | |
3534 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia/select-4.expected' |
3535 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia/select-4.expected 2012-08-26 04:29:21 +0000 |
3536 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia/select-4.expected 2013-07-24 22:52:24 +0000 |
3537 | @@ -3,6 +3,6 @@ |
3538 | Filter_Default(customers - orders - items) |
3539 | Flatten_HKeyOrdered(customers - orders INNER items) |
3540 | Flatten_HKeyOrdered(customers INNER orders) |
3541 | - BranchLookup_Default(customers -> orders) |
3542 | - AncestorLookup_Default(Index(addresses.state) -> customers) |
3543 | + GroupLookup_Default(customers -> orders, items) |
3544 | + GroupLookup_Default(Index(addresses.state) -> customers) |
3545 | IndexScan_Default(Index(addresses.state), state = 'MA') |
3546 | \ No newline at end of file |
3547 | |
3548 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia/select-5.expected' |
3549 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia/select-5.expected 2013-07-17 21:00:35 +0000 |
3550 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia/select-5.expected 2013-07-24 22:52:24 +0000 |
3551 | @@ -3,7 +3,7 @@ |
3552 | Map_NestedLoops() |
3553 | Filter_Default(customers - addresses) |
3554 | Flatten_HKeyOrdered(customers INNER addresses) |
3555 | - BranchLookup_Default(Index(customers.name) -> customers) |
3556 | + GroupLookup_Default(Index(customers.name) -> customers, addresses) |
3557 | IndexScan_Default(Index(customers.name), name = 'IBM') |
3558 | Product_Nested(customers - addresses x customers - orders) |
3559 | Filter_Default(customers - orders) |
3560 | |
3561 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia/select-6.expected' |
3562 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia/select-6.expected 2013-07-17 21:00:35 +0000 |
3563 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia/select-6.expected 2013-07-24 22:52:24 +0000 |
3564 | @@ -2,7 +2,7 @@ |
3565 | Project_Default(customers.name, orders.order_date, addresses.state) |
3566 | Map_NestedLoops() |
3567 | Flatten_HKeyOrdered(customers INNER orders) |
3568 | - AncestorLookup_Default(Index(orders.order_date) -> customers, orders) |
3569 | + GroupLookup_Default(Index(orders.order_date) -> customers, orders) |
3570 | IndexScan_Default(Index(orders.order_date), order_date > DATE '2011-01-01') |
3571 | Product_Nested(customers - orders x customers - addresses) |
3572 | Filter_Default(customers - addresses) |
3573 | |
3574 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/coia/select-7.expected' |
3575 | --- src/test/resources/com/akiban/sql/optimizer/operator/coia/select-7.expected 2013-07-17 21:00:35 +0000 |
3576 | +++ src/test/resources/com/akiban/sql/optimizer/operator/coia/select-7.expected 2013-07-24 22:52:24 +0000 |
3577 | @@ -4,9 +4,8 @@ |
3578 | Filter_Default(customers - orders - items) |
3579 | Flatten_HKeyOrdered(customers - orders INNER items) |
3580 | Flatten_HKeyOrdered(customers INNER orders) |
3581 | - AncestorLookup_Default(orders -> customers) |
3582 | - BranchLookup_Default(Index(orders.order_date) -> orders) |
3583 | - IndexScan_Default(Index(orders.order_date), order_date > DATE '2011-01-01') |
3584 | + GroupLookup_Default(Index(orders.order_date) -> customers, orders, items) |
3585 | + IndexScan_Default(Index(orders.order_date), order_date > DATE '2011-01-01') |
3586 | Product_Nested(customers - orders - items x customers - addresses) |
3587 | Filter_Default(customers - addresses) |
3588 | Flatten_HKeyOrdered(customers INNER addresses) |
3589 | |
3590 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/histograms/select-1.expected' |
3591 | --- src/test/resources/com/akiban/sql/optimizer/operator/histograms/select-1.expected 2013-06-06 19:56:32 +0000 |
3592 | +++ src/test/resources/com/akiban/sql/optimizer/operator/histograms/select-1.expected 2013-07-24 22:52:24 +0000 |
3593 | @@ -1,5 +1,5 @@ |
3594 | PhysicalSelect[id:int[INT], x:int[INT], y:int[INT], z:int[INT]] |
3595 | Project_Default(t.id, t.x, t.y, t.z) |
3596 | Sort_General(t.z ASC) |
3597 | - AncestorLookup_Default(Index(t.idx_txy) -> t) |
3598 | + GroupLookup_Default(Index(t.idx_txy) -> t) |
3599 | IndexScan_Default(Index(t.idx_txy), x = 0, y = 0, id) |
3600 | |
3601 | === modified file 'src/test/resources/com/akiban/sql/optimizer/operator/histograms/select-2.expected' |
3602 | --- src/test/resources/com/akiban/sql/optimizer/operator/histograms/select-2.expected 2013-01-02 14:53:59 +0000 |
3603 | +++ src/test/resources/com/akiban/sql/optimizer/operator/histograms/select-2.expected 2013-07-24 22:52:24 +0000 |
3604 | @@ -1,5 +1,5 @@ |
3605 | PhysicalSelect[id:int[INT], x:int[INT], y:int[INT], z:int[INT]] |
3606 | Project_Default(t.id, t.x, t.y, t.z) |
3607 | Select_HKeyOrdered((t.x == 0) AND (t.y == 1)) |
3608 | - AncestorLookup_Default(Index(t.idx_tz) -> t) |
3609 | + GroupLookup_Default(Index(t.idx_tz) -> t) |
3610 | IndexScan_Default(Index(t.idx_tz), z ASC, id) |
3611 | |
3612 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02n.expected' |
3613 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02n.expected 2013-06-06 19:56:32 +0000 |
3614 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02n.expected 2013-07-24 22:52:24 +0000 |
3615 | @@ -5,5 +5,5 @@ |
3616 | Project_Default(Field(1), 1) |
3617 | Filter_Default(test.customers - test.orders) |
3618 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3619 | - BranchLookup_Default(Index(test.customers.name) -> test.customers) |
3620 | + GroupLookup_Default(Index(test.customers.name) -> test.customers, test.orders) |
3621 | IndexScan_Default(Index(test.customers.name), name ASC, cid) |
3622 | \ No newline at end of file |
3623 | |
3624 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02n.t3expected' |
3625 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02n.t3expected 2013-06-06 19:56:32 +0000 |
3626 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02n.t3expected 2013-07-24 22:52:24 +0000 |
3627 | @@ -5,5 +5,5 @@ |
3628 | Project_Default(Field(1), 1) |
3629 | Filter_Default(test.customers - test.orders) |
3630 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3631 | - BranchLookup_Default(Index(test.customers.name) -> test.customers) |
3632 | + GroupLookup_Default(Index(test.customers.name) -> test.customers, test.orders) |
3633 | IndexScan_Default(Index(test.customers.name), name ASC, cid) |
3634 | \ No newline at end of file |
3635 | |
3636 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02s.expected' |
3637 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02s.expected 2012-08-29 13:38:58 +0000 |
3638 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02s.expected 2013-07-24 22:52:24 +0000 |
3639 | @@ -4,5 +4,5 @@ |
3640 | Project_Default(Field(1), 1) |
3641 | Filter_Default(test.customers - test.orders) |
3642 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3643 | - BranchLookup_Default(Index(test.customers.name) -> test.customers) |
3644 | + GroupLookup_Default(Index(test.customers.name) -> test.customers, test.orders) |
3645 | IndexScan_Default(Index(test.customers.name), name ASC, cid) |
3646 | \ No newline at end of file |
3647 | |
3648 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02s.t3expected' |
3649 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02s.t3expected 2012-10-13 01:58:10 +0000 |
3650 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-02s.t3expected 2013-07-24 22:52:24 +0000 |
3651 | @@ -4,5 +4,5 @@ |
3652 | Project_Default(Field(1), 1) |
3653 | Filter_Default(test.customers - test.orders) |
3654 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3655 | - BranchLookup_Default(Index(test.customers.name) -> test.customers) |
3656 | + GroupLookup_Default(Index(test.customers.name) -> test.customers, test.orders) |
3657 | IndexScan_Default(Index(test.customers.name), name ASC, cid) |
3658 | \ No newline at end of file |
3659 | |
3660 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-1.expected' |
3661 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-1.expected 2012-08-26 04:58:42 +0000 |
3662 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-1.expected 2013-07-24 22:52:24 +0000 |
3663 | @@ -4,5 +4,5 @@ |
3664 | Project_Default(Field(1), Field(4), Field(4)) |
3665 | Filter_Default(test.customers - test.orders) |
3666 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3667 | - BranchLookup_Default(Index(test.customers.name) -> test.customers) |
3668 | + GroupLookup_Default(Index(test.customers.name) -> test.customers, test.orders) |
3669 | IndexScan_Default(Index(test.customers.name), name ASC, cid) |
3670 | \ No newline at end of file |
3671 | |
3672 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-2.expected' |
3673 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-2.expected 2012-08-26 04:58:42 +0000 |
3674 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-2.expected 2013-07-24 22:52:24 +0000 |
3675 | @@ -4,5 +4,5 @@ |
3676 | Project_Default(Field(1), 1) |
3677 | Filter_Default(test.customers - test.orders) |
3678 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3679 | - BranchLookup_Default(Index(test.customers.name) -> test.customers) |
3680 | + GroupLookup_Default(Index(test.customers.name) -> test.customers, test.orders) |
3681 | IndexScan_Default(Index(test.customers.name), name ASC, cid) |
3682 | \ No newline at end of file |
3683 | |
3684 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-2.t3expected' |
3685 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-2.t3expected 2012-10-13 01:58:10 +0000 |
3686 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/aggregate-2.t3expected 2013-07-24 22:52:24 +0000 |
3687 | @@ -4,5 +4,5 @@ |
3688 | Project_Default(Field(1), 1) |
3689 | Filter_Default(test.customers - test.orders) |
3690 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3691 | - BranchLookup_Default(Index(test.customers.name) -> test.customers) |
3692 | + GroupLookup_Default(Index(test.customers.name) -> test.customers, test.orders) |
3693 | IndexScan_Default(Index(test.customers.name), name ASC, cid) |
3694 | \ No newline at end of file |
3695 | |
3696 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/full-text-1.expected' |
3697 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/full-text-1.expected 2013-03-06 16:01:20 +0000 |
3698 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/full-text-1.expected 2013-07-24 22:52:24 +0000 |
3699 | @@ -1,4 +1,4 @@ |
3700 | PhysicalSelect@46866232[cid, name] |
3701 | Project_Default(Field(0), Field(1)) |
3702 | - AncestorLookup_Default(HKey -> test.customers) |
3703 | + GroupLookup_Default(HKey -> test.customers) |
3704 | IndexScan_FullText(test.customers.cust_ft, name:john) |
3705 | \ No newline at end of file |
3706 | |
3707 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/full-text-2.expected' |
3708 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/full-text-2.expected 2013-07-17 21:00:35 +0000 |
3709 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/full-text-2.expected 2013-07-24 22:52:24 +0000 |
3710 | @@ -3,7 +3,7 @@ |
3711 | Map_NestedLoops() |
3712 | Filter_Default(test.customers - test.addresses) |
3713 | Flatten_HKeyOrdered(test.customers INNER test.addresses) |
3714 | - BranchLookup_Default(HKey -> test.customers) |
3715 | + GroupLookup_Default(HKey -> test.customers, test.addresses) |
3716 | IndexScan_FullText(test.customers.cust_ft, +state:MA +sku:1234) |
3717 | Product_Nested(test.customers - test.addresses x test.customers - test.orders - test.items) |
3718 | Filter_Default(test.customers - test.orders - test.items) |
3719 | |
3720 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-1.expected' |
3721 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-1.expected 2012-08-29 13:38:58 +0000 |
3722 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-1.expected 2013-07-24 22:52:24 +0000 |
3723 | @@ -4,5 +4,5 @@ |
3724 | Project_Default(DISTANCE_LAT_LON(Field(0), Field(1), 42.3583, -71.0603)) |
3725 | Limit_Default(10) |
3726 | Project_Default(Field(3), Field(4)) |
3727 | - AncestorLookup_Default(Index(test.places.places_geo) -> test.places) |
3728 | + GroupLookup_Default(Index(test.places.places_geo) -> test.places) |
3729 | IndexScan_Default(Index(test.places.places_geo), (lat, lon) ZNEAR(42.3583, -71.0603)) |
3730 | \ No newline at end of file |
3731 | |
3732 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-2.expected' |
3733 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-2.expected 2013-06-06 19:56:32 +0000 |
3734 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-2.expected 2013-07-24 22:52:24 +0000 |
3735 | @@ -2,5 +2,5 @@ |
3736 | Project_Default(Field(2), Field(1)) |
3737 | Sort_General(DISTANCE_LAT_LON(Field(3), Field(4), 42.3583, -71.0603) ASC) |
3738 | Select_HKeyOrdered(DISTANCE_LAT_LON(Field(3), Field(4), 42.3583, -71.0603) <= 0.0466) |
3739 | - AncestorLookup_Default(Index(test.places.places_geo) -> test.places) |
3740 | + GroupLookup_Default(Index(test.places.places_geo) -> test.places) |
3741 | IndexScan_Default(Index(test.places.places_geo), (lat, lon) BETWEEN (42.3583 - 0.0466, -71.0603 - 0.0466) AND (42.3583 + 0.0466, -71.0603 + 0.0466)) |
3742 | \ No newline at end of file |
3743 | |
3744 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-2.t3expected' |
3745 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-2.t3expected 2013-06-06 19:56:32 +0000 |
3746 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-2.t3expected 2013-07-24 22:52:24 +0000 |
3747 | @@ -2,5 +2,5 @@ |
3748 | Project_Default(Field(2), Field(1)) |
3749 | Sort_General(DISTANCE_LAT_LON(Field(3), Field(4), 42.3583, -71.0603) ASC) |
3750 | Select_HKeyOrdered(DISTANCE_LAT_LON(Field(3), Field(4), 42.3583, -71.0603) <= 4.660000e-02) |
3751 | - AncestorLookup_Default(Index(test.places.places_geo) -> test.places) |
3752 | + GroupLookup_Default(Index(test.places.places_geo) -> test.places) |
3753 | IndexScan_Default(Index(test.places.places_geo), (lat, lon) BETWEEN (42.3117, -71.1069) AND (42.4049, -71.0137)) |
3754 | \ No newline at end of file |
3755 | |
3756 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-5.expected' |
3757 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-5.expected 2013-06-06 19:56:32 +0000 |
3758 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-5.expected 2013-07-24 22:52:24 +0000 |
3759 | @@ -2,5 +2,5 @@ |
3760 | Project_Default(Field(2), Field(1)) |
3761 | Sort_General(DISTANCE_LAT_LON(Field(3), Field(4), 42.3583, -71.0603) ASC) |
3762 | Select_HKeyOrdered(DISTANCE_LAT_LON(Field(3), Field(4), 42.3583, -71.0603) <= 3.600000e+02) |
3763 | - AncestorLookup_Default(Index(test.places.places_geo) -> test.places) |
3764 | + GroupLookup_Default(Index(test.places.places_geo) -> test.places) |
3765 | IndexScan_Default(Index(test.places.places_geo), (lat, lon) BETWEEN (-317.6417, -431.0603) AND (402.3583, 288.9397)) |
3766 | \ No newline at end of file |
3767 | |
3768 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-5.t3expected' |
3769 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-5.t3expected 2013-06-06 19:56:32 +0000 |
3770 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/geospatial-5.t3expected 2013-07-24 22:52:24 +0000 |
3771 | @@ -2,5 +2,5 @@ |
3772 | Project_Default(Field(2), Field(1)) |
3773 | Sort_General(DISTANCE_LAT_LON(Field(3), Field(4), 42.3583, -71.0603) ASC) |
3774 | Select_HKeyOrdered(DISTANCE_LAT_LON(Field(3), Field(4), 42.3583, -71.0603) <= 3.600000e+02) |
3775 | - AncestorLookup_Default(Index(test.places.places_geo) -> test.places) |
3776 | + GroupLookup_Default(Index(test.places.places_geo) -> test.places) |
3777 | IndexScan_Default(Index(test.places.places_geo), (lat, lon) BETWEEN (-317.6417, -431.0603) AND (402.3583, 288.9397)) |
3778 | \ No newline at end of file |
3779 | |
3780 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10.expected' |
3781 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10.expected 2012-08-28 17:43:48 +0000 |
3782 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10.expected 2013-07-24 22:52:24 +0000 |
3783 | @@ -1,10 +1,10 @@ |
3784 | PhysicalSelect@1f9f0f2[name, order_date, name] |
3785 | Map_NestedLoops() |
3786 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3787 | - AncestorLookup_Default(Index(test.orders.order_date) -> test.customers, test.orders) |
3788 | + GroupLookup_Default(Index(test.orders.order_date) -> test.customers, test.orders) |
3789 | IndexScan_Default(Index(test.orders.order_date), order_date > CAST('2011-01-01' AS DATE) ASC, cid, oid) |
3790 | Project_Default(Bound(0, 1), Bound(0, 4), Field(2)) |
3791 | Select_HKeyOrdered(Field(2) != 'Smith') |
3792 | Filter_Default(test.child) |
3793 | - BranchLookup_Default(Index(test.parent.name) -> test.parent) |
3794 | + GroupLookup_Default(Index(test.parent.name) -> test.child) |
3795 | IndexScan_Default(Index(test.parent.name), name = Bound(0, 1), id ASC) |
3796 | \ No newline at end of file |
3797 | |
3798 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10.t3expected' |
3799 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10.t3expected 2012-10-13 01:58:10 +0000 |
3800 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10.t3expected 2013-07-24 22:52:24 +0000 |
3801 | @@ -1,10 +1,10 @@ |
3802 | PhysicalSelect@53ecb4e2[name, order_date, name] |
3803 | Map_NestedLoops() |
3804 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3805 | - AncestorLookup_Default(Index(test.orders.order_date) -> test.customers, test.orders) |
3806 | + GroupLookup_Default(Index(test.orders.order_date) -> test.customers, test.orders) |
3807 | IndexScan_Default(Index(test.orders.order_date), order_date > DATE '2011-01-01' ASC, cid, oid) |
3808 | Project_Default(Bound(0, 1), Bound(0, 4), Field(2)) |
3809 | Select_HKeyOrdered(Field(2) != 'Smith') |
3810 | Filter_Default(test.child) |
3811 | - BranchLookup_Default(Index(test.parent.name) -> test.parent) |
3812 | + GroupLookup_Default(Index(test.parent.name) -> test.child) |
3813 | IndexScan_Default(Index(test.parent.name), name = Bound(0, 1), id ASC) |
3814 | \ No newline at end of file |
3815 | |
3816 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10n.expected' |
3817 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10n.expected 2012-08-28 17:43:48 +0000 |
3818 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10n.expected 2013-07-24 22:52:24 +0000 |
3819 | @@ -9,5 +9,5 @@ |
3820 | Select_HKeyOrdered(Field(4) > CAST('2011-01-01' AS DATE)) |
3821 | Filter_Default(test.customers - test.orders) |
3822 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3823 | - BranchLookup_Default(Index(test.customers.name) -> test.customers) |
3824 | + GroupLookup_Default(Index(test.customers.name) -> test.customers, test.orders) |
3825 | IndexScan_Default(Index(test.customers.name), name = Bound(1, 0), cid ASC) |
3826 | \ No newline at end of file |
3827 | |
3828 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10n.t3expected' |
3829 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10n.t3expected 2012-10-13 01:58:10 +0000 |
3830 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/select-10n.t3expected 2013-07-24 22:52:24 +0000 |
3831 | @@ -9,5 +9,5 @@ |
3832 | Select_HKeyOrdered(Field(4) > DATE '2011-01-01') |
3833 | Filter_Default(test.customers - test.orders) |
3834 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3835 | - BranchLookup_Default(Index(test.customers.name) -> test.customers) |
3836 | + GroupLookup_Default(Index(test.customers.name) -> test.customers, test.orders) |
3837 | IndexScan_Default(Index(test.customers.name), name = Bound(1, 0), cid ASC) |
3838 | \ No newline at end of file |
3839 | |
3840 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/select-2.expected' |
3841 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/select-2.expected 2012-10-19 18:23:34 +0000 |
3842 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/select-2.expected 2013-07-24 22:52:24 +0000 |
3843 | @@ -2,5 +2,5 @@ |
3844 | Project_Default(Field(0), Field(1), Field(2), Field(3), Field(4), Field(5), Field(6), Field(7), Field(8), Field(9)) |
3845 | Flatten_HKeyOrdered(test.customers - test.orders INNER test.items) |
3846 | Flatten_HKeyOrdered(test.customers INNER test.orders) |
3847 | - AncestorLookup_Default(Index(test.customers.cname_and_sku) -> test.customers, test.orders, test.items) |
3848 | + GroupLookup_Default(Index(test.customers.cname_and_sku) -> test.customers, test.orders, test.items) |
3849 | IndexScan_Default(Index(test.customers.cname_and_sku), customers.name = 'Smith', items.sku = '1234', customers.cid ASC, orders.oid, items.iid) |
3850 | |
3851 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/select-3.expected' |
3852 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/select-3.expected 2012-08-26 04:55:19 +0000 |
3853 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/select-3.expected 2013-07-24 22:52:24 +0000 |
3854 | @@ -2,6 +2,6 @@ |
3855 | Project_Default(Field(1), Field(4)) |
3856 | Filter_Default(test.customers - test.orders) |
3857 | Flatten_HKeyOrdered(test.customers LEFT test.orders) |
3858 | - BranchLookup_Default(test.customers -> test.orders) |
3859 | - AncestorLookup_Default(Index(test.addresses.state) -> test.customers) |
3860 | + GroupLookup_Default(test.customers -> test.orders) |
3861 | + GroupLookup_Default(Index(test.addresses.state) -> test.customers) |
3862 | IndexScan_Default(Index(test.addresses.state), state = 'MA', cid ASC, aid) |
3863 | \ No newline at end of file |
3864 | |
3865 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/select-5.expected' |
3866 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/select-5.expected 2013-07-17 21:00:35 +0000 |
3867 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/select-5.expected 2013-07-24 22:52:24 +0000 |
3868 | @@ -3,7 +3,7 @@ |
3869 | Map_NestedLoops() |
3870 | Filter_Default(test.customers - test.addresses) |
3871 | Flatten_HKeyOrdered(test.customers INNER test.addresses) |
3872 | - BranchLookup_Default(Index(test.customers.name) -> test.customers) |
3873 | + GroupLookup_Default(Index(test.customers.name) -> test.customers, test.addresses) |
3874 | IndexScan_Default(Index(test.customers.name), name = 'IBM', cid ASC) |
3875 | Product_Nested(test.customers - test.addresses x test.customers - test.orders) |
3876 | Filter_Default(test.customers - test.orders) |
3877 | |
3878 | === modified file 'src/test/resources/com/akiban/sql/optimizer/rule/operator/update-1.expected' |
3879 | --- src/test/resources/com/akiban/sql/optimizer/rule/operator/update-1.expected 2012-09-26 02:13:46 +0000 |
3880 | +++ src/test/resources/com/akiban/sql/optimizer/rule/operator/update-1.expected 2013-07-24 22:52:24 +0000 |
3881 | @@ -1,4 +1,4 @@ |
3882 | PhysicalUpdate@3b58f1fa |
3883 | Update_Returning() |
3884 | - AncestorLookup_Default(Index(test.items.sku) -> test.items) |
3885 | + GroupLookup_Default(Index(test.items.sku) -> test.items) |
3886 | IndexScan_Default(Index(test.items.sku), sku = 'ABCD', orders.cid ASC, oid, iid) |
3887 | \ No newline at end of file |
3888 | |
3889 | === modified file 'src/test/resources/com/akiban/sql/pg/select/explain-2.expected' |
3890 | --- src/test/resources/com/akiban/sql/pg/select/explain-2.expected 2012-08-26 05:37:38 +0000 |
3891 | +++ src/test/resources/com/akiban/sql/pg/select/explain-2.expected 2013-07-24 22:52:24 +0000 |
3892 | @@ -2,5 +2,5 @@ |
3893 | Project_Default(customers.name, orders.order_date, items.sku, items.quan) |
3894 | Flatten_HKeyOrdered(customers - orders INNER items) |
3895 | Flatten_HKeyOrdered(customers INNER orders) |
3896 | - AncestorLookup_Default(Index(items.sku) -> customers, orders, items) |
3897 | + GroupLookup_Default(Index(items.sku) -> customers, orders, items) |
3898 | IndexScan_Default(Index(items.sku), sku < '8888') |
3899 | |
3900 | === modified file 'src/test/resources/com/akiban/sql/pg/yaml/functional/test-statement-cache.yaml' |
3901 | --- src/test/resources/com/akiban/sql/pg/yaml/functional/test-statement-cache.yaml 2013-04-30 23:22:52 +0000 |
3902 | +++ src/test/resources/com/akiban/sql/pg/yaml/functional/test-statement-cache.yaml 2013-07-24 22:52:24 +0000 |
3903 | @@ -68,7 +68,7 @@ |
3904 | --- |
3905 | - Statement: EXPLAIN SELECT id FROM t WHERE s = ? |
3906 | - output: [['Project_Default(t.id)'], |
3907 | - [' AncestorLookup_Default(Index(t.t_s) -> t)'], |
3908 | + [' GroupLookup_Default(Index(t.t_s) -> t)'], |
3909 | [' IndexScan_Default(Index(t.t_s), s = $1)']] |
3910 | --- |
3911 | - JMX: com.akiban:type=PostgresServer |
3912 | @@ -85,7 +85,7 @@ |
3913 | --- |
3914 | - Statement: EXPLAIN SELECT id FROM t WHERE s = ? |
3915 | - output: [['Project_Default(t.id)'], |
3916 | - [' AncestorLookup_Default(Index(t.t_s) -> t)'], |
3917 | + [' GroupLookup_Default(Index(t.t_s) -> t)'], |
3918 | [' IndexScan_Default(Index(t.t_s), s = $1)']] |
3919 | --- |
3920 | - Statement: SELECT id FROM t WHERE s = 1 |
There's quite a bit here but it looks as expected.
Jenkins will surely tell us if newRowCollector is broken.