Arrays.fill(values, null);
int i = 0;
List<PColumn> projectedColumns = projectedTable.getColumns();
for (; i < projectedTable.getPKColumns().size(); i++) {
Expression expression = selectExpressions.get(i);
if (expression.evaluate(result, ptr)) {
values[i] = ptr.copyBytes();
// If ColumnModifier from expression in SELECT doesn't match the
// column being projected into then invert the bits.
if (expression.getColumnModifier() != projectedColumns.get(i).getColumnModifier()) {
ColumnModifier.SORT_DESC.apply(values[i], 0, values[i], 0, values[i].length);