.row("d", 7)
.row("e", 6)
.build();
FieldOrderedTupleComparator comparator = new FieldOrderedTupleComparator(ImmutableList.of(0, 1), ImmutableList.of(SortOrder.DESC_NULLS_LAST, SortOrder.DESC_NULLS_LAST));
TopNOperatorFactory operatorFactory = new TopNOperatorFactory(
0,
3,
ImmutableList.of(singleColumn(VARIABLE_BINARY, 0), singleColumn(FIXED_INT_64, 1)),
Ordering.from(comparator),
Optional.<Integer>absent(),
false);
Operator operator = operatorFactory.createOperator(driverContext);
MaterializedResult expected = MaterializedResult.resultBuilder(VARIABLE_BINARY, FIXED_INT_64)
.row("f", 3)
.row("e", 6)
.row("d", 7)