public TColumn toTColumn() {
TColumn value = new TColumn();
ByteBuffer nullMasks = ByteBuffer.wrap(toBinary(nulls));
switch (type) {
case BOOLEAN_TYPE:
value.setBoolVal(new TBoolColumn(Booleans.asList(Arrays.copyOfRange(boolVars, 0, size)), nullMasks));
break;
case TINYINT_TYPE:
value.setByteVal(new TByteColumn(Bytes.asList(Arrays.copyOfRange(byteVars, 0, size)), nullMasks));
break;
case SMALLINT_TYPE: