API.Ordering ordering = API.ordering();
for(int i = 0; i < fieldOrdering.length; ++i) {
ordering.append(field(inputOperator.rowType(), i), fieldOrdering[i]);
}
Sorter sorter = createSorter(context, bindings, inputCursor, inputOperator.rowType(), ordering, sortOption, TEST_TAP);
RowCursor sortedCursor = sorter.sort();
Row[] expectedRows = createBuilder(expected).rows().toArray(new Row[expected.size()]);
compareRows(expectedRows, sortedCursor);
}