@Override
protected PhoenixResultSet newResultSet(ResultIterator iterator, RowProjector projector) throws SQLException {
List<ColumnProjector> columns = new ArrayList<ColumnProjector>(projector.getColumnProjectors());
ColumnProjector column = columns.get(keySeqPosition);
columns.set(keySeqPosition, new ExpressionProjector(column.getName(), column.getTableName(),
new BaseTerminalExpression() {
@Override
public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) {
ptr.set(rowNumberHolder);
return true;
}
@Override
public PDataType getDataType() {
return PDataType.INTEGER;
}
},
column.isCaseSensitive())
);
column = columns.get(pkNamePosition);
columns.set(pkNamePosition, new ExpressionProjector(column.getName(), column.getTableName(),
new BaseTerminalExpression() {
@Override
public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) {
if (pkNamePtr.get() == unsetValue) {
boolean b = tuple.getValue(TABLE_FAMILY_BYTES, PK_NAME_BYTES, pkNamePtr);