// Tests projection of null too
Operator flattenCO = flatten_HKeyOrdered(groupScan_Default(coi),
customerRowType,
orderRowType,
FULL_JOIN);
RowType coType = flattenCO.rowType();
Operator flattenCOI = flatten_HKeyOrdered(flattenCO,
coType,
itemRowType,
FULL_JOIN);
RowType coiType = flattenCOI.rowType();
Operator plan =
project_DefaultTest(flattenCOI,
coiType,
Arrays.asList(
field(coiType, 1), // customer name
field(coiType, 4), // salesman
field(coiType, 5))); // iid
Cursor cursor = cursor(plan, queryContext, queryBindings);
RowType projectedRowType = plan.rowType();
Row[] expected = new Row[]{
row(projectedRowType, "northbridge", "ori", 111L),
row(projectedRowType, "northbridge", "ori", 112L),
row(projectedRowType, "northbridge", "david", 121L),
row(projectedRowType, "northbridge", "david", 122L),