in harry-core/src/harry/model/SelectHelper.java [262:294]
public static ResultSetRow resultSetToRow(SchemaSpec schema, OpSelectors.MonotonicClock clock, Object[] result)
{
Object[] partitionKey = new Object[schema.partitionKeys.size()];
Object[] clusteringKey = new Object[schema.clusteringKeys.size()];
Object[] staticColumns = new Object[schema.staticColumns.size()];
Object[] regularColumns = new Object[schema.regularColumns.size()];
System.arraycopy(result, 0, partitionKey, 0, partitionKey.length);
System.arraycopy(result, partitionKey.length, clusteringKey, 0, clusteringKey.length);
System.arraycopy(result, partitionKey.length + clusteringKey.length, staticColumns, 0, staticColumns.length);
System.arraycopy(result, partitionKey.length + clusteringKey.length + staticColumns.length, regularColumns, 0, regularColumns.length);
long[] slts = new long[schema.staticColumns.size()];
for (int i = 0; i < slts.length; i++)
{
Object v = result[schema.allColumns.size() + i];
slts[i] = v == null ? Model.NO_TIMESTAMP : clock.lts((long) v);
}
long[] lts = new long[schema.regularColumns.size()];
for (int i = 0; i < lts.length; i++)
{
Object v = result[schema.allColumns.size() + slts.length + i];
lts[i] = v == null ? Model.NO_TIMESTAMP : clock.lts((long) v);
}
return new ResultSetRow(isDeflatable(partitionKey) ? schema.deflatePartitionKey(partitionKey) : UNSET_DESCR,
isDeflatable(clusteringKey) ? schema.deflateClusteringKey(clusteringKey) : UNSET_DESCR,
schema.staticColumns.isEmpty() ? null : schema.deflateStaticColumns(staticColumns),
schema.staticColumns.isEmpty() ? null : slts,
schema.deflateRegularColumns(regularColumns),
lts);
}