Merge lp:~nwilliams/akiban-server/types2-elimination-part-1 into lp:~akiban-technologies/akiban-server/trunk

Proposed by Nathan Williams
Status: Merged
Approved by: Thomas Jones-Low
Approved revision: 2656
Merged at revision: 2656
Proposed branch: lp:~nwilliams/akiban-server/types2-elimination-part-1
Merge into: lp:~akiban-technologies/akiban-server/trunk
Diff against target: 1592 lines (+185/-582)
27 files modified
src/main/java/com/akiban/qp/operator/API.java (+88/-307)
src/main/java/com/akiban/qp/operator/Sort_InsertionLimited.java (+8/-55)
src/main/java/com/akiban/qp/persistitadapter/OperatorBasedRowCollector.java (+2/-2)
src/main/java/com/akiban/qp/persistitadapter/OperatorStore.java (+1/-1)
src/main/java/com/akiban/qp/persistitadapter/indexcursor/IndexCursorSpatial_InBox.java (+1/-5)
src/main/java/com/akiban/qp/persistitadapter/indexcursor/IndexCursorSpatial_NearPoint.java (+34/-71)
src/main/java/com/akiban/qp/persistitadapter/indexcursor/OldSorterAdapter.java (+3/-5)
src/main/java/com/akiban/qp/persistitadapter/indexcursor/PValueSorterAdapter.java (+1/-1)
src/main/java/com/akiban/qp/row/ValuesHolderRow.java (+1/-1)
src/main/java/com/akiban/server/explain/std/SortOperatorExplainer.java (+1/-4)
src/main/java/com/akiban/server/service/restdml/DeleteGenerator.java (+1/-1)
src/main/java/com/akiban/server/service/restdml/InsertGenerator.java (+1/-1)
src/main/java/com/akiban/server/service/restdml/UpdateGenerator.java (+1/-1)
src/main/java/com/akiban/server/types3/Types3Switch.java (+5/-0)
src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java (+20/-31)
src/main/java/com/akiban/sql/optimizer/rule/PlanGenerator.java (+3/-4)
src/test/java/com/akiban/qp/operator/Distinct_PartialTest.java (+2/-2)
src/test/java/com/akiban/server/test/it/qp/DeleteIT.java (+1/-1)
src/test/java/com/akiban/server/test/it/qp/Distinct_Partial_CaseInsensitive_IT.java (+4/-8)
src/test/java/com/akiban/server/test/it/qp/IndexScanJumpUnboundedIT.java (+1/-3)
src/test/java/com/akiban/server/test/it/qp/Intersect_OrderedByteArrayComparisonIT.java (+2/-1)
src/test/java/com/akiban/server/test/it/qp/NWaySkipScanIT.java (+0/-12)
src/test/java/com/akiban/server/test/it/qp/Select_BloomFilter_CaseInsensitive_IT.java (+1/-3)
src/test/java/com/akiban/server/test/it/qp/SkipScanPerformanceIT.java (+1/-12)
src/test/resources/com/akiban/sql/pg/yaml/functional/test-statement-cache.yaml (+2/-2)
src/test/resources/com/akiban/sql/pg/yaml/functional/test-t2t3-compat-decimal.yaml (+0/-29)
src/test/resources/com/akiban/sql/pg/yaml/functional/test-type-year.yaml (+0/-19)
To merge this branch: bzr merge lp:~nwilliams/akiban-server/types2-elimination-part-1
Reviewer Review Type Date Requested Status
Thomas Jones-Low Approve
Akiban Build User Needs Fixing
Review via email: mp+161731@code.launchpad.net

Description of the change

Eliminate usePvalues boolean from API and API.Ordering.

First pass of many to come. Entirely delete parameter, adjust, and collapse if(Types3Switch) blocks if edits were made in the area.

Includes new static check at start-up for a bigger warning should anything else (e.g. FTS) still be switching to 2.

Yaml test tweaks:
- Cache, setting to 'true' still clears as intended
- Year, no longer worry about types2 behavior
- Decimal, don't worry about value inserted under types2

To post a comment you must log in.
Revision history for this message
Thomas Jones-Low (tjoneslo) wrote :

This look like a lot of unused code being deleted.

review: Approve
Revision history for this message
Akiban Build User (build-akiban) wrote :

There were 2 failures during build/test:

* job system-tests-mtr failed at build number 3455: http://172.16.20.104:8080/job/system-tests-mtr/3455/

* view must-pass failed: system-tests-mtr is red

review: Needs Fixing
Revision history for this message
Thomas Jones-Low (tjoneslo) wrote :

Unrelated.

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-03-22 20:05:57 +0000
3+++ src/main/java/com/akiban/qp/operator/API.java 2013-04-30 23:23:36 +0000
4@@ -30,8 +30,6 @@
5 import com.akiban.server.aggregation.Aggregators;
6 import com.akiban.server.collation.AkCollator;
7 import com.akiban.server.expression.Expression;
8-import com.akiban.server.expression.std.FieldExpression;
9-import com.akiban.server.t3expressions.T3RegistryService;
10 import com.akiban.server.types.AkType;
11 import com.akiban.server.types3.TAggregator;
12 import com.akiban.server.types3.TComparison;
13@@ -44,6 +42,8 @@
14
15 public class API
16 {
17+ private static final boolean USE_PVALUES = Types3Switch.ON;
18+
19 // Aggregate
20
21 public static Operator aggregate_Partial(Operator inputOperator,
22@@ -237,30 +237,16 @@
23
24 public static Operator limit_Default(Operator inputOperator, int limitRows)
25 {
26- return limit_Default(inputOperator, limitRows, Types3Switch.ON);
27- }
28-
29- public static Operator limit_Default(Operator inputOperator, int limitRows, boolean usePVals)
30- {
31- return new Limit_Default(inputOperator, limitRows, usePVals);
32- }
33-
34- public static Operator limit_Default(Operator inputOperator,
35- int skipRows,
36- boolean skipIsBinding,
37- int limitRows,
38- boolean limitIsBinding)
39- {
40- return limit_Default(inputOperator, skipRows, skipIsBinding, limitRows, limitIsBinding, Types3Switch.ON);
41- }
42+ return new Limit_Default(inputOperator, limitRows, Types3Switch.ON);
43+ }
44+
45 public static Operator limit_Default(Operator inputOperator,
46 int skipRows,
47 boolean skipIsBinding,
48 int limitRows,
49- boolean limitIsBinding,
50- boolean usePVals)
51+ boolean limitIsBinding)
52 {
53- return new Limit_Default(inputOperator, skipRows, skipIsBinding, limitRows, limitIsBinding, usePVals);
54+ return new Limit_Default(inputOperator, skipRows, skipIsBinding, limitRows, limitIsBinding, Types3Switch.ON);
55 }
56
57 // AncestorLookup
58@@ -289,14 +275,13 @@
59 * tableType
60 * @param indexType the index to scan
61 * @return the scan operator
62- * @deprecated use {@link #indexScan_Default(IndexRowType, IndexKeyRange, Ordering, IndexScanSelector, boolean)}
63+ * @deprecated use {@link #indexScan_Default(IndexRowType, IndexKeyRange, Ordering, IndexScanSelector)}
64 */
65 @Deprecated
66 @SuppressWarnings("deprecation")
67 public static Operator indexScan_Default(IndexRowType indexType)
68 {
69- boolean usePValues = Types3Switch.ON;
70- return indexScan_Default(indexType, false, IndexKeyRange.unbounded(indexType, usePValues), usePValues);
71+ return indexScan_Default(indexType, false, IndexKeyRange.unbounded(indexType, USE_PVALUES));
72 }
73
74 /**
75@@ -305,43 +290,30 @@
76 * @param indexType the index to scan
77 * @param reverse whether to scan in reverse order
78 * @return the scan operator
79- * @deprecated use {@link #indexScan_Default(IndexRowType, IndexKeyRange, Ordering, IndexScanSelector, boolean)}
80+ * @deprecated use {@link #indexScan_Default(IndexRowType, IndexKeyRange, Ordering, IndexScanSelector)}
81 */
82 @Deprecated
83 @SuppressWarnings("deprecation")
84 public static Operator indexScan_Default(IndexRowType indexType, boolean reverse)
85 {
86- boolean usePValues = Types3Switch.ON;
87- return indexScan_Default(indexType, reverse, IndexKeyRange.unbounded(indexType, usePValues), usePValues);
88+ return indexScan_Default(indexType, reverse, IndexKeyRange.unbounded(indexType, USE_PVALUES));
89 }
90
91+ /**
92+ * Creates a scan operator for the given index, using LEFT JOIN semantics after the indexType's tableType.
93+ * @param indexType the index to scan
94+ * @param reverse whether to scan in reverse order
95+ * @param indexKeyRange the scan range
96+ * @return the scan operator
97+ * @deprecated use {@link #indexScan_Default(IndexRowType, IndexKeyRange, Ordering, IndexScanSelector)}
98+ */
99+ @Deprecated
100 public static Operator indexScan_Default(IndexRowType indexType, boolean reverse, IndexKeyRange indexKeyRange)
101 {
102- return indexScan_Default(indexType, reverse, indexKeyRange, Types3Switch.ON);
103- }
104- /**
105- * Creates a scan operator for the given index, using LEFT JOIN semantics after the indexType's tableType.
106- * @param indexType the index to scan
107- * @param reverse whether to scan in reverse order
108- * @param indexKeyRange the scan range
109- * @return the scan operator
110- * @deprecated use {@link #indexScan_Default(IndexRowType, IndexKeyRange, Ordering, IndexScanSelector, boolean)}
111- */
112- @Deprecated
113- @SuppressWarnings("deprecation")
114- public static Operator indexScan_Default(IndexRowType indexType, boolean reverse, IndexKeyRange indexKeyRange, boolean usePValues)
115- {
116 if (indexKeyRange == null) {
117- indexKeyRange = IndexKeyRange.unbounded(indexType, usePValues);
118+ indexKeyRange = IndexKeyRange.unbounded(indexType, USE_PVALUES);
119 }
120- return indexScan_Default(indexType, reverse, indexKeyRange, indexType.tableType(), usePValues);
121- }
122- public static Operator indexScan_Default(IndexRowType indexType,
123- boolean reverse,
124- IndexKeyRange indexKeyRange,
125- UserTableRowType innerJoinUntilRowType)
126- {
127- return indexScan_Default(indexType, reverse, indexKeyRange, innerJoinUntilRowType, Types3Switch.ON);
128+ return indexScan_Default(indexType, reverse, indexKeyRange, indexType.tableType());
129 }
130
131 /**
132@@ -351,28 +323,27 @@
133 * @param indexKeyRange the scan range
134 * @param innerJoinUntilRowType the table after which the scan should start using LEFT JOIN GI semantics.
135 * @return the scan operator
136- * @deprecated use {@link #indexScan_Default(IndexRowType, IndexKeyRange, Ordering, IndexScanSelector, boolean)}
137+ * @deprecated use {@link #indexScan_Default(IndexRowType, IndexKeyRange, Ordering, IndexScanSelector)}
138 */
139 @Deprecated
140 public static Operator indexScan_Default(IndexRowType indexType,
141 boolean reverse,
142 IndexKeyRange indexKeyRange,
143- UserTableRowType innerJoinUntilRowType,
144- boolean usePVals)
145+ UserTableRowType innerJoinUntilRowType)
146 {
147- Ordering ordering = new Ordering(usePVals);
148+ Ordering ordering = new Ordering();
149 int fields = indexType.nFields();
150- if (usePVals) {
151- for (int f = 0; f < fields; f++) {
152- ordering.append(null, new TPreparedField(indexType.typeInstanceAt(f), f), !reverse);
153- }
154- }
155- else {
156- for (int f = 0; f < fields; f++) {
157- ordering.append(new FieldExpression(indexType, f), null, !reverse);
158- }
159- }
160- return indexScan_Default(indexType, indexKeyRange, ordering, innerJoinUntilRowType, usePVals);
161+ for (int f = 0; f < fields; f++) {
162+ ordering.append(new TPreparedField(indexType.typeInstanceAt(f), f), !reverse);
163+ }
164+ return indexScan_Default(indexType, indexKeyRange, ordering, innerJoinUntilRowType);
165+ }
166+
167+ public static Operator indexScan_Default(IndexRowType indexType,
168+ IndexKeyRange indexKeyRange,
169+ Ordering ordering)
170+ {
171+ return indexScan_Default(indexType, indexKeyRange, ordering, indexType.tableType());
172 }
173
174 /**
175@@ -382,43 +353,20 @@
176 * @param indexKeyRange the scan range
177 * @param indexScanSelector
178 * @return the scan operator
179- * @deprecated use {@link #indexScan_Default(IndexRowType, IndexKeyRange, Ordering, IndexScanSelector, boolean)}
180+ * @deprecated use {@link #indexScan_Default(IndexRowType, IndexKeyRange, Ordering, IndexScanSelector)}
181 */
182 @Deprecated
183 public static Operator indexScan_Default(IndexRowType indexType,
184 boolean reverse,
185 IndexKeyRange indexKeyRange,
186- IndexScanSelector indexScanSelector,
187- boolean usePVals)
188+ IndexScanSelector indexScanSelector)
189 {
190- Ordering ordering = new Ordering(usePVals);
191+ Ordering ordering = new Ordering();
192 int fields = indexType.nFields();
193- if (usePVals) {
194- for (int f = 0; f < fields; f++) {
195- ordering.append(null, new TPreparedField(indexType.typeInstanceAt(f), f), !reverse);
196- }
197- }
198- else {
199- for (int f = 0; f < fields; f++) {
200- ordering.append(new FieldExpression(indexType, f), null, !reverse);
201- }
202- }
203- return indexScan_Default(indexType, indexKeyRange, ordering, indexScanSelector, usePVals);
204- }
205-
206- public static Operator indexScan_Default(IndexRowType indexType,
207- IndexKeyRange indexKeyRange,
208- Ordering ordering)
209- {
210- return indexScan_Default(indexType, indexKeyRange, ordering, Types3Switch.ON);
211- }
212-
213- public static Operator indexScan_Default(IndexRowType indexType,
214- IndexKeyRange indexKeyRange,
215- Ordering ordering,
216- boolean usePVals)
217- {
218- return indexScan_Default(indexType, indexKeyRange, ordering, indexType.tableType(), usePVals);
219+ for (int f = 0; f < fields; f++) {
220+ ordering.append(new TPreparedField(indexType.typeInstanceAt(f), f), !reverse);
221+ }
222+ return indexScan_Default(indexType, indexKeyRange, ordering, indexScanSelector);
223 }
224
225 public static Operator indexScan_Default(IndexRowType indexType,
226@@ -426,20 +374,11 @@
227 Ordering ordering,
228 UserTableRowType innerJoinUntilRowType)
229 {
230- return indexScan_Default(indexType, indexKeyRange, ordering, innerJoinUntilRowType, Types3Switch.ON);
231- }
232-
233- public static Operator indexScan_Default(IndexRowType indexType,
234- IndexKeyRange indexKeyRange,
235- Ordering ordering,
236- UserTableRowType innerJoinUntilRowType,
237- boolean usePVals)
238- {
239 return indexScan_Default(indexType,
240 indexKeyRange,
241 ordering,
242 IndexScanSelector.leftJoinAfter(indexType.index(),
243- innerJoinUntilRowType.userTable()), usePVals);
244+ innerJoinUntilRowType.userTable()));
245 }
246
247 public static Operator indexScan_Default(IndexRowType indexType,
248@@ -447,17 +386,7 @@
249 Ordering ordering,
250 IndexScanSelector indexScanSelector)
251 {
252- return new IndexScan_Default(indexType, indexKeyRange, ordering, indexScanSelector, Types3Switch.ON);
253- }
254-
255-
256- public static Operator indexScan_Default(IndexRowType indexType,
257- IndexKeyRange indexKeyRange,
258- Ordering ordering,
259- IndexScanSelector indexScanSelector,
260- boolean usePVals)
261- {
262- return new IndexScan_Default(indexType, indexKeyRange, ordering, indexScanSelector, usePVals);
263+ return new IndexScan_Default(indexType, indexKeyRange, ordering, indexScanSelector, USE_PVALUES);
264 }
265
266 // Select
267@@ -519,25 +448,12 @@
268 public static Operator count_Default(Operator input,
269 RowType countType)
270 {
271- return new Count_Default(input, countType, Types3Switch.ON);
272- }
273-
274- public static Operator count_Default(Operator input,
275- RowType countType,
276- boolean usePValues)
277- {
278- return new Count_Default(input, countType, usePValues);
279+ return new Count_Default(input, countType, USE_PVALUES);
280 }
281
282 public static Operator count_TableStatus(RowType tableType)
283 {
284- return count_TableStatus(tableType, Types3Switch.ON);
285- }
286-
287-
288- public static Operator count_TableStatus(RowType tableType, boolean usePValues)
289- {
290- return new Count_TableStatus(tableType, usePValues);
291+ return new Count_TableStatus(tableType, USE_PVALUES);
292 }
293
294 // Sort
295@@ -556,40 +472,25 @@
296 Ordering ordering,
297 SortOption sortOption)
298 {
299- return new Sort_Tree(inputOperator, sortType, ordering, sortOption, Types3Switch.ON);
300- }
301-
302- public static Operator sort_Tree(Operator inputOperator,
303- RowType sortType,
304- Ordering ordering,
305- SortOption sortOption,
306- boolean usePVals)
307- {
308- return new Sort_Tree(inputOperator, sortType, ordering, sortOption, usePVals);
309+ return new Sort_Tree(inputOperator, sortType, ordering, sortOption, USE_PVALUES);
310 }
311
312 public static Ordering ordering()
313 {
314- return ordering(Types3Switch.ON);
315- }
316-
317- public static Ordering ordering(boolean usePVals)
318- {
319- return new Ordering(usePVals);
320+ return new Ordering();
321 }
322
323 // Distinct
324 public static Operator distinct_Partial(Operator input, RowType distinctType)
325 {
326- return new Distinct_Partial(input, distinctType, null, Types3Switch.ON);
327+ return new Distinct_Partial(input, distinctType, null, USE_PVALUES);
328 }
329
330 public static Operator distinct_Partial(Operator input,
331 RowType distinctType,
332- List<AkCollator> collators,
333- boolean usePValues)
334+ List<AkCollator> collators)
335 {
336- return new Distinct_Partial(input, distinctType, collators, usePValues);
337+ return new Distinct_Partial(input, distinctType, collators, USE_PVALUES);
338 }
339
340 // Map
341@@ -622,33 +523,11 @@
342
343 public static Operator unionAll(Operator input1, RowType input1RowType, Operator input2, RowType input2RowType)
344 {
345- return unionAll(input1, input1RowType, input2, input2RowType, Types3Switch.ON);
346- }
347-
348- public static Operator unionAll(Operator input1, RowType input1RowType, Operator input2, RowType input2RowType,
349- boolean usePvalues)
350- {
351- return new UnionAll_Default(input1, input1RowType, input2, input2RowType, usePvalues);
352+ return new UnionAll_Default(input1, input1RowType, input2, input2RowType, USE_PVALUES);
353 }
354
355 // Intersect
356
357- /** deprecated */
358-
359- public static Operator intersect_Ordered(Operator leftInput, Operator rightInput,
360- IndexRowType leftRowType, IndexRowType rightRowType,
361- int leftOrderingFields,
362- int rightOrderingFields,
363- int comparisonFields,
364- JoinType joinType,
365- IntersectOption intersectOutput,
366- List<TComparison> comparisons)
367- {
368- return intersect_Ordered(leftInput, rightInput, leftRowType, rightRowType,
369- leftOrderingFields, rightOrderingFields, comparisonFields, joinType, intersectOutput,
370- Types3Switch.ON, comparisons);
371- }
372-
373 public static Operator intersect_Ordered(Operator leftInput, Operator rightInput,
374 IndexRowType leftRowType, IndexRowType rightRowType,
375 int leftOrderingFields,
376@@ -656,7 +535,6 @@
377 int comparisonFields,
378 JoinType joinType,
379 IntersectOption intersectOutput,
380- boolean usePValues,
381 List<TComparison> comparisons)
382 {
383 if (comparisonFields < 0) {
384@@ -671,38 +549,17 @@
385 ascending,
386 joinType,
387 EnumSet.of(intersectOutput),
388- usePValues,
389+ USE_PVALUES,
390 comparisons);
391 }
392
393 public static Operator intersect_Ordered(Operator leftInput, Operator rightInput,
394- IndexRowType leftRowType, IndexRowType rightRowType,
395- int leftOrderingFields,
396- int rightOrderingFields,
397- boolean[] ascending,
398- JoinType joinType,
399- EnumSet<IntersectOption> intersectOptions,
400- List<TComparison> comparisons)
401- {
402- return new Intersect_Ordered(leftInput, rightInput,
403- leftRowType, rightRowType,
404- leftOrderingFields,
405- rightOrderingFields,
406- ascending,
407- joinType,
408- intersectOptions,
409- Types3Switch.ON,
410- comparisons);
411- }
412-
413- public static Operator intersect_Ordered(Operator leftInput, Operator rightInput,
414 IndexRowType leftRowType, IndexRowType rightRowType,
415 int leftOrderingFields,
416 int rightOrderingFields,
417 boolean[] ascending,
418 JoinType joinType,
419 EnumSet<IntersectOption> intersectOptions,
420- boolean usePValues,
421 List<TComparison> comparisons)
422 {
423 return new Intersect_Ordered(leftInput, rightInput,
424@@ -712,7 +569,7 @@
425 ascending,
426 joinType,
427 intersectOptions,
428- usePValues,
429+ USE_PVALUES,
430 comparisons);
431 }
432
433@@ -726,27 +583,11 @@
434 boolean outputEqual)
435 {
436 return new Union_Ordered(leftInput, rightInput,
437- leftRowType, rightRowType,
438- leftOrderingFields,
439- rightOrderingFields,
440- ascending, outputEqual,
441- Types3Switch.ON);
442- }
443-
444- public static Operator union_Ordered(Operator leftInput, Operator rightInput,
445- IndexRowType leftRowType, IndexRowType rightRowType,
446- int leftOrderingFields,
447- int rightOrderingFields,
448- boolean[] ascending,
449- boolean outputEqual,
450- boolean usePValues)
451- {
452- return new Union_Ordered(leftInput, rightInput,
453 leftRowType, rightRowType,
454 leftOrderingFields,
455 rightOrderingFields,
456 ascending, outputEqual,
457- usePValues);
458+ USE_PVALUES);
459 }
460
461 // HKeyUnion
462@@ -778,7 +619,7 @@
463 filterBindingPosition,
464 streamInput,
465 null,
466- Types3Switch.ON);
467+ USE_PVALUES);
468 }
469
470 public static Operator using_BloomFilter(Operator filterInput,
471@@ -786,8 +627,7 @@
472 long estimatedRowCount,
473 int filterBindingPosition,
474 Operator streamInput,
475- List<AkCollator> collators,
476- boolean usePValues)
477+ List<AkCollator> collators)
478 {
479 return new Using_BloomFilter(filterInput,
480 filterRowType,
481@@ -795,7 +635,7 @@
482 filterBindingPosition,
483 streamInput,
484 collators,
485- usePValues);
486+ USE_PVALUES);
487 }
488
489 // Select_BloomFilter
490@@ -863,17 +703,12 @@
491 // Insert
492 public static UpdatePlannable insert_Default(Operator inputOperator)
493 {
494- return insert_Default(inputOperator, Types3Switch.ON);
495- }
496-
497- public static UpdatePlannable insert_Default(Operator inputOperator, boolean usePVals)
498- {
499- return new Insert_Default(inputOperator, usePVals);
500- }
501-
502- public static Operator insert_Returning (Operator inputOperator, boolean usePVals)
503- {
504- return new Insert_Returning (inputOperator, usePVals);
505+ return new Insert_Default(inputOperator, USE_PVALUES);
506+ }
507+
508+ public static Operator insert_Returning (Operator inputOperator)
509+ {
510+ return new Insert_Returning(inputOperator, USE_PVALUES);
511 }
512
513 // Update
514@@ -885,22 +720,21 @@
515 }
516
517 public static Operator update_Returning (Operator inputOperator,
518- UpdateFunction updateFunction,
519- boolean usePValues)
520+ UpdateFunction updateFunction)
521 {
522- return new Update_Returning (inputOperator, updateFunction, usePValues);
523+ return new Update_Returning (inputOperator, updateFunction, USE_PVALUES);
524 }
525
526 // Delete
527
528- public static UpdatePlannable delete_Default(Operator inputOperator, boolean usePValues)
529+ public static UpdatePlannable delete_Default(Operator inputOperator)
530 {
531- return new Delete_Default(inputOperator, usePValues);
532+ return new Delete_Default(inputOperator, USE_PVALUES);
533 }
534
535- public static Operator delete_Returning (Operator inputOperator, boolean usePValues, boolean cascadeDelete)
536+ public static Operator delete_Returning (Operator inputOperator, boolean cascadeDelete)
537 {
538- return new Delete_Returning(inputOperator, usePValues, cascadeDelete);
539+ return new Delete_Returning(inputOperator, USE_PVALUES, cascadeDelete);
540 }
541
542 // Execution interface
543@@ -961,7 +795,7 @@
544 {
545 StringBuilder buffer = new StringBuilder();
546 buffer.append('(');
547- List<?> exprs = usingPVals() ? tExpressions : oExpressions;
548+ List<?> exprs = tExpressions;
549 for (int i = 0, size = sortColumns(); i < size; i++) {
550 if (i > 0) {
551 buffer.append(", ");
552@@ -976,22 +810,13 @@
553
554 public int sortColumns()
555 {
556- return usingPVals() ? tExpressions.size() : oExpressions.size();
557+ return tExpressions.size();
558 }
559
560- public Expression expression(int i) {
561- return oExpressions.get(i);
562- }
563-
564 public TPreparedExpression tExpression(int i) {
565 return tExpressions.get(i);
566 }
567
568- public AkType type(int i)
569- {
570- return oExpressions.get(i).valueType();
571- }
572-
573 public TInstance tInstance(int i) {
574 return tExpressions.get(i).resultType();
575 }
576@@ -1031,87 +856,43 @@
577 public void append(ExpressionGenerator expressionGenerator, boolean ascending)
578 {
579 TPreparedExpression newExpr;
580- Expression oldExpr;
581- if (Types3Switch.ON) {
582- newExpr = expressionGenerator.getTPreparedExpression();
583- oldExpr = null;
584- }
585- else {
586- newExpr = null;
587- oldExpr = expressionGenerator.getExpression();
588- }
589- append(oldExpr, newExpr, ascending);
590- }
591-
592- public void append(Expression expression, boolean ascending)
593- {
594- append(expression, null, ascending);
595- }
596-
597- public void append(Expression expression, TPreparedExpression tExpression, boolean ascending)
598- {
599- append(expression, tExpression, ascending, null);
600+ newExpr = expressionGenerator.getTPreparedExpression();
601+ append(newExpr, ascending);
602+ }
603+
604+ public void append(TPreparedExpression tExpression, boolean ascending)
605+ {
606+ append(tExpression, ascending, null);
607 }
608
609 public void append(ExpressionGenerator expression, boolean ascending, AkCollator collator)
610 {
611- Expression oldStyle;
612 TPreparedExpression newStyle;
613- if (Types3Switch.ON) {
614- newStyle = expression.getTPreparedExpression();
615- oldStyle = null;
616- }
617- else {
618- newStyle = null;
619- oldStyle = expression.getExpression();
620- }
621- append(oldStyle, newStyle, ascending, collator);
622+ newStyle = expression.getTPreparedExpression();
623+ append(newStyle, ascending, collator);
624 }
625
626- public void append(Expression expression, TPreparedExpression tExpression, boolean ascending,
627+ public void append(TPreparedExpression tExpression, boolean ascending,
628 AkCollator collator)
629 {
630- if (oExpressions != null)
631- oExpressions.add(expression);
632- else
633- tExpressions.add(tExpression);
634+ tExpressions.add(tExpression);
635 directions.add(ascending);
636 collators.add(collator);
637 }
638
639 public Ordering copy()
640 {
641- boolean pvals = usingPVals();
642- Ordering copy = new Ordering(pvals);
643- if (pvals)
644- copy.tExpressions.addAll(tExpressions);
645- else
646- copy.oExpressions.addAll(oExpressions);
647+ Ordering copy = new Ordering();
648+ copy.tExpressions.addAll(tExpressions);
649 copy.directions.addAll(directions);
650 copy.collators.addAll(collators);
651 return copy;
652 }
653-
654- public boolean usingPVals() {
655- return tExpressions != null;
656- }
657-
658+
659 public Ordering() {
660- this(Types3Switch.ON);
661- }
662-
663- private Ordering(boolean usePVals) {
664- if (usePVals) {
665- tExpressions = new ArrayList<>();
666- oExpressions = null;
667- }
668- else {
669- tExpressions = null;
670- oExpressions = new ArrayList<>();
671- }
672+ tExpressions = new ArrayList<>();
673 }
674
675- private final List<com.akiban.server.expression.Expression> oExpressions;
676 private final List<TPreparedExpression> tExpressions;
677 private final List<Boolean> directions = new ArrayList<>(); // true: ascending, false: descending
678 private final List<AkCollator> collators = new ArrayList<>();
679
680=== modified file 'src/main/java/com/akiban/qp/operator/Sort_InsertionLimited.java'
681--- src/main/java/com/akiban/qp/operator/Sort_InsertionLimited.java 2013-03-22 20:05:57 +0000
682+++ src/main/java/com/akiban/qp/operator/Sort_InsertionLimited.java 2013-04-30 23:23:36 +0000
683@@ -185,14 +185,8 @@
684 CursorLifecycle.checkIdle(this);
685 input.open();
686 state = State.FILLING;
687- if (usingPValues()) {
688- for (TEvaluatableExpression eval : tEvaluations)
689- eval.with(context);
690- }
691- else {
692- for (ExpressionEvaluation eval : oEvaluations)
693- eval.of(context);
694- }
695+ for (TEvaluatableExpression eval : tEvaluations)
696+ eval.with(context);
697 sorted = new TreeSet<>();
698 } finally {
699 TAP_OPEN.out();
700@@ -219,10 +213,7 @@
701 while ((row = input.next()) != null) {
702 assert row.rowType() == sortType : row;
703 Holder holder;
704- if (usingPValues())
705- holder = new Holder(label, row, tEvaluations, null);
706- else
707- holder = new Holder(label, row, oEvaluations);
708+ holder = new Holder(label, row, tEvaluations, null);
709 if (preserveDuplicates) {
710 label++;
711 }
712@@ -312,14 +303,7 @@
713 {
714 close();
715 input.destroy();
716- if (usingPValues()) {
717- // TODO nothing to destroy yet...
718- }
719- else {
720- for (ExpressionEvaluation evaluation : oEvaluations) {
721- evaluation.destroy();
722- }
723- }
724+ // TODO nothing to destroy for expressions yet
725 state = State.DESTROYED;
726 }
727
728@@ -354,21 +338,10 @@
729 super(context);
730 this.input = input;
731 int nsort = ordering.sortColumns();
732- if (ordering.usingPVals()) {
733- tEvaluations = new ArrayList<>(nsort);
734- for (int i = 0; i < nsort; ++i) {
735- TEvaluatableExpression evaluation = ordering.tExpression(i).build();
736- tEvaluations.add(evaluation);
737- }
738- oEvaluations = null;
739- }
740- else {
741- tEvaluations = null;
742- oEvaluations = new ArrayList<>(nsort);
743- for (int i = 0; i < nsort; i++) {
744- ExpressionEvaluation evaluation = ordering.expression(i).evaluation();
745- oEvaluations.add(evaluation);
746- }
747+ tEvaluations = new ArrayList<>(nsort);
748+ for (int i = 0; i < nsort; ++i) {
749+ TEvaluatableExpression evaluation = ordering.tExpression(i).build();
750+ tEvaluations.add(evaluation);
751 }
752 }
753
754@@ -376,7 +349,6 @@
755
756 private final Cursor input;
757 private final List<TEvaluatableExpression> tEvaluations;
758- private final List<ExpressionEvaluation> oEvaluations;
759 private State state = State.CLOSED;
760 private SortedSet<Holder> sorted;
761 private Iterator<Holder> iterator;
762@@ -408,25 +380,6 @@
763 }
764 }
765
766- public Holder(int index, Row arow, List<ExpressionEvaluation> evaluations) {
767- this.index = index;
768-
769- row = new ShareHolder<>();
770- row.hold(arow);
771-
772- ToObjectValueTarget target = new ToObjectValueTarget();
773-
774- values = new Comparable[ordering.sortColumns()];
775- for (int i = 0; i < values.length; i++) {
776- ExpressionEvaluation evaluation = evaluations.get(i);
777- evaluation.of(arow);
778- ValueSource valueSource = evaluation.eval();
779- target.expectType(ordering.type(i));
780- Converters.convert(valueSource, target);
781- values[i] = (Comparable) target.lastConvertedValue();
782- }
783- }
784-
785 public Row empty() {
786 Row result = row.get();
787 row.release();
788
789=== modified file 'src/main/java/com/akiban/qp/persistitadapter/OperatorBasedRowCollector.java'
790--- src/main/java/com/akiban/qp/persistitadapter/OperatorBasedRowCollector.java 2013-03-22 20:05:57 +0000
791+++ src/main/java/com/akiban/qp/persistitadapter/OperatorBasedRowCollector.java 2013-04-30 23:23:36 +0000
792@@ -282,9 +282,9 @@
793 plan = groupScan_Default(group);
794 if (scanLimit != ScanLimit.NONE) {
795 if (scanLimit instanceof FixedCountLimit) {
796- plan = limit_Default(plan, ((FixedCountLimit) scanLimit).getLimit(), usePVals);
797+ plan = limit_Default(plan, ((FixedCountLimit) scanLimit).getLimit());
798 } else if (scanLimit instanceof PredicateLimit) {
799- plan = limit_Default(plan, ((PredicateLimit) scanLimit).getLimit(), usePVals);
800+ plan = limit_Default(plan, ((PredicateLimit) scanLimit).getLimit());
801 }
802 }
803 }
804
805=== modified file 'src/main/java/com/akiban/qp/persistitadapter/OperatorStore.java'
806--- src/main/java/com/akiban/qp/persistitadapter/OperatorStore.java 2013-04-14 00:26:23 +0000
807+++ src/main/java/com/akiban/qp/persistitadapter/OperatorStore.java 2013-04-30 23:23:36 +0000
808@@ -136,7 +136,7 @@
809
810 // MVCC will render this useless, but for now, a limit of 1 ensures we won't see the row we just updated,
811 // and therefore scan through two rows -- once to update old -> new, then to update new -> copy of new
812- scanOp = limit_Default(scanOp, 1, Types3Switch.ON);
813+ scanOp = limit_Default(scanOp, 1);
814
815 UpdatePlannable updateOp = update_Default(scanOp, updateFunction);
816
817
818=== modified file 'src/main/java/com/akiban/qp/persistitadapter/indexcursor/IndexCursorSpatial_InBox.java'
819--- src/main/java/com/akiban/qp/persistitadapter/indexcursor/IndexCursorSpatial_InBox.java 2013-03-22 20:05:57 +0000
820+++ src/main/java/com/akiban/qp/persistitadapter/indexcursor/IndexCursorSpatial_InBox.java 2013-04-30 23:23:36 +0000
821@@ -108,11 +108,7 @@
822 API.Ordering zOrdering = new API.Ordering();
823 IndexRowType rowType = keyRange.indexRowType().physicalRowType();
824 for (int f = 0; f < rowType.nFields(); f++) {
825- if (Types3Switch.ON) {
826- zOrdering.append(null, new TPreparedField(rowType.typeInstanceAt(f), f), true);
827- } else {
828- zOrdering.append(Expressions.field(rowType, f), null, true);
829- }
830+ zOrdering.append(new TPreparedField(rowType.typeInstanceAt(f), f), true);
831 }
832 // The index column selector needs to select all the columns before the z column, and the z column itself.
833 this.indexColumnSelector = new IndexRowPrefixSelector(this.latColumn + 1);
834
835=== modified file 'src/main/java/com/akiban/qp/persistitadapter/indexcursor/IndexCursorSpatial_NearPoint.java'
836--- src/main/java/com/akiban/qp/persistitadapter/indexcursor/IndexCursorSpatial_NearPoint.java 2013-03-22 20:05:57 +0000
837+++ src/main/java/com/akiban/qp/persistitadapter/indexcursor/IndexCursorSpatial_NearPoint.java 2013-04-30 23:23:36 +0000
838@@ -39,6 +39,7 @@
839 import com.akiban.server.types3.mcompat.mtypes.MNumeric;
840 import com.akiban.server.types3.pvalue.PValue;
841 import com.akiban.server.types3.pvalue.PValueSource;
842+import com.akiban.server.types3.texpressions.TPreparedExpression;
843
844 import java.math.BigDecimal;
845
846@@ -139,17 +140,10 @@
847 IndexBound loBound = keyRange.lo();
848 BoundExpressions loExpressions = loBound.boundExpressions(context);
849 // Compute z-value at beginning of forward and backward scans
850- BigDecimal lat;
851- BigDecimal lon;
852- if (Types3Switch.ON) {
853- TInstance latInstance = index.getAllColumns().get(latColumn).getColumn().tInstance();
854- TInstance lonInstance = index.getAllColumns().get(lonColumn).getColumn().tInstance();
855- lat = MBigDecimal.getWrapper(loExpressions.pvalue(latColumn), latInstance).asBigDecimal();
856- lon = MBigDecimal.getWrapper(loExpressions.pvalue(lonColumn), lonInstance).asBigDecimal();
857- } else {
858- lat = loExpressions.eval(latColumn).getDecimal();
859- lon = loExpressions.eval(lonColumn).getDecimal();
860- }
861+ TInstance latInstance = index.getAllColumns().get(latColumn).getColumn().tInstance();
862+ TInstance lonInstance = index.getAllColumns().get(lonColumn).getColumn().tInstance();
863+ BigDecimal lat = MBigDecimal.getWrapper(loExpressions.pvalue(latColumn), latInstance).asBigDecimal();
864+ BigDecimal lon = MBigDecimal.getWrapper(loExpressions.pvalue(lonColumn), lonInstance).asBigDecimal();
865 zStart = space.shuffle(lat, lon);
866 // Cursors going forward from starting z value (inclusive), and backward from the same z value (exclusive)
867 int indexRowFields = physicalIndexRowType.nFields();
868@@ -164,41 +158,23 @@
869 // Take care of any equality restrictions before the spatial fields
870 zPosition = latColumn;
871 for (int f = 0; f < zPosition; f++) {
872- if (Types3Switch.ON) {
873- PValueSource eqValueSource = loExpressions.pvalue(f);
874- zForwardRow.value(f, eqValueSource);
875- zBackwardRow.value(f, eqValueSource);
876- zMaxRow.value(f, eqValueSource);
877- zMinRow.value(f, eqValueSource);
878- } else {
879- ValueSource eqValue = loExpressions.eval(f);
880- zForwardRow.value(f, eqValue);
881- zBackwardRow.value(f, eqValue);
882- zMaxRow.value(f, eqValue);
883- zMinRow.value(f, eqValue);
884- }
885+ PValueSource eqValueSource = loExpressions.pvalue(f);
886+ zForwardRow.value(f, eqValueSource);
887+ zBackwardRow.value(f, eqValueSource);
888+ zMaxRow.value(f, eqValueSource);
889+ zMinRow.value(f, eqValueSource);
890 }
891 // Z-value part of bounds
892- if (Types3Switch.ON) {
893- PValue startPValue = new PValue(MNumeric.BIGINT.instance(false));
894- PValue maxPValue = new PValue(MNumeric.BIGINT.instance(false));
895- PValue minPValue = new PValue(MNumeric.BIGINT.instance(false));
896- startPValue.putInt64(zStart);
897- maxPValue.putInt64(Long.MAX_VALUE);
898- minPValue.putInt64(Long.MIN_VALUE);
899- zForwardRow.value(zPosition, startPValue);
900- zBackwardRow.value(zPosition, startPValue);
901- zMaxRow.value(zPosition, maxPValue);
902- zMinRow.value(zPosition, minPValue);
903- } else {
904- ValueSource startValue = new ValueHolder(AkType.LONG, zStart);
905- ValueSource maxValue = new ValueHolder(AkType.LONG, Long.MAX_VALUE);
906- ValueSource minValue = new ValueHolder(AkType.LONG, Long.MIN_VALUE);
907- zForwardRow.value(zPosition, startValue);
908- zBackwardRow.value(zPosition, startValue);
909- zMaxRow.value(zPosition, maxValue);
910- zMinRow.value(zPosition, minValue);
911- }
912+ PValue startPValue = new PValue(MNumeric.BIGINT.instance(false));
913+ PValue maxPValue = new PValue(MNumeric.BIGINT.instance(false));
914+ PValue minPValue = new PValue(MNumeric.BIGINT.instance(false));
915+ startPValue.putInt64(zStart);
916+ maxPValue.putInt64(Long.MAX_VALUE);
917+ minPValue.putInt64(Long.MIN_VALUE);
918+ zForwardRow.value(zPosition, startPValue);
919+ zBackwardRow.value(zPosition, startPValue);
920+ zMaxRow.value(zPosition, maxPValue);
921+ zMinRow.value(zPosition, minPValue);
922 IndexKeyRange geKeyRange = IndexKeyRange.bounded(physicalIndexRowType, zForward, true, zMax, false);
923 IndexKeyRange ltKeyRange = IndexKeyRange.bounded(physicalIndexRowType, zMin, false, zBackward, false);
924 IndexScanRowState geRowState = new IndexScanRowState(adapter, keyRange.indexRowType());
925@@ -206,33 +182,20 @@
926 API.Ordering upOrdering = new API.Ordering();
927 API.Ordering downOrdering = new API.Ordering();
928 for (int f = 0; f < physicalIndexRowType.nFields(); f++) {
929- upOrdering.append(Expressions.field(physicalIndexRowType, 0), true);
930- downOrdering.append(Expressions.field(physicalIndexRowType, 0), false);
931- }
932- if (Types3Switch.ON) {
933- geCursor = new IndexCursorUnidirectional<>(context,
934- geRowState,
935- geKeyRange,
936- upOrdering,
937- PValueSortKeyAdapter.INSTANCE);
938- ltCursor = new IndexCursorUnidirectional<>(context,
939- ltRowState,
940- ltKeyRange,
941- downOrdering,
942- PValueSortKeyAdapter.INSTANCE);
943- }
944- else {
945- geCursor = new IndexCursorUnidirectional<>(context,
946- geRowState,
947- geKeyRange,
948- upOrdering,
949- OldExpressionsSortKeyAdapter.INSTANCE);
950- ltCursor = new IndexCursorUnidirectional<>(context,
951- ltRowState,
952- ltKeyRange,
953- downOrdering,
954- OldExpressionsSortKeyAdapter.INSTANCE);
955- }
956+ // TODO: This seems like an API hack
957+ upOrdering.append((TPreparedExpression)null, true);
958+ downOrdering.append((TPreparedExpression)null, false);
959+ }
960+ geCursor = new IndexCursorUnidirectional<>(context,
961+ geRowState,
962+ geKeyRange,
963+ upOrdering,
964+ PValueSortKeyAdapter.INSTANCE);
965+ ltCursor = new IndexCursorUnidirectional<>(context,
966+ ltRowState,
967+ ltKeyRange,
968+ downOrdering,
969+ PValueSortKeyAdapter.INSTANCE);
970 }
971
972 // For use by this class
973
974=== modified file 'src/main/java/com/akiban/qp/persistitadapter/indexcursor/OldSorterAdapter.java'
975--- src/main/java/com/akiban/qp/persistitadapter/indexcursor/OldSorterAdapter.java 2013-03-22 20:05:57 +0000
976+++ src/main/java/com/akiban/qp/persistitadapter/indexcursor/OldSorterAdapter.java 2013-04-30 23:23:36 +0000
977@@ -36,7 +36,7 @@
978 final class OldSorterAdapter extends SorterAdapter<ValueSource, Expression, ExpressionEvaluation> {
979 @Override
980 protected void appendDummy(API.Ordering ordering) {
981- ordering.append(DUMMY_EXPRESSION, null, ordering.ascending(0));
982+ throw new IllegalStateException("types3 off");
983 }
984
985 @Override
986@@ -56,14 +56,12 @@
987
988 @Override
989 protected void initTypes(API.Ordering ordering, int i, AkType[] akTypes, TInstance[] tInstances) {
990- akTypes[i] = ordering.type(i);
991+ throw new IllegalStateException("types3 off");
992 }
993
994 @Override
995 protected ExpressionEvaluation evaluation(API.Ordering ordering, QueryContext context, int i) {
996- ExpressionEvaluation evaluation = ordering.expression(i).evaluation();
997- evaluation.of(context);
998- return evaluation;
999+ throw new IllegalStateException("types3 off");
1000 }
1001
1002 @Override
1003
1004=== modified file 'src/main/java/com/akiban/qp/persistitadapter/indexcursor/PValueSorterAdapter.java'
1005--- src/main/java/com/akiban/qp/persistitadapter/indexcursor/PValueSorterAdapter.java 2013-03-22 20:05:57 +0000
1006+++ src/main/java/com/akiban/qp/persistitadapter/indexcursor/PValueSorterAdapter.java 2013-04-30 23:23:36 +0000
1007@@ -36,7 +36,7 @@
1008 final class PValueSorterAdapter extends SorterAdapter<PValueSource, TPreparedExpression, TEvaluatableExpression> {
1009 @Override
1010 protected void appendDummy(API.Ordering ordering) {
1011- ordering.append(null, DUMMY_EXPRESSION, ordering.ascending(0));
1012+ ordering.append(DUMMY_EXPRESSION, ordering.ascending(0));
1013 }
1014
1015 @Override
1016
1017=== modified file 'src/main/java/com/akiban/qp/row/ValuesHolderRow.java'
1018--- src/main/java/com/akiban/qp/row/ValuesHolderRow.java 2013-03-22 20:05:57 +0000
1019+++ src/main/java/com/akiban/qp/row/ValuesHolderRow.java 2013-04-30 23:23:36 +0000
1020@@ -43,7 +43,7 @@
1021
1022 @Deprecated
1023 public ValuesHolderRow(RowType rowType) {
1024- this(rowType, false);
1025+ this(rowType, true);
1026 }
1027
1028 public ValuesHolderRow(RowType rowType, boolean usePValues) {
1029
1030=== modified file 'src/main/java/com/akiban/server/explain/std/SortOperatorExplainer.java'
1031--- src/main/java/com/akiban/server/explain/std/SortOperatorExplainer.java 2013-03-22 20:05:57 +0000
1032+++ src/main/java/com/akiban/server/explain/std/SortOperatorExplainer.java 2013-04-30 23:23:36 +0000
1033@@ -40,10 +40,7 @@
1034 map.put(Label.INPUT_OPERATOR, inputOp.getExplainer(context));
1035 for (int i = 0; i < ordering.sortColumns(); i++)
1036 {
1037- if (ordering.usingPVals())
1038- map.put(Label.EXPRESSIONS, ordering.tExpression(i).getExplainer(context));
1039- else
1040- map.put(Label.EXPRESSIONS, ordering.expression(i).getExplainer(context));
1041+ map.put(Label.EXPRESSIONS, ordering.tExpression(i).getExplainer(context));
1042 map.put(Label.ORDERING, PrimitiveExplainer.getInstance(ordering.ascending(i) ? "ASC" : "DESC"));
1043 }
1044
1045
1046=== modified file 'src/main/java/com/akiban/server/service/restdml/DeleteGenerator.java'
1047--- src/main/java/com/akiban/server/service/restdml/DeleteGenerator.java 2013-04-11 15:03:00 +0000
1048+++ src/main/java/com/akiban/server/service/restdml/DeleteGenerator.java 2013-04-30 23:23:36 +0000
1049@@ -31,6 +31,6 @@
1050 protected Operator create(TableName tableName) {
1051 Operator lookup = indexAncestorLookup(tableName);
1052 // build delete operator.
1053- return API.delete_Returning(lookup, true, true);
1054+ return API.delete_Returning(lookup, true);
1055 }
1056 }
1057
1058=== modified file 'src/main/java/com/akiban/server/service/restdml/InsertGenerator.java'
1059--- src/main/java/com/akiban/server/service/restdml/InsertGenerator.java 2013-04-11 15:03:00 +0000
1060+++ src/main/java/com/akiban/server/service/restdml/InsertGenerator.java 2013-04-30 23:23:36 +0000
1061@@ -62,7 +62,7 @@
1062
1063 RowStream stream = assembleValueScan (table);
1064 stream = assembleProjectTable (stream, table);
1065- stream.operator = API.insert_Returning(stream.operator, true);
1066+ stream.operator = API.insert_Returning(stream.operator);
1067 stream = projectTable(stream, table);
1068 return stream.operator;
1069 }
1070
1071=== modified file 'src/main/java/com/akiban/server/service/restdml/UpdateGenerator.java'
1072--- src/main/java/com/akiban/server/service/restdml/UpdateGenerator.java 2013-04-12 10:33:28 +0000
1073+++ src/main/java/com/akiban/server/service/restdml/UpdateGenerator.java 2013-04-30 23:23:36 +0000
1074@@ -93,7 +93,7 @@
1075 }
1076 UpdateFunction updateFunction =
1077 new UpsertRowUpdateFunction(Arrays.asList(updates), stream.rowType);
1078- stream.operator = API.update_Returning(stream.operator, updateFunction, true);
1079+ stream.operator = API.update_Returning(stream.operator, updateFunction);
1080
1081 if (logger.isDebugEnabled()) {
1082 ExplainContext explain = explainUpdateStatement(stream.operator, table, Arrays.asList(updates));
1083
1084=== modified file 'src/main/java/com/akiban/server/types3/Types3Switch.java'
1085--- src/main/java/com/akiban/server/types3/Types3Switch.java 2013-03-22 20:05:57 +0000
1086+++ src/main/java/com/akiban/server/types3/Types3Switch.java 2013-04-30 23:23:36 +0000
1087@@ -19,6 +19,11 @@
1088
1089 public class Types3Switch {
1090 public static final boolean DEFAULT = Boolean.parseBoolean(System.getProperty("newtypes", "true"));
1091+ static {
1092+ if(!DEFAULT) {
1093+ throw new IllegalStateException("Expected newtypes=true");
1094+ }
1095+ }
1096
1097 public static volatile boolean ON = DEFAULT;
1098 }
1099
1100=== modified file 'src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java'
1101--- src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java 2013-04-28 04:00:20 +0000
1102+++ src/main/java/com/akiban/sql/optimizer/rule/OperatorAssembler.java 2013-04-30 23:23:36 +0000
1103@@ -528,7 +528,7 @@
1104
1105 @Override
1106 public API.Ordering createOrdering() {
1107- return API.ordering(false);
1108+ throw new IllegalStateException("types3 off");
1109 }
1110 }
1111
1112@@ -602,7 +602,7 @@
1113
1114 @Override
1115 public API.Ordering createOrdering() {
1116- return API.ordering(true);
1117+ return API.ordering();
1118 }
1119
1120 @Override
1121@@ -769,7 +769,7 @@
1122
1123 stream = assembleInsertProjectTable (stream, projectFields, insert);
1124
1125- stream.operator = API.insert_Returning(stream.operator, usePValues);
1126+ stream.operator = API.insert_Returning(stream.operator);
1127
1128 if (explainContext != null)
1129 explainInsertStatement(stream.operator, insert);
1130@@ -963,7 +963,7 @@
1131 UpdateFunction updateFunction =
1132 new ExpressionRowUpdateFunction(updates, updatesP, targetRowType);
1133
1134- stream.operator = API.update_Returning(stream.operator, updateFunction, usePValues);
1135+ stream.operator = API.update_Returning(stream.operator, updateFunction);
1136 stream.fieldOffsets = new ColumnSourceFieldOffsets (updateStatement.getTable(), targetRowType);
1137 if (explainContext != null)
1138 explainUpdateStatement(stream.operator, updateStatement, updateColumns, updates, updatesP);
1139@@ -992,7 +992,7 @@
1140 //stream = assembleDeleteProjectTable (stream, projectFields, delete);
1141 UserTableRowType targetRowType = tableRowType(delete.getTargetTable());
1142
1143- stream.operator = API.delete_Returning(stream.operator, usePValues, false);
1144+ stream.operator = API.delete_Returning(stream.operator, false);
1145 stream.fieldOffsets = new ColumnSourceFieldOffsets(delete.getTable(), targetRowType);
1146
1147 if (explainContext != null)
1148@@ -1147,7 +1147,6 @@
1149 API.IntersectOption.SKIP_SCAN) :
1150 EnumSet.of(API.IntersectOption.OUTPUT_LEFT,
1151 API.IntersectOption.SEQUENTIAL_SCAN),
1152- usePValues,
1153 comparisons);
1154 stream.rowType = outputScan.rowType;
1155 stream.fieldOffsets = new IndexFieldOffsets(index, stream.rowType);
1156@@ -1184,8 +1183,7 @@
1157 stream.operator = API.indexScan_Default(indexRowType,
1158 assembleSpatialIndexKeyRange(indexScan, null),
1159 API.ordering(), // TODO: what ordering?
1160- selector,
1161- usePValues);
1162+ selector);
1163 indexRowType = indexRowType.physicalRowType();
1164 stream.rowType = indexRowType;
1165 }
1166@@ -1193,8 +1191,7 @@
1167 stream.operator = API.indexScan_Default(indexRowType,
1168 assembleIndexKeyRange(indexScan, null),
1169 assembleIndexOrdering(indexScan, indexRowType),
1170- selector,
1171- usePValues);
1172+ selector);
1173 stream.rowType = indexRowType;
1174 }
1175 else {
1176@@ -1225,8 +1222,7 @@
1177 Operator scan = API.indexScan_Default(indexRowType,
1178 assembleIndexKeyRange(indexScan, null, rangeSegment),
1179 assembleIndexOrdering(indexScan, indexRowType),
1180- selector,
1181- usePValues);
1182+ selector);
1183 if (stream.operator == null) {
1184 stream.operator = scan;
1185 stream.rowType = indexRowType;
1186@@ -1242,11 +1238,10 @@
1187 stream.operator = API.union_Ordered(stream.operator, scan,
1188 (IndexRowType)stream.rowType, indexRowType,
1189 nordering, nordering,
1190- ascending, unionOrderedAll,
1191- usePValues);
1192+ ascending, unionOrderedAll);
1193 }
1194 else {
1195- stream.operator = API.unionAll(stream.operator, stream.rowType, scan, indexRowType, usePValues);
1196+ stream.operator = API.unionAll(stream.operator, stream.rowType, scan, indexRowType);
1197 stream.rowType = stream.operator.rowType();
1198 }
1199 }
1200@@ -1603,12 +1598,11 @@
1201 stream = assembleStream(aggregateSource.getInput());
1202 // TODO: Could be removed, since aggregate_Partial works as well.
1203 stream.operator = API.count_Default(stream.operator,
1204- stream.rowType,
1205- usePValues);
1206+ stream.rowType);
1207 }
1208 else {
1209 stream = new RowStream();
1210- stream.operator = API.count_TableStatus(tableRowType(aggregateSource.getTable()), usePValues);
1211+ stream.operator = API.count_TableStatus(tableRowType(aggregateSource.getTable()));
1212 }
1213 stream.rowType = stream.operator.rowType();
1214 stream.fieldOffsets = new ColumnSourceFieldOffsets(aggregateSource,
1215@@ -1666,7 +1660,7 @@
1216 case PRESORTED:
1217 List<AkCollator> collators = findCollators(distinct.getInput());
1218 if (collators != null) {
1219- stream.operator = API.distinct_Partial(stream.operator, stream.rowType, collators, usePValues);
1220+ stream.operator = API.distinct_Partial(stream.operator, stream.rowType, collators);
1221 } else {
1222 throw new UnsupportedOperationException(String.format(
1223 "Can't use Distinct_Partial except following a projection. Try again when types3 is in place"));
1224@@ -1716,11 +1710,9 @@
1225 RowStream stream = assembleStream(sort.getInput());
1226 API.Ordering ordering = partialAssembler.createOrdering();
1227 for (OrderByExpression orderBy : sort.getOrderBy()) {
1228- Expression expr = oldPartialAssembler.assembleExpression(orderBy.getExpression(),
1229- stream.fieldOffsets);
1230 TPreparedExpression tExpr = newPartialAssembler.assembleExpression(orderBy.getExpression(),
1231 stream.fieldOffsets);
1232- ordering.append(expr, tExpr, orderBy.isAscending(), orderBy.getCollator());
1233+ ordering.append(tExpr, orderBy.isAscending(), orderBy.getCollator());
1234 }
1235 assembleSort(stream, ordering, sort.getInput(), output, sortOption);
1236 return stream;
1237@@ -1747,7 +1739,7 @@
1238 stream.operator = API.sort_InsertionLimited(stream.operator, stream.rowType,
1239 ordering, sortOption, maxrows);
1240 else
1241- stream.operator = API.sort_Tree(stream.operator, stream.rowType, ordering, sortOption, usePValues);
1242+ stream.operator = API.sort_Tree(stream.operator, stream.rowType, ordering, sortOption);
1243 }
1244
1245 protected void assembleSort(RowStream stream, int nkeys, PlanNode input,
1246@@ -1755,9 +1747,8 @@
1247 List<AkCollator> collators = findCollators(input);
1248 API.Ordering ordering = partialAssembler.createOrdering();
1249 for (int i = 0; i < nkeys; i++) {
1250- Expression expr = oldPartialAssembler.field(stream.rowType, i);
1251 TPreparedExpression tExpr = newPartialAssembler.field(stream.rowType, i);
1252- ordering.append(expr, tExpr, true,
1253+ ordering.append(tExpr, true,
1254 (collators == null) ? null : collators.get(i));
1255 }
1256 assembleSort(stream, ordering, input, null, sortOption);
1257@@ -1770,7 +1761,7 @@
1258 nlimit = Integer.MAX_VALUE; // Slight disagreement in saying unlimited.
1259 stream.operator = API.limit_Default(stream.operator,
1260 limit.getOffset(), limit.isOffsetParameter(),
1261- nlimit, limit.isLimitParameter(), usePValues);
1262+ nlimit, limit.isLimitParameter());
1263 return stream;
1264 }
1265
1266@@ -1786,7 +1777,7 @@
1267
1268 protected RowStream assembleOnlyIfEmpty(OnlyIfEmpty onlyIfEmpty) {
1269 RowStream stream = assembleStream(onlyIfEmpty.getInput());
1270- stream.operator = API.limit_Default(stream.operator, 0, false, 1, false, usePValues);
1271+ stream.operator = API.limit_Default(stream.operator, 0, false, 1, false);
1272 // Nulls here have no semantic meaning, but they're easier than trying to
1273 // figure out an interesting non-null value for each
1274 // AkType in the row. All that really matters is that the
1275@@ -1813,8 +1804,7 @@
1276 bloomFilter.getEstimatedSize(),
1277 pos + loopBindingsOffset,
1278 stream.operator,
1279- collators,
1280- usePValues);
1281+ collators);
1282 popHashTable(bloomFilter);
1283 return stream;
1284 }
1285@@ -2003,8 +1993,7 @@
1286 for (int i = 0; i < indexOrdering.size(); i++) {
1287 Expression expr = oldPartialAssembler.field(indexRowType, i);
1288 TPreparedExpression tExpr = newPartialAssembler.field(indexRowType, i);
1289- ordering.append(expr,
1290- tExpr,
1291+ ordering.append(tExpr,
1292 indexOrdering.get(i).isAscending(),
1293 index.getIndexColumns().get(i).getColumn().getCollator());
1294 }
1295
1296=== modified file 'src/main/java/com/akiban/sql/optimizer/rule/PlanGenerator.java'
1297--- src/main/java/com/akiban/sql/optimizer/rule/PlanGenerator.java 2013-03-22 20:05:57 +0000
1298+++ src/main/java/com/akiban/sql/optimizer/rule/PlanGenerator.java 2013-04-30 23:23:36 +0000
1299@@ -180,14 +180,13 @@
1300 bound, true,
1301 bound, true);
1302
1303- Ordering ordering = API.ordering(true);
1304+ Ordering ordering = API.ordering();
1305 for (int i = 0; i < nkeys; i++) {
1306- ordering.append(null,
1307- new TPreparedField(indexType.typeInstanceAt(i), i),
1308+ ordering.append(new TPreparedField(indexType.typeInstanceAt(i), i),
1309 false);
1310 }
1311
1312- return API.indexScan_Default(indexType, indexRange, ordering, true);
1313+ return API.indexScan_Default(indexType, indexRange, ordering);
1314
1315 }
1316 }
1317
1318=== modified file 'src/test/java/com/akiban/qp/operator/Distinct_PartialTest.java'
1319--- src/test/java/com/akiban/qp/operator/Distinct_PartialTest.java 2013-03-22 20:05:57 +0000
1320+++ src/test/java/com/akiban/qp/operator/Distinct_PartialTest.java 2013-04-30 23:23:36 +0000
1321@@ -181,8 +181,8 @@
1322 );
1323 Ordering ordering = ordering();
1324 if (Types3Switch.ON) {
1325- ordering.append(null, new TPreparedField(input.rowType().typeInstanceAt(0), 0), true);
1326- ordering.append(null, new TPreparedField(input.rowType().typeInstanceAt(1), 1), true);
1327+ ordering.append(new TPreparedField(input.rowType().typeInstanceAt(0), 0), true);
1328+ ordering.append(new TPreparedField(input.rowType().typeInstanceAt(1), 1), true);
1329 }
1330 else {
1331 ordering.append(field(input.rowType(), 0), true);
1332
1333=== modified file 'src/test/java/com/akiban/server/test/it/qp/DeleteIT.java'
1334--- src/test/java/com/akiban/server/test/it/qp/DeleteIT.java 2013-03-22 20:05:57 +0000
1335+++ src/test/java/com/akiban/server/test/it/qp/DeleteIT.java 2013-04-30 23:23:36 +0000
1336@@ -102,7 +102,7 @@
1337 Row[] rows = {
1338 row(customerRowType, new Object[]{2, "abc"}, new AkType[]{AkType.INT, AkType.VARCHAR})
1339 };
1340- UpdatePlannable insertPlan = delete_Default(rowsToValueScan(rows), Types3Switch.ON);
1341+ UpdatePlannable insertPlan = delete_Default(rowsToValueScan(rows));
1342 UpdateResult result = insertPlan.run(queryContext);
1343 assertEquals("rows touched", rows.length, result.rowsTouched());
1344 assertEquals("rows modified", rows.length, result.rowsModified());
1345
1346=== modified file 'src/test/java/com/akiban/server/test/it/qp/Distinct_Partial_CaseInsensitive_IT.java'
1347--- src/test/java/com/akiban/server/test/it/qp/Distinct_Partial_CaseInsensitive_IT.java 2013-03-22 20:05:57 +0000
1348+++ src/test/java/com/akiban/server/test/it/qp/Distinct_Partial_CaseInsensitive_IT.java 2013-04-30 23:23:36 +0000
1349@@ -349,8 +349,7 @@
1350 SortOption.PRESERVE_DUPLICATES,
1351 db.length),
1352 projectRowType,
1353- Arrays.asList(caseSensitiveCollator),
1354- Types3Switch.ON);
1355+ Arrays.asList(caseSensitiveCollator));
1356 RowBase[] expected = new RowBase[] {
1357 row(projectRowType, "AA_cs"),
1358 row(projectRowType, "Aa_cs"),
1359@@ -387,8 +386,7 @@
1360 SortOption.PRESERVE_DUPLICATES,
1361 db.length),
1362 projectRowType,
1363- Arrays.asList(caseInsensitiveCollator),
1364- Types3Switch.ON),
1365+ Arrays.asList(caseInsensitiveCollator)),
1366 projectRowType,
1367 convertToUpper);
1368 RowBase[] expected = new RowBase[] {
1369@@ -418,8 +416,7 @@
1370 SortOption.PRESERVE_DUPLICATES,
1371 db.length),
1372 projectRowType,
1373- Arrays.asList((AkCollator)null),
1374- Types3Switch.ON);
1375+ Arrays.asList((AkCollator)null));
1376 RowBase[] expected = new RowBase[] {
1377 row(projectRowType, 0L),
1378 };
1379@@ -454,8 +451,7 @@
1380 SortOption.PRESERVE_DUPLICATES,
1381 db.length),
1382 projectRowType,
1383- Arrays.asList(caseSensitiveCollator, caseInsensitiveCollator, null),
1384- Types3Switch.ON),
1385+ Arrays.asList(caseSensitiveCollator, caseInsensitiveCollator, null)),
1386 projectRowType,
1387 convertCaseInsensitiveToUpper);
1388 RowBase[] expected = new RowBase[] {
1389
1390=== modified file 'src/test/java/com/akiban/server/test/it/qp/IndexScanJumpUnboundedIT.java'
1391--- src/test/java/com/akiban/server/test/it/qp/IndexScanJumpUnboundedIT.java 2013-03-22 20:05:57 +0000
1392+++ src/test/java/com/akiban/server/test/it/qp/IndexScanJumpUnboundedIT.java 2013-04-30 23:23:36 +0000
1393@@ -28,8 +28,6 @@
1394 import com.akiban.qp.rowtype.Schema;
1395 import com.akiban.server.api.dml.SetColumnSelector;
1396 import com.akiban.server.api.dml.scan.NewRow;
1397-import com.akiban.server.expression.std.FieldExpression;
1398-import org.junit.Before;
1399 import org.junit.Test;
1400
1401 import java.util.ArrayList;
1402@@ -39,7 +37,7 @@
1403
1404 import static com.akiban.qp.operator.API.cursor;
1405 import static com.akiban.qp.operator.API.indexScan_Default;
1406-import static com.akiban.server.expression.std.Expressions.field;
1407+import static com.akiban.server.test.ExpressionGenerators.field;
1408 import static org.junit.Assert.assertEquals;
1409
1410 public class IndexScanJumpUnboundedIT extends OperatorITBase
1411
1412=== modified file 'src/test/java/com/akiban/server/test/it/qp/Intersect_OrderedByteArrayComparisonIT.java'
1413--- src/test/java/com/akiban/server/test/it/qp/Intersect_OrderedByteArrayComparisonIT.java 2013-03-22 20:05:57 +0000
1414+++ src/test/java/com/akiban/server/test/it/qp/Intersect_OrderedByteArrayComparisonIT.java 2013-04-30 23:23:36 +0000
1415@@ -20,6 +20,7 @@
1416 import com.akiban.qp.expression.IndexBound;
1417 import com.akiban.qp.expression.IndexKeyRange;
1418 import com.akiban.qp.operator.API;
1419+import com.akiban.qp.operator.ExpressionGenerator;
1420 import com.akiban.qp.operator.Operator;
1421 import com.akiban.qp.row.RowBase;
1422 import com.akiban.qp.rowtype.IndexRowType;
1423@@ -333,7 +334,7 @@
1424 Ordering ordering = API.ordering();
1425 int i = 0;
1426 while (i < objects.length) {
1427- Expression expression = (Expression) objects[i++];
1428+ ExpressionGenerator expression = (ExpressionGenerator) objects[i++];
1429 Boolean ascending = (Boolean) objects[i++];
1430 ordering.append(expression, ascending);
1431 }
1432
1433=== modified file 'src/test/java/com/akiban/server/test/it/qp/NWaySkipScanIT.java'
1434--- src/test/java/com/akiban/server/test/it/qp/NWaySkipScanIT.java 2013-03-22 20:05:57 +0000
1435+++ src/test/java/com/akiban/server/test/it/qp/NWaySkipScanIT.java 2013-04-30 23:23:36 +0000
1436@@ -420,18 +420,6 @@
1437 return IndexKeyRange.bounded(tZIndexRowType, bound, true, bound, true);
1438 }
1439
1440- private Ordering ordering(Object... objects)
1441- {
1442- Ordering ordering = API.ordering();
1443- int i = 0;
1444- while (i < objects.length) {
1445- Expression expression = (Expression) objects[i++];
1446- Boolean ascending = (Boolean) objects[i++];
1447- ordering.append(expression, ascending);
1448- }
1449- return ordering;
1450- }
1451-
1452 private boolean[] ascending(boolean... ascending)
1453 {
1454 return ascending;
1455
1456=== modified file 'src/test/java/com/akiban/server/test/it/qp/Select_BloomFilter_CaseInsensitive_IT.java'
1457--- src/test/java/com/akiban/server/test/it/qp/Select_BloomFilter_CaseInsensitive_IT.java 2013-03-22 20:05:57 +0000
1458+++ src/test/java/com/akiban/server/test/it/qp/Select_BloomFilter_CaseInsensitive_IT.java 2013-04-30 23:23:36 +0000
1459@@ -323,9 +323,7 @@
1460 0,
1461 ExpressionGenerator.ErasureMaker.MARK),
1462 // collators
1463- collators,
1464- // usePValues
1465- Types3Switch.ON
1466+ collators
1467 ),
1468 dIndexRowType,
1469 Arrays.asList(
1470
1471=== modified file 'src/test/java/com/akiban/server/test/it/qp/SkipScanPerformanceIT.java'
1472--- src/test/java/com/akiban/server/test/it/qp/SkipScanPerformanceIT.java 2013-03-22 20:05:57 +0000
1473+++ src/test/java/com/akiban/server/test/it/qp/SkipScanPerformanceIT.java 2013-04-30 23:23:36 +0000
1474@@ -21,6 +21,7 @@
1475 import com.akiban.qp.expression.IndexKeyRange;
1476 import com.akiban.qp.operator.API;
1477 import com.akiban.qp.operator.Cursor;
1478+import com.akiban.qp.operator.ExpressionGenerator;
1479 import com.akiban.qp.operator.Operator;
1480 import com.akiban.qp.row.Row;
1481 import com.akiban.qp.rowtype.IndexRowType;
1482@@ -429,18 +430,6 @@
1483 return IndexKeyRange.bounded(tZIndexRowType, bound, true, bound, true);
1484 }
1485
1486- private Ordering ordering(Object... objects)
1487- {
1488- Ordering ordering = API.ordering();
1489- int i = 0;
1490- while (i < objects.length) {
1491- Expression expression = (Expression) objects[i++];
1492- Boolean ascending = (Boolean) objects[i++];
1493- ordering.append(expression, ascending);
1494- }
1495- return ordering;
1496- }
1497-
1498 private boolean[] ascending(boolean... ascending)
1499 {
1500 return ascending;
1501
1502=== modified file 'src/test/resources/com/akiban/sql/pg/yaml/functional/test-statement-cache.yaml'
1503--- src/test/resources/com/akiban/sql/pg/yaml/functional/test-statement-cache.yaml 2012-12-23 22:48:11 +0000
1504+++ src/test/resources/com/akiban/sql/pg/yaml/functional/test-statement-cache.yaml 2013-04-30 23:23:36 +0000
1505@@ -4,7 +4,7 @@
1506 - suppressed: true
1507 ---
1508 # A setting that affects cache selection.
1509-- Statement: SET newtypes TO 'false'
1510+- Statement: SET newtypes TO 'true'
1511 ---
1512 - JMX: com.akiban:type=PostgresServer
1513 - set: StatementCacheCapacity
1514@@ -110,7 +110,7 @@
1515 [' Select_HKeyOrdered(t.s == $1)'],
1516 [' GroupScan_Default(t)']]
1517 ---
1518-- Statement: SET newtypes TO 'false'
1519+- Statement: SET newtypes TO 'true'
1520 ---
1521 - Statement: EXPLAIN SELECT id FROM t WHERE s = ?
1522 - output: [['Project_Default(t.id)'],
1523
1524=== removed file 'src/test/resources/com/akiban/sql/pg/yaml/functional/test-t2t3-compat-decimal.yaml'
1525--- src/test/resources/com/akiban/sql/pg/yaml/functional/test-t2t3-compat-decimal.yaml 2012-11-03 20:22:04 +0000
1526+++ src/test/resources/com/akiban/sql/pg/yaml/functional/test-t2t3-compat-decimal.yaml 1970-01-01 00:00:00 +0000
1527@@ -1,29 +0,0 @@
1528----
1529-# We'll want a more comprehensive test later, but this is good enough for now.
1530-# See https://www.pivotaltracker.com/story/show/38877031
1531-- CreateTable: decimal_table(id INT NOT NULL PRIMARY KEY, value DECIMAL(5,2));
1532----
1533-- Statement: CREATE INDEX dec_idx on decimal_table(value);
1534----
1535-- Newtypes: false
1536----
1537-- Statement: INSERT INTO decimal_table values (1, 543.21);
1538----
1539-- Newtypes: true
1540----
1541-- Statement: INSERT INTO decimal_table values (2, 123.45)
1542----
1543-- Statement: SELECT * FROM decimal_table ORDER BY id;
1544-- output: [[1, 543.21], [2, 123.45]]
1545----
1546-- Statement: SELECT * FROM decimal_table ORDER BY value;
1547-- output: [[2, 123.45], [1, 543.21]]
1548----
1549-- Newtypes: false
1550----
1551-- Statement: SELECT * FROM decimal_table ORDER BY id;
1552-- output: [[1, 543.21], [2, 123.45]]
1553----
1554-- Statement: SELECT * FROM decimal_table ORDER BY value;
1555-- output: [[2, 123.45], [1, 543.21]]
1556-...
1557
1558=== modified file 'src/test/resources/com/akiban/sql/pg/yaml/functional/test-type-year.yaml'
1559--- src/test/resources/com/akiban/sql/pg/yaml/functional/test-type-year.yaml 2012-10-31 17:31:11 +0000
1560+++ src/test/resources/com/akiban/sql/pg/yaml/functional/test-type-year.yaml 2013-04-30 23:23:36 +0000
1561@@ -2,8 +2,6 @@
1562 # Also compare types2's behaviour with that of types3
1563 # Note:, types3 is doing the correct thing!
1564 ---
1565-- Newtypes: true
1566----
1567 - Include: all-types-schema.yaml
1568 ---
1569 - Statement: INSERT INTO all_types(year_field)
1570@@ -20,21 +18,4 @@
1571 - output: [[0], [2001], [2069], [1970], [1999], [0], [0], [0]]
1572 ---
1573 - Statement: DELETE FROM all_types;
1574----
1575-- Newtypes: false
1576----
1577-- Statement: INSERT INTO all_types(year_field)
1578- VALUES (0),
1579- (1),
1580- (69),
1581- (70),
1582- (99),
1583- (100);
1584----
1585-- Statement: SELECT year_field from all_types;
1586-- output: [[0], [1901], [1969], [1970], [1999], [2000]]
1587----
1588-- Statement: DELETE FROM all_types;
1589----
1590-- Newtypes: null
1591 ...
1592\ No newline at end of file

Subscribers

People subscribed via source and target branches