/**
* Produce a block with the given values in the last field.
*/
private Block createBlock(List<Object> values)
{
BlockBuilder blockBuilder = new BlockBuilder(new TupleInfo(getValueType()));
for (Object value : values) {
if (value == null) {
blockBuilder.appendNull();
}
else {
switch (getValueType()) {
case FIXED_INT_64:
blockBuilder.append((Long) value);
break;
case VARIABLE_BINARY:
blockBuilder.append((Slice) value);
break;
case DOUBLE:
blockBuilder.append((Double) value);
break;
default:
throw new UnsupportedOperationException("not yet implemented");
}
}
}
return blockBuilder.build();
}