103
protected int lookaheadQuantum() {
103
107
// Test argument validation
105
109
@Test(expected = IllegalArgumentException.class)
106
110
public void testALNGroupTableNull()
108
ancestorLookup_Nested(null, aValueIndexRowType, Collections.singleton(aRowType), 0);
112
ancestorLookup_Nested(null, aValueIndexRowType, Collections.singleton(aRowType), 0, 1);
111
115
@Test(expected = IllegalArgumentException.class)
112
116
public void testALNRowTypeNull()
114
ancestorLookup_Nested(rabc, null, Collections.singleton(aRowType), 0);
118
ancestorLookup_Nested(rabc, null, Collections.singleton(aRowType), 0, 1);
117
121
@Test(expected = IllegalArgumentException.class)
118
122
public void testALNAncestorTypesNull()
120
ancestorLookup_Nested(rabc, aValueIndexRowType, null, 0);
124
ancestorLookup_Nested(rabc, aValueIndexRowType, null, 0, 1);
123
127
@Test(expected = IllegalArgumentException.class)
124
128
public void testALNAncestorTypesEmpty()
126
ancestorLookup_Nested(rabc, aValueIndexRowType, Collections.<UserTableRowType>emptyList(), 0);
130
ancestorLookup_Nested(rabc, aValueIndexRowType, Collections.<UserTableRowType>emptyList(), 0, 1);
129
133
@Test(expected = IllegalArgumentException.class)
130
134
public void testALNBadBindingPosition()
132
ancestorLookup_Nested(rabc, aValueIndexRowType, Collections.singleton(aRowType), -1);
136
ancestorLookup_Nested(rabc, aValueIndexRowType, Collections.singleton(aRowType), -1, 1);
135
139
// Test operator execution
142
146
indexScan_Default(aValueIndexRowType),
143
ancestorLookup_Nested(rabc, aValueIndexRowType, Collections.singleton(aRowType), 0),
147
ancestorLookup_Nested(rabc, aValueIndexRowType, Collections.singleton(aRowType), 0, lookaheadQuantum()),
144
148
0, pipelineMap(), 1);
145
149
Cursor cursor = cursor(plan, queryContext, queryBindings);
146
150
RowBase[] expected = new RowBase[]{
160
164
indexScan_Default(aValueIndexRowType),
161
ancestorLookup_Nested(rabc, aValueIndexRowType, Arrays.asList(aRowType, rRowType), 0),
165
ancestorLookup_Nested(rabc, aValueIndexRowType, Arrays.asList(aRowType, rRowType), 0, lookaheadQuantum()),
162
166
0, pipelineMap(), 1);
163
167
Cursor cursor = cursor(plan, queryContext, queryBindings);
164
168
RowBase[] expected = new RowBase[]{
182
186
indexScan_Default(aValueIndexRowType),
183
ancestorLookup_Nested(rabc, aValueIndexRowType, Arrays.asList(rRowType, aRowType), 0),
187
ancestorLookup_Nested(rabc, aValueIndexRowType, Arrays.asList(rRowType, aRowType), 0, lookaheadQuantum()),
184
188
0, pipelineMap(), 1);
185
189
Cursor cursor = cursor(plan, queryContext, queryBindings);
186
190
RowBase[] expected = new RowBase[]{
205
209
indexScan_Default(aValueIndexRowType),
206
ancestorLookup_Nested(rabc, aValueIndexRowType, Arrays.asList(aRowType), 0),
210
ancestorLookup_Nested(rabc, aValueIndexRowType, Arrays.asList(aRowType), 0, lookaheadQuantum()),
207
211
0, pipelineMap(), 1),
208
ancestorLookup_Nested(rabc, aRowType, Arrays.asList(rRowType), 1),
212
ancestorLookup_Nested(rabc, aRowType, Arrays.asList(rRowType), 1, lookaheadQuantum()),
209
213
1, pipelineMap(), 1);
210
214
Cursor cursor = cursor(plan, queryContext, queryBindings);
211
215
RowBase[] expected = new RowBase[]{
238
ancestorLookup_Nested(rabc, abIndexScan.rowType(), Collections.singleton(rRowType), 0),
242
ancestorLookup_Nested(rabc, abIndexScan.rowType(), Collections.singleton(rRowType), 0, lookaheadQuantum()),
239
243
0, pipelineMap(), 1);
240
244
Cursor cursor = cursor(plan, queryContext, queryBindings);
241
245
RowBase[] expected = new RowBase[]{
274
ancestorLookup_Nested(rabc, abcIndexScan.rowType(), Collections.singleton(rRowType), 0),
278
ancestorLookup_Nested(rabc, abcIndexScan.rowType(), Collections.singleton(rRowType), 0, lookaheadQuantum()),
275
279
0, pipelineMap(), 1);
276
280
Cursor cursor = cursor(plan, queryContext, queryBindings);
277
281
RowBase[] expected = new RowBase[]{
288
292
indexScan_Default(aValueIndexRowType),
289
ancestorLookup_Nested(rabc, aValueIndexRowType, Collections.singleton(aRowType), 0),
293
ancestorLookup_Nested(rabc, aValueIndexRowType, Collections.singleton(aRowType), 0, lookaheadQuantum()),
290
294
0, pipelineMap(), 1);
291
295
CursorLifecycleTestCase testCase = new CursorLifecycleTestCase()