boolean isAutoCommit = connection.getAutoCommit();
byte[][] values = new byte[columnIndexes.length][];
int rowCount = 0;
Map<ImmutableBytesPtr,Map<PColumn,byte[]>> mutation = Maps.newHashMapWithExpectedSize(batchSize);
PTable table = tableRef.getTable();
ResultSet rs = new PhoenixResultSet(iterator, projector, statement);
while (rs.next()) {
for (int i = 0; i < values.length; i++) {
PColumn column = table.getColumns().get(columnIndexes[i]);
byte[] byteValue = rs.getBytes(i+1);
Object value = rs.getObject(i+1);
int rsPrecision = rs.getMetaData().getPrecision(i+1);
Integer precision = rsPrecision == 0 ? null : rsPrecision;
int rsScale = rs.getMetaData().getScale(i+1);
Integer scale = rsScale == 0 ? null : rsScale;
// If ColumnModifier from expression in SELECT doesn't match the
// column being projected into then invert the bits.
if (column.getColumnModifier() == ColumnModifier.SORT_DESC) {
byte[] tempByteValue = Arrays.copyOf(byteValue, byteValue.length);