if (other.hasCarriesTwoByteSelectionVector()) { setCarriesTwoByteSelectionVector(other.getCarriesTwoByteSelectionVector());
if (other.hasCarriesTwoByteSelectionVector()) { setCarriesTwoByteSelectionVector(other.getCarriesTwoByteSelectionVector());
if (def.hasCarriesTwoByteSelectionVector() && def.getCarriesTwoByteSelectionVector()) { svMode = SelectionVectorMode.TWO_BYTE; } else {
final UserBitShared.RecordBatchDef batchDef = UserBitShared.RecordBatchDef.parseDelimitedFrom(input); recordCount = batchDef.getRecordCount(); if (batchDef.hasCarriesTwoByteSelectionVector() && batchDef.getCarriesTwoByteSelectionVector()) {
/** * Reads from an InputStream and parses a RecordBatchDef. From this, we * construct a SelectionVector2 if it exits and construct the vectors and add * them to a vector container * * @param input * the InputStream to read from * @throws IOException */ @Override public void readFromStream(InputStream input) throws IOException { final UserBitShared.RecordBatchDef batchDef = UserBitShared.RecordBatchDef.parseDelimitedFrom(input); recordCount = batchDef.getRecordCount(); if (batchDef.hasCarriesTwoByteSelectionVector() && batchDef.getCarriesTwoByteSelectionVector()) { readSv2(input); } readVectors(input, batchDef); }
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.RecordBatchDef message) throws java.io.IOException { if(message.hasRecordCount()) output.writeInt32(1, message.getRecordCount(), false); for(org.apache.drill.exec.proto.UserBitShared.SerializedField field : message.getFieldList()) output.writeObject(2, field, org.apache.drill.exec.proto.SchemaUserBitShared.SerializedField.WRITE, true); if(message.hasCarriesTwoByteSelectionVector()) output.writeBool(3, message.getCarriesTwoByteSelectionVector(), false); if(message.hasAffectedRowsCount()) output.writeInt32(4, message.getAffectedRowsCount(), false); } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.RecordBatchDef message)
public void writeTo(com.dyuproject.protostuff.Output output, org.apache.drill.exec.proto.UserBitShared.RecordBatchDef message) throws java.io.IOException { if(message.hasRecordCount()) output.writeInt32(1, message.getRecordCount(), false); for(org.apache.drill.exec.proto.UserBitShared.SerializedField field : message.getFieldList()) output.writeObject(2, field, org.apache.drill.exec.proto.SchemaUserBitShared.SerializedField.WRITE, true); if(message.hasCarriesTwoByteSelectionVector()) output.writeBool(3, message.getCarriesTwoByteSelectionVector(), false); if(message.hasAffectedRowsCount()) output.writeInt32(4, message.getAffectedRowsCount(), false); } public boolean isInitialized(org.apache.drill.exec.proto.UserBitShared.RecordBatchDef message)