}
// No index => Sort required
if (context.index == null) {
List<Integer> orderedRows = sortAlgorithm.sort(new InternalHandler(context), op.getColumnSortList());
context.index(op, new DataSetSortIndex(op, orderedRows));
return;
}
// Index match => Reuse it
DataSetSortIndex sortIndex = context.index.getSortIndex(op);
if (sortIndex != null) {
context.index(op, sortIndex);
return;
}
// No index match => Sort required