Merge lp:~mmcm/akiban-server/operator-pipeline-options into lp:~akiban-technologies/akiban-server/trunk

Proposed by Mike McMahon
Status: Merged
Approved by: Nathan Williams
Approved revision: 2732
Merged at revision: 2694
Proposed branch: lp:~mmcm/akiban-server/operator-pipeline-options
Merge into: lp:~akiban-technologies/akiban-server/trunk
Diff against target: 630 lines (+175/-34)
19 files modified
src/main/java/com/akiban/qp/operator/API.java (+3/-1)
src/main/java/com/akiban/qp/operator/Map_NestedLoops.java (+14/-4)
src/main/java/com/akiban/server/explain/Label.java (+1/-0)
src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java (+1/-0)
src/main/java/com/akiban/sql/optimizer/rule/PipelineConfiguration.java (+67/-0)
src/main/java/com/akiban/sql/optimizer/rule/SchemaRulesContext.java (+11/-0)
src/main/java/com/akiban/sql/server/ServerOperatorCompiler.java (+1/-0)
src/main/java/com/akiban/sql/server/ServerSession.java (+4/-0)
src/main/java/com/akiban/sql/server/ServerSessionBase.java (+10/-0)
src/test/java/com/akiban/server/test/ApiTestBase.java (+4/-0)
src/test/java/com/akiban/server/test/costmodel/MapCT.java (+2/-1)
src/test/java/com/akiban/server/test/it/qp/AncestorLookup_NestedIT.java (+8/-8)
src/test/java/com/akiban/server/test/it/qp/BranchLookup_NestedIT.java (+8/-8)
src/test/java/com/akiban/server/test/it/qp/Map_NestedLoopsIT.java (+10/-10)
src/test/java/com/akiban/server/test/it/qp/Map_NestedLoopsPipelineIT.java (+26/-0)
src/test/java/com/akiban/server/test/it/qp/Sort_InsertionLimitedIT.java (+1/-1)
src/test/java/com/akiban/server/test/it/qp/UnionAll_DefaultIT.java (+1/-1)
src/test/java/com/akiban/sql/optimizer/OperatorCompilerTest.java (+2/-0)
src/test/java/com/akiban/sql/optimizer/rule/RulesTestContext.java (+1/-0)
To merge this branch: bzr merge lp:~mmcm/akiban-server/operator-pipeline-options
Reviewer Review Type Date Requested Status
Nathan Williams Approve
Review via email: mp+174585@code.launchpad.net

Description of the change

Change how operators get pipeline-related options.

Instead of having each operator look into config properties, set them from the optimizer, which in turn gets them all at once from there.

Add an option for Map_NestedLoops to select the previous rebinding implementation. Make this the default, since there are issues with query cancelation with pipelining.

To post a comment you must log in.
Revision history for this message
Nathan Williams (nwilliams) wrote :

Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/main/java/com/akiban/qp/operator/API.java'
2--- src/main/java/com/akiban/qp/operator/API.java 2013-07-10 18:42:14 +0000
3+++ src/main/java/com/akiban/qp/operator/API.java 2013-07-13 21:55:29 +0000
4@@ -497,9 +497,11 @@
5 public static Operator map_NestedLoops(Operator outerInput,
6 Operator innerInput,
7 int inputBindingPosition,
8+ boolean pipeline,
9 int depth)
10 {
11- return new Map_NestedLoops(outerInput, innerInput, inputBindingPosition, depth);
12+ return new Map_NestedLoops(outerInput, innerInput, inputBindingPosition,
13+ pipeline, depth);
14 }
15
16 // IfEmpty
17
18=== modified file 'src/main/java/com/akiban/qp/operator/Map_NestedLoops.java'
19--- src/main/java/com/akiban/qp/operator/Map_NestedLoops.java 2013-07-10 21:30:34 +0000
20+++ src/main/java/com/akiban/qp/operator/Map_NestedLoops.java 2013-07-13 21:55:29 +0000
21@@ -51,6 +51,8 @@
22
23 <li><b>int inputBindingPosition:</b> Position of inner loop row in query context.
24
25+ <li><b>boolean pipeline:</b> Whether to use bracketing cursors instead of rebinding.
26+
27 <li><b>int depth:</b> Number of nested Maps, including this one.
28
29 </ul>
30@@ -90,7 +92,7 @@
31 @Override
32 protected Cursor cursor(QueryContext context, QueryBindingsCursor bindingsCursor)
33 {
34- if (false)
35+ if (!pipeline)
36 return new Execution(context, bindingsCursor); // Old-style
37 else {
38 Cursor outerCursor = outerInputOperator.cursor(context, bindingsCursor);
39@@ -127,6 +129,7 @@
40 public Map_NestedLoops(Operator outerInputOperator,
41 Operator innerInputOperator,
42 int inputBindingPosition,
43+ boolean pipeline,
44 int depth)
45 {
46 ArgumentValidation.notNull("outerInputOperator", outerInputOperator);
47@@ -136,6 +139,7 @@
48 this.outerInputOperator = outerInputOperator;
49 this.innerInputOperator = innerInputOperator;
50 this.inputBindingPosition = inputBindingPosition;
51+ this.pipeline = pipeline;
52 this.depth = depth;
53 }
54
55@@ -150,12 +154,14 @@
56 private final Operator outerInputOperator;
57 private final Operator innerInputOperator;
58 private final int inputBindingPosition, depth;
59+ private final boolean pipeline;
60
61 @Override
62 public CompoundExplainer getExplainer(ExplainContext context)
63 {
64 CompoundExplainer ex = new NestedLoopsExplainer(getName(), innerInputOperator, outerInputOperator, null, null, context);
65 ex.addAttribute(Label.BINDING_POSITION, PrimitiveExplainer.getInstance(inputBindingPosition));
66+ ex.addAttribute(Label.PIPELINE, PrimitiveExplainer.getInstance(pipeline));
67 ex.addAttribute(Label.DEPTH, PrimitiveExplainer.getInstance(depth));
68 if (context.hasExtraInfo(this))
69 ex.get().putAll(context.getExtraInfo(this).get());
70@@ -346,9 +352,13 @@
71 pendingBindings = null;
72 return bindings;
73 }
74- bindings = input.nextBindings();
75- assert ((bindings == null) || (bindings.getDepth() < depth));
76- return bindings;
77+ while (true) {
78+ // Skip over any that we would elide.
79+ bindings = input.nextBindings();
80+ if ((bindings == null) || (bindings.getDepth() < depth))
81+ return bindings;
82+ assert (bindings.getDepth() == depth);
83+ }
84 }
85
86 @Override
87
88=== modified file 'src/main/java/com/akiban/server/explain/Label.java'
89--- src/main/java/com/akiban/server/explain/Label.java 2013-07-10 18:42:14 +0000
90+++ src/main/java/com/akiban/server/explain/Label.java 2013-07-13 21:55:29 +0000
91@@ -48,6 +48,7 @@
92 INFIX_REPRESENTATION(Category.DESCRIPTION),
93 ASSOCIATIVE(Category.DESCRIPTION),
94 INDEX(Category.DESCRIPTION),
95+ PIPELINE(Category.DESCRIPTION),
96 DEPTH(Category.DESCRIPTION),
97
98 // IDENTIFIER
99
100=== modified file 'src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java'
101--- src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java 2013-07-10 18:42:14 +0000
102+++ src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java 2013-07-13 21:55:29 +0000
103@@ -1529,6 +1529,7 @@
104 stream.operator = API.map_NestedLoops(ostream.operator,
105 stream.operator,
106 currentBindingPosition(),
107+ rulesContext.getPipelineConfiguration().isMapEnabled(),
108 nestedBindingsDepth);
109 nestedBindingsDepth--;
110 popBoundRow();
111
112=== added file 'src/main/java/com/akiban/sql/optimizer/rule/PipelineConfiguration.java'
113--- src/main/java/com/akiban/sql/optimizer/rule/PipelineConfiguration.java 1970-01-01 00:00:00 +0000
114+++ src/main/java/com/akiban/sql/optimizer/rule/PipelineConfiguration.java 2013-07-13 21:55:29 +0000
115@@ -0,0 +1,67 @@
116+/**
117+ * Copyright (C) 2009-2013 Akiban Technologies, Inc.
118+ *
119+ * This program is free software: you can redistribute it and/or modify
120+ * it under the terms of the GNU Affero General Public License as published by
121+ * the Free Software Foundation, either version 3 of the License, or
122+ * (at your option) any later version.
123+ *
124+ * This program is distributed in the hope that it will be useful,
125+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
126+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
127+ * GNU Affero General Public License for more details.
128+ *
129+ * You should have received a copy of the GNU Affero General Public License
130+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
131+ */
132+
133+package com.akiban.sql.optimizer.rule;
134+
135+import java.util.Properties;
136+
137+public class PipelineConfiguration
138+{
139+ private boolean mapEnabled = false;
140+ private int indexScanLookaheadQuantum = 1;
141+ private int groupLookupLookaheadQuantum = 1;
142+ private boolean unionAllOpenBoth = false;
143+
144+ public PipelineConfiguration() {
145+ }
146+
147+ public PipelineConfiguration(Properties properties) {
148+ load(properties);
149+ }
150+
151+ public boolean isMapEnabled() {
152+ return mapEnabled;
153+ }
154+
155+ public int getIndexScanLookaheadQuantum() {
156+ return indexScanLookaheadQuantum;
157+ }
158+
159+ public int getGroupLookupLookaheadQuantum() {
160+ return groupLookupLookaheadQuantum;
161+ }
162+
163+ public boolean isUnionAllOpenBoth() {
164+ return unionAllOpenBoth;
165+ }
166+
167+ public void load(Properties properties) {
168+ for (String prop : properties.stringPropertyNames()) {
169+ String val = properties.getProperty(prop);
170+ if ("map.enabled".equals(prop))
171+ mapEnabled = Boolean.parseBoolean(val);
172+ else if ("indexScan.lookaheadQuantum".equals(prop))
173+ indexScanLookaheadQuantum = Integer.parseInt(val);
174+ else if ("groupLookup.lookaheadQuantum".equals(prop))
175+ groupLookupLookaheadQuantum = Integer.parseInt(val);
176+ else if ("unionAll.openBoth".equals(prop))
177+ unionAllOpenBoth = Boolean.parseBoolean(val);
178+ else
179+ throw new IllegalArgumentException("Unknown property " + prop);
180+ }
181+ }
182+}
183
184=== modified file 'src/main/java/com/akiban/sql/optimizer/rule/SchemaRulesContext.java'
185--- src/main/java/com/akiban/sql/optimizer/rule/SchemaRulesContext.java 2013-03-22 20:05:57 +0000
186+++ src/main/java/com/akiban/sql/optimizer/rule/SchemaRulesContext.java 2013-07-13 21:55:29 +0000
187@@ -36,6 +36,8 @@
188 private FunctionsRegistry functionsRegistry;
189 private CostEstimator costEstimator;
190 private T3RegistryService t3Registry;
191+ private PipelineConfiguration pipelineConfiguration;
192+
193 protected SchemaRulesContext() {
194 }
195
196@@ -55,12 +57,17 @@
197 this.costEstimator = costEstimator;
198 }
199
200+ protected void initPipelineConfiguration(PipelineConfiguration pipelineConfiguration) {
201+ this.pipelineConfiguration = pipelineConfiguration;
202+ }
203+
204 @Override
205 protected void initDone() {
206 super.initDone();
207 assert (schema != null) : "initSchema() not called";
208 assert (functionsRegistry != null) : "initFunctionsRegistry() not called";
209 assert (costEstimator != null) : "initCostEstimator() not called";
210+ assert (pipelineConfiguration != null) : "initPipelineConfiguration() not called";
211 }
212
213 public Schema getSchema() {
214@@ -89,4 +96,8 @@
215
216 public abstract String getDefaultSchemaName();
217
218+ public PipelineConfiguration getPipelineConfiguration() {
219+ return pipelineConfiguration;
220+ }
221+
222 }
223
224=== modified file 'src/main/java/com/akiban/sql/server/ServerOperatorCompiler.java'
225--- src/main/java/com/akiban/sql/server/ServerOperatorCompiler.java 2013-06-11 16:30:17 +0000
226+++ src/main/java/com/akiban/sql/server/ServerOperatorCompiler.java 2013-07-13 21:55:29 +0000
227@@ -36,6 +36,7 @@
228 initParser(server.getParser());
229 initFunctionsRegistry(server.functionsRegistry());
230 initCostEstimator(server.costEstimator(this, keyCreator), usePValues);
231+ initPipelineConfiguration(server.getPipelineConfiguration());
232 if (usePValues)
233 initT3Registry(server.t3RegistryService());
234
235
236=== modified file 'src/main/java/com/akiban/sql/server/ServerSession.java'
237--- src/main/java/com/akiban/sql/server/ServerSession.java 2013-06-11 16:32:59 +0000
238+++ src/main/java/com/akiban/sql/server/ServerSession.java 2013-07-13 21:55:29 +0000
239@@ -23,6 +23,7 @@
240 import com.akiban.sql.parser.SQLParser;
241
242 import com.akiban.sql.optimizer.AISBinderContext;
243+import com.akiban.sql.optimizer.rule.PipelineConfiguration;
244 import com.akiban.sql.optimizer.rule.cost.CostEstimator;
245
246 import com.akiban.ais.model.AkibanInformationSchema;
247@@ -165,4 +166,7 @@
248
249 /** Check access to given schema */
250 public boolean isSchemaAccessible(String schemaName);
251+
252+ /** Get the pipeline configuration. */
253+ public PipelineConfiguration getPipelineConfiguration();
254 }
255
256=== modified file 'src/main/java/com/akiban/sql/server/ServerSessionBase.java'
257--- src/main/java/com/akiban/sql/server/ServerSessionBase.java 2013-06-12 21:51:17 +0000
258+++ src/main/java/com/akiban/sql/server/ServerSessionBase.java 2013-07-13 21:55:29 +0000
259@@ -40,6 +40,7 @@
260 import com.akiban.server.service.tree.KeyCreator;
261 import com.akiban.server.t3expressions.T3RegistryService;
262 import com.akiban.sql.optimizer.AISBinderContext;
263+import com.akiban.sql.optimizer.rule.PipelineConfiguration;
264 import com.akiban.sql.optimizer.rule.cost.CostEstimator;
265
266 import java.util.*;
267@@ -47,10 +48,12 @@
268 public abstract class ServerSessionBase extends AISBinderContext implements ServerSession
269 {
270 public static final String COMPILER_PROPERTIES_PREFIX = "optimizer.";
271+ public static final String PIPELINE_PROPERTIES_PREFIX = "akserver.pipeline.";
272
273 protected final ServerServiceRequirements reqs;
274 protected Properties compilerProperties;
275 protected Map<String,Object> attributes = new HashMap<>();
276+ protected PipelineConfiguration pipelineConfiguration;
277
278 protected Session session;
279 protected Map<StoreAdapter.AdapterType, StoreAdapter> adapters =
280@@ -401,4 +404,11 @@
281 return reqs.securityService().isAccessible(session, schemaName);
282 }
283
284+ @Override
285+ public PipelineConfiguration getPipelineConfiguration() {
286+ if (pipelineConfiguration == null)
287+ pipelineConfiguration = new PipelineConfiguration(reqs.config().deriveProperties(PIPELINE_PROPERTIES_PREFIX));
288+ return pipelineConfiguration;
289+ }
290+
291 }
292
293=== modified file 'src/test/java/com/akiban/server/test/ApiTestBase.java'
294--- src/test/java/com/akiban/server/test/ApiTestBase.java 2013-07-03 15:32:40 +0000
295+++ src/test/java/com/akiban/server/test/ApiTestBase.java 2013-07-13 21:55:29 +0000
296@@ -1353,6 +1353,10 @@
297 return true;
298 }
299
300+ protected boolean pipelineMap() {
301+ return false;
302+ }
303+
304 protected DDLFunctions ddlForAlter() {
305 return ddl();
306 }
307
308=== modified file 'src/test/java/com/akiban/server/test/costmodel/MapCT.java'
309--- src/test/java/com/akiban/server/test/costmodel/MapCT.java 2013-07-10 18:42:14 +0000
310+++ src/test/java/com/akiban/server/test/costmodel/MapCT.java 2013-07-13 21:55:29 +0000
311@@ -83,7 +83,8 @@
312 TimeOperator timeSetupOuter = new TimeOperator(setupOuter);
313 Operator setupInner = limit_Default(groupScan_Default(group), innerRows);
314 TimeOperator timeSetupInner = new TimeOperator(setupInner);
315- Operator plan = map_NestedLoops(timeSetupOuter, timeSetupInner, 0, 1);
316+ Operator plan = map_NestedLoops(timeSetupOuter, timeSetupInner,
317+ 0, pipelineMap(), 1);
318 long start = System.nanoTime();
319 for (int r = 0; r < runs; r++) {
320 Cursor cursor = cursor(plan, queryContext, queryBindings);
321
322=== modified file 'src/test/java/com/akiban/server/test/it/qp/AncestorLookup_NestedIT.java'
323--- src/test/java/com/akiban/server/test/it/qp/AncestorLookup_NestedIT.java 2013-07-10 21:30:34 +0000
324+++ src/test/java/com/akiban/server/test/it/qp/AncestorLookup_NestedIT.java 2013-07-13 21:55:29 +0000
325@@ -141,7 +141,7 @@
326 map_NestedLoops(
327 indexScan_Default(aValueIndexRowType),
328 ancestorLookup_Nested(rabc, aValueIndexRowType, Collections.singleton(aRowType), 0),
329- 0, 1);
330+ 0, pipelineMap(), 1);
331 Cursor cursor = cursor(plan, queryContext, queryBindings);
332 RowBase[] expected = new RowBase[]{
333 row(aRowType, 13L, 1L, "a13"),
334@@ -159,7 +159,7 @@
335 map_NestedLoops(
336 indexScan_Default(aValueIndexRowType),
337 ancestorLookup_Nested(rabc, aValueIndexRowType, Arrays.asList(aRowType, rRowType), 0),
338- 0, 1);
339+ 0, pipelineMap(), 1);
340 Cursor cursor = cursor(plan, queryContext, queryBindings);
341 RowBase[] expected = new RowBase[]{
342 row(rRowType, 1L, "r1"),
343@@ -181,7 +181,7 @@
344 map_NestedLoops(
345 indexScan_Default(aValueIndexRowType),
346 ancestorLookup_Nested(rabc, aValueIndexRowType, Arrays.asList(rRowType, aRowType), 0),
347- 0, 1);
348+ 0, pipelineMap(), 1);
349 Cursor cursor = cursor(plan, queryContext, queryBindings);
350 RowBase[] expected = new RowBase[]{
351 row(rRowType, 1L, "r1"),
352@@ -204,9 +204,9 @@
353 map_NestedLoops(
354 indexScan_Default(aValueIndexRowType),
355 ancestorLookup_Nested(rabc, aValueIndexRowType, Arrays.asList(aRowType), 0),
356- 0, 1),
357+ 0, pipelineMap(), 1),
358 ancestorLookup_Nested(rabc, aRowType, Arrays.asList(rRowType), 1),
359- 1, 1);
360+ 1, pipelineMap(), 1);
361 Cursor cursor = cursor(plan, queryContext, queryBindings);
362 RowBase[] expected = new RowBase[]{
363 row(rRowType, 1L, "r1"),
364@@ -236,7 +236,7 @@
365 map_NestedLoops(
366 abIndexScan,
367 ancestorLookup_Nested(rabc, abIndexScan.rowType(), Collections.singleton(rRowType), 0),
368- 0, 1);
369+ 0, pipelineMap(), 1);
370 Cursor cursor = cursor(plan, queryContext, queryBindings);
371 RowBase[] expected = new RowBase[]{
372 row(rRowType, 1L, "r1"),
373@@ -272,7 +272,7 @@
374 map_NestedLoops(
375 abcIndexScan,
376 ancestorLookup_Nested(rabc, abcIndexScan.rowType(), Collections.singleton(rRowType), 0),
377- 0, 1);
378+ 0, pipelineMap(), 1);
379 Cursor cursor = cursor(plan, queryContext, queryBindings);
380 RowBase[] expected = new RowBase[]{
381 row(rRowType, 1L, "r1"),
382@@ -287,7 +287,7 @@
383 map_NestedLoops(
384 indexScan_Default(aValueIndexRowType),
385 ancestorLookup_Nested(rabc, aValueIndexRowType, Collections.singleton(aRowType), 0),
386- 0, 1);
387+ 0, pipelineMap(), 1);
388 CursorLifecycleTestCase testCase = new CursorLifecycleTestCase()
389 {
390 @Override
391
392=== modified file 'src/test/java/com/akiban/server/test/it/qp/BranchLookup_NestedIT.java'
393--- src/test/java/com/akiban/server/test/it/qp/BranchLookup_NestedIT.java 2013-07-10 21:30:34 +0000
394+++ src/test/java/com/akiban/server/test/it/qp/BranchLookup_NestedIT.java 2013-07-13 21:55:29 +0000
395@@ -154,7 +154,7 @@
396 map_NestedLoops(
397 indexScan_Default(aValueIndexRowType),
398 branchLookup_Nested(rabc, aValueIndexRowType, rRowType, InputPreservationOption.DISCARD_INPUT, 0),
399- 0, 1);
400+ 0, pipelineMap(), 1);
401 Cursor cursor = cursor(plan, queryContext, queryBindings);
402 RowBase[] expected = new RowBase[]{
403 // Each r row, and everything below it, is duplicated, because the A index refers to each r value twice.
404@@ -202,7 +202,7 @@
405 Collections.singleton(aRowType),
406 InputPreservationOption.DISCARD_INPUT),
407 branchLookup_Nested(rabc, aRowType, rRowType, InputPreservationOption.DISCARD_INPUT, 0),
408- 0, 1);
409+ 0, pipelineMap(), 1);
410 Cursor cursor = cursor(plan, queryContext, queryBindings);
411 RowBase[] expected = new RowBase[]{
412 // Each r row, and everything below it, is duplicated, because the A index refers to each r value twice.
413@@ -247,7 +247,7 @@
414 groupScan_Default(rabc),
415 Collections.singleton(aRowType)),
416 branchLookup_Nested(rabc, aRowType, bRowType, InputPreservationOption.DISCARD_INPUT, 0),
417- 0, 1);
418+ 0, pipelineMap(), 1);
419 Cursor cursor = cursor(plan, queryContext, queryBindings);
420 RowBase[] expected = new RowBase[]{
421 row(bRowType, 15L, 1L, "b15"),
422@@ -272,9 +272,9 @@
423 groupScan_Default(rabc),
424 Collections.singleton(aRowType)),
425 branchLookup_Nested(rabc, aRowType, bRowType, InputPreservationOption.DISCARD_INPUT, 0),
426- 0, 1),
427+ 0, pipelineMap(), 1),
428 branchLookup_Nested(rabc, bRowType, cRowType, InputPreservationOption.KEEP_INPUT, 1),
429- 1, 1);
430+ 1, pipelineMap(), 1);
431 Cursor cursor = cursor(plan, queryContext, queryBindings);
432 RowBase[] expected = new RowBase[]{
433 row(bRowType, 15L, 1L, "b15"),
434@@ -324,7 +324,7 @@
435 map_NestedLoops(
436 abIndexScan,
437 branchLookup_Nested(rabc, abIndexScan.rowType(), cRowType, InputPreservationOption.DISCARD_INPUT, 0),
438- 0, 1);
439+ 0, pipelineMap(), 1);
440 Cursor cursor = cursor(plan, queryContext, queryBindings);
441 RowBase[] expected = new RowBase[]{
442 row(cRowType, 17L, 1L, "c17"),
443@@ -342,7 +342,7 @@
444 groupScan_Default(rabc),
445 Collections.singleton(aRowType)),
446 branchLookup_Nested(rabc, aRowType, rRowType, aRowType, InputPreservationOption.DISCARD_INPUT, 0),
447- 0, 1);
448+ 0, pipelineMap(), 1);
449 Cursor cursor = cursor(plan, queryContext, queryBindings);
450 RowBase[] expected = new RowBase[]{
451 row(aRowType, 13L, 1L, "a13"),
452@@ -366,7 +366,7 @@
453 groupScan_Default(rabc),
454 Collections.singleton(aRowType)),
455 branchLookup_Nested(rabc, aRowType, rRowType, aRowType, InputPreservationOption.DISCARD_INPUT, 0),
456- 0, 1);
457+ 0, pipelineMap(), 1);
458 CursorLifecycleTestCase testCase = new CursorLifecycleTestCase()
459 {
460 @Override
461
462=== modified file 'src/test/java/com/akiban/server/test/it/qp/Map_NestedLoopsIT.java'
463--- src/test/java/com/akiban/server/test/it/qp/Map_NestedLoopsIT.java 2013-07-10 21:30:34 +0000
464+++ src/test/java/com/akiban/server/test/it/qp/Map_NestedLoopsIT.java 2013-07-13 21:55:29 +0000
465@@ -102,25 +102,25 @@
466 @Test(expected = IllegalArgumentException.class)
467 public void testLeftInputNull()
468 {
469- map_NestedLoops(null, groupScan_Default(coi), 0, 1);
470+ map_NestedLoops(null, groupScan_Default(coi), 0, pipelineMap(), 1);
471 }
472
473 @Test(expected = IllegalArgumentException.class)
474 public void testRightInputNull()
475 {
476- map_NestedLoops(groupScan_Default(coi), null, 0, 1);
477+ map_NestedLoops(groupScan_Default(coi), null, 0, pipelineMap(), 1);
478 }
479
480 @Test(expected = IllegalArgumentException.class)
481 public void testNegativeInputBindingPosition()
482 {
483- map_NestedLoops(groupScan_Default(coi), groupScan_Default(coi), -1, 1);
484+ map_NestedLoops(groupScan_Default(coi), groupScan_Default(coi), -1, pipelineMap(), 1);
485 }
486
487 @Test(expected = IllegalArgumentException.class)
488 public void testNonPositiveDepth()
489 {
490- map_NestedLoops(groupScan_Default(coi), groupScan_Default(coi), 0, 0);
491+ map_NestedLoops(groupScan_Default(coi), groupScan_Default(coi), 0, pipelineMap(),0);
492 }
493
494 // Test operator execution
495@@ -132,7 +132,7 @@
496 map_NestedLoops(
497 indexScan_Default(itemOidIndexRowType, false),
498 ancestorLookup_Nested(coi, itemOidIndexRowType, Collections.singleton(itemRowType), 0),
499- 0, 1);
500+ 0, pipelineMap(), 1);
501 RowBase[] expected = new RowBase[]{
502 row(itemRowType, 1000L, 100L),
503 row(itemRowType, 1001L, 100L),
504@@ -175,7 +175,7 @@
505 groupScan_Default(coi),
506 Collections.singleton(customerRowType)),
507 project,
508- 0, 1);
509+ 0, pipelineMap(), 1);
510 RowType projectRowType = project.rowType();
511 RowBase[] expected = new RowBase[]{
512 row(projectRowType, 1L, 100L),
513@@ -212,7 +212,7 @@
514 groupScan_Default(coi),
515 Collections.singleton(customerRowType)),
516 ifEmpty_Default(project, projectRowType, Arrays.asList(boundField(customerRowType, 0, 0), literal(null)), InputPreservationOption.KEEP_INPUT),
517- 0, 1);
518+ 0, pipelineMap(), 1);
519 RowBase[] expected = new RowBase[]{
520 row(projectRowType, 1L, 100L),
521 row(projectRowType, 1L, 101L),
522@@ -234,7 +234,7 @@
523 map_NestedLoops(
524 indexScan_Default(itemOidIndexRowType, false),
525 ancestorLookup_Nested(coi, itemOidIndexRowType, Collections.singleton(itemRowType), 0),
526- 0, 1);
527+ 0, pipelineMap(), 1);
528 CursorLifecycleTestCase testCase = new CursorLifecycleTestCase()
529 {
530 @Override
531@@ -291,8 +291,8 @@
532 map_NestedLoops(
533 indexScan_Default(customerCidIndexRowType, false, cidRange),
534 ancestorLookup_Nested(coi, customerCidIndexRowType, Collections.singleton(customerRowType), 0),
535- 0, 2),
536- 1, 1);
537+ 0, pipelineMap(), 2),
538+ 1, pipelineMap(), 1);
539 RowBase[] expected = new RowBase[]{
540 row(customerRowType, 1L, "northbridge"),
541 row(customerRowType, 2L, "foundation"),
542
543=== added file 'src/test/java/com/akiban/server/test/it/qp/Map_NestedLoopsPipelineIT.java'
544--- src/test/java/com/akiban/server/test/it/qp/Map_NestedLoopsPipelineIT.java 1970-01-01 00:00:00 +0000
545+++ src/test/java/com/akiban/server/test/it/qp/Map_NestedLoopsPipelineIT.java 2013-07-13 21:55:29 +0000
546@@ -0,0 +1,26 @@
547+/**
548+ * Copyright (C) 2009-2013 Akiban Technologies, Inc.
549+ *
550+ * This program is free software: you can redistribute it and/or modify
551+ * it under the terms of the GNU Affero General Public License as published by
552+ * the Free Software Foundation, either version 3 of the License, or
553+ * (at your option) any later version.
554+ *
555+ * This program is distributed in the hope that it will be useful,
556+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
557+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
558+ * GNU Affero General Public License for more details.
559+ *
560+ * You should have received a copy of the GNU Affero General Public License
561+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
562+ */
563+
564+package com.akiban.server.test.it.qp;
565+
566+public class Map_NestedLoopsPipelineIT extends Map_NestedLoopsIT
567+{
568+ @Override
569+ protected boolean pipelineMap() {
570+ return true;
571+ }
572+}
573
574=== modified file 'src/test/java/com/akiban/server/test/it/qp/Sort_InsertionLimitedIT.java'
575--- src/test/java/com/akiban/server/test/it/qp/Sort_InsertionLimitedIT.java 2013-07-10 18:42:14 +0000
576+++ src/test/java/com/akiban/server/test/it/qp/Sort_InsertionLimitedIT.java 2013-07-13 21:55:29 +0000
577@@ -540,7 +540,7 @@
578 map_NestedLoops(
579 filter_Default(groupScan_Default(coi),
580 Collections.singleton(customerRowType)),
581- project, 0, 1),
582+ project, 0, pipelineMap(), 1),
583 projectType,
584 ordering(field(projectType, 0), true),
585 SortOption.PRESERVE_DUPLICATES,
586
587=== modified file 'src/test/java/com/akiban/server/test/it/qp/UnionAll_DefaultIT.java'
588--- src/test/java/com/akiban/server/test/it/qp/UnionAll_DefaultIT.java 2013-07-10 18:42:14 +0000
589+++ src/test/java/com/akiban/server/test/it/qp/UnionAll_DefaultIT.java 2013-07-13 21:55:29 +0000
590@@ -270,7 +270,7 @@
591 xEQ9Range,
592 ordering),
593 txIndexRowType),
594- 0, 1);
595+ 0, pipelineMap(), 1);
596 String[] expected = new String[]{
597 hKey(1000),
598 hKey(1002),
599
600=== modified file 'src/test/java/com/akiban/sql/optimizer/OperatorCompilerTest.java'
601--- src/test/java/com/akiban/sql/optimizer/OperatorCompilerTest.java 2013-03-22 20:05:57 +0000
602+++ src/test/java/com/akiban/sql/optimizer/OperatorCompilerTest.java 2013-07-13 21:55:29 +0000
603@@ -33,6 +33,7 @@
604 import com.akiban.sql.optimizer.plan.ResultSet.ResultField;
605 import com.akiban.sql.optimizer.rule.ExplainPlanContext;
606 import com.akiban.sql.optimizer.rule.RulesTestHelper;
607+import com.akiban.sql.optimizer.rule.PipelineConfiguration;
608 import com.akiban.sql.optimizer.rule.cost.TestCostEstimator;
609
610 import com.akiban.junit.NamedParameterizedRunner;
611@@ -122,6 +123,7 @@
612 compiler.initT3Registry(t3Registry);
613 }
614 compiler.initCostEstimator(new TestCostEstimator(ais, compiler.getSchema(), statsFile, false, properties), usePValues);
615+ compiler.initPipelineConfiguration(new PipelineConfiguration());
616 compiler.initDone();
617 return compiler;
618 }
619
620=== modified file 'src/test/java/com/akiban/sql/optimizer/rule/RulesTestContext.java'
621--- src/test/java/com/akiban/sql/optimizer/rule/RulesTestContext.java 2013-03-22 20:05:57 +0000
622+++ src/test/java/com/akiban/sql/optimizer/rule/RulesTestContext.java 2013-07-13 21:55:29 +0000
623@@ -50,6 +50,7 @@
624 context.initCostEstimator(new TestCostEstimator(ais, context.getSchema(),
625 statsFile, statsIgnoreMissingIndexes,
626 properties), false);
627+ context.initPipelineConfiguration(new PipelineConfiguration());
628 context.initDone();
629 return context;
630 }

Subscribers

People subscribed via source and target branches