Cursor inputCursor = API.cursor(inputOperator, context, bindings);
inputCursor.openTopLevel();
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();