}
@Test
public void testLeftDeepMap()
{
RowType intRowType = schema.newValuesType(MNumeric.INT.instance(true));
List<ExpressionGenerator> outerExprs = Arrays.asList(boundField(intRowType, 0, 0), field(intRowType, 0));
Operator middle =
project_DefaultTest(
valuesScan_Default(
bindableExpressions(intRow(intRowType, 10),
intRow(intRowType, 20)),
intRowType),
intRowType, outerExprs);
RowType outerRowType = middle.rowType();
Operator outer =
map_NestedLoops(
valuesScan_Default(
bindableExpressions(intRow(intRowType, 100),
intRow(intRowType, 200)),
intRowType),
middle,
0, pipelineMap(), 1);
List<ExpressionGenerator> innerExprs = Arrays.asList(boundField(outerRowType, 1, 0), boundField(outerRowType, 1, 1), field(intRowType, 0));
Operator inner =
project_DefaultTest(
valuesScan_Default(
bindableExpressions(intRow(intRowType, 1),
intRow(intRowType, 2)),
intRowType),
intRowType, innerExprs);
RowType innerRowType = inner.rowType();
Operator plan = map_NestedLoops(outer, inner, 1, pipelineMap(), 1);
Row[] expected = new Row[]{
row(innerRowType, 100L, 10L, 1L),
row(innerRowType, 100L, 10L, 2L),
row(innerRowType, 100L, 20L, 1L),