read method
Reads the TObject from the given input protocol.
Implementation
read(TProtocol iprot) {
TField field;
iprot.readStructBegin();
while (true) {
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case COLUMN_NAME:
if (field.type == TType.STRING) {
this.column_name = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case SCAN_TYPE:
if (field.type == TType.I32) {
this.scan_type = iprot.readI32();
this.__isset_scan_type = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case BEGIN_VALUE:
if (field.type == TType.STRUCT) {
this.begin_value = new t_nebula.Value();
this.begin_value?.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case END_VALUE:
if (field.type == TType.STRUCT) {
this.end_value = new t_nebula.Value();
this.end_value?.read(iprot);
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case INCLUDE_BEGIN:
if (field.type == TType.BOOL) {
this.include_begin = iprot.readBool();
this.__isset_include_begin = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case INCLUDE_END:
if (field.type == TType.BOOL) {
this.include_end = iprot.readBool();
this.__isset_include_end = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}