@Test public void test() { IndexBound bound = new IndexBound(row(idxRowType, 110L, 15L), new SetColumnSelector(0, 1)); IndexKeyRange range = IndexKeyRange.bounded(idxRowType, bound, true, bound, true); API.Ordering ordering = new API.Ordering(); ordering.append(ExpressionGenerators.field(idxRowType, 0), true); ordering.append(ExpressionGenerators.field(idxRowType, 1), true); Operator plan = indexScan_Default(idxRowType, range, ordering); compareRows(new Row[0], cursor(plan, queryContext, queryBindings)); }
private API.Ordering ordering(Object... ord) // alternating column positions and asc/desc { API.Ordering ordering = API.ordering(); int i = 0; while (i < ord.length) { int column = (Integer) ord[i++]; boolean asc = (Boolean) ord[i++]; ordering.append(field(idxRowType, column), asc); } return ordering; }