TFileScanRange.java
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.doris.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class TFileScanRange implements org.apache.thrift.TBase<TFileScanRange, TFileScanRange._Fields>, java.io.Serializable, Cloneable, Comparable<TFileScanRange> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFileScanRange");
private static final org.apache.thrift.protocol.TField RANGES_FIELD_DESC = new org.apache.thrift.protocol.TField("ranges", org.apache.thrift.protocol.TType.LIST, (short)1);
private static final org.apache.thrift.protocol.TField PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("params", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SPLIT_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("split_source", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TFileScanRangeStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TFileScanRangeTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.util.List<TFileRangeDesc> ranges; // optional
public @org.apache.thrift.annotation.Nullable TFileScanRangeParams params; // optional
public @org.apache.thrift.annotation.Nullable TSplitSource split_source; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
RANGES((short)1, "ranges"),
PARAMS((short)2, "params"),
SPLIT_SOURCE((short)3, "split_source");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // RANGES
return RANGES;
case 2: // PARAMS
return PARAMS;
case 3: // SPLIT_SOURCE
return SPLIT_SOURCE;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.RANGES,_Fields.PARAMS,_Fields.SPLIT_SOURCE};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.RANGES, new org.apache.thrift.meta_data.FieldMetaData("ranges", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFileRangeDesc.class))));
tmpMap.put(_Fields.PARAMS, new org.apache.thrift.meta_data.FieldMetaData("params", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TFileScanRangeParams.class)));
tmpMap.put(_Fields.SPLIT_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("split_source", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSplitSource.class)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TFileScanRange.class, metaDataMap);
}
public TFileScanRange() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TFileScanRange(TFileScanRange other) {
if (other.isSetRanges()) {
java.util.List<TFileRangeDesc> __this__ranges = new java.util.ArrayList<TFileRangeDesc>(other.ranges.size());
for (TFileRangeDesc other_element : other.ranges) {
__this__ranges.add(new TFileRangeDesc(other_element));
}
this.ranges = __this__ranges;
}
if (other.isSetParams()) {
this.params = new TFileScanRangeParams(other.params);
}
if (other.isSetSplitSource()) {
this.split_source = new TSplitSource(other.split_source);
}
}
public TFileScanRange deepCopy() {
return new TFileScanRange(this);
}
@Override
public void clear() {
this.ranges = null;
this.params = null;
this.split_source = null;
}
public int getRangesSize() {
return (this.ranges == null) ? 0 : this.ranges.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<TFileRangeDesc> getRangesIterator() {
return (this.ranges == null) ? null : this.ranges.iterator();
}
public void addToRanges(TFileRangeDesc elem) {
if (this.ranges == null) {
this.ranges = new java.util.ArrayList<TFileRangeDesc>();
}
this.ranges.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<TFileRangeDesc> getRanges() {
return this.ranges;
}
public TFileScanRange setRanges(@org.apache.thrift.annotation.Nullable java.util.List<TFileRangeDesc> ranges) {
this.ranges = ranges;
return this;
}
public void unsetRanges() {
this.ranges = null;
}
/** Returns true if field ranges is set (has been assigned a value) and false otherwise */
public boolean isSetRanges() {
return this.ranges != null;
}
public void setRangesIsSet(boolean value) {
if (!value) {
this.ranges = null;
}
}
@org.apache.thrift.annotation.Nullable
public TFileScanRangeParams getParams() {
return this.params;
}
public TFileScanRange setParams(@org.apache.thrift.annotation.Nullable TFileScanRangeParams params) {
this.params = params;
return this;
}
public void unsetParams() {
this.params = null;
}
/** Returns true if field params is set (has been assigned a value) and false otherwise */
public boolean isSetParams() {
return this.params != null;
}
public void setParamsIsSet(boolean value) {
if (!value) {
this.params = null;
}
}
@org.apache.thrift.annotation.Nullable
public TSplitSource getSplitSource() {
return this.split_source;
}
public TFileScanRange setSplitSource(@org.apache.thrift.annotation.Nullable TSplitSource split_source) {
this.split_source = split_source;
return this;
}
public void unsetSplitSource() {
this.split_source = null;
}
/** Returns true if field split_source is set (has been assigned a value) and false otherwise */
public boolean isSetSplitSource() {
return this.split_source != null;
}
public void setSplitSourceIsSet(boolean value) {
if (!value) {
this.split_source = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case RANGES:
if (value == null) {
unsetRanges();
} else {
setRanges((java.util.List<TFileRangeDesc>)value);
}
break;
case PARAMS:
if (value == null) {
unsetParams();
} else {
setParams((TFileScanRangeParams)value);
}
break;
case SPLIT_SOURCE:
if (value == null) {
unsetSplitSource();
} else {
setSplitSource((TSplitSource)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case RANGES:
return getRanges();
case PARAMS:
return getParams();
case SPLIT_SOURCE:
return getSplitSource();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case RANGES:
return isSetRanges();
case PARAMS:
return isSetParams();
case SPLIT_SOURCE:
return isSetSplitSource();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TFileScanRange)
return this.equals((TFileScanRange)that);
return false;
}
public boolean equals(TFileScanRange that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_ranges = true && this.isSetRanges();
boolean that_present_ranges = true && that.isSetRanges();
if (this_present_ranges || that_present_ranges) {
if (!(this_present_ranges && that_present_ranges))
return false;
if (!this.ranges.equals(that.ranges))
return false;
}
boolean this_present_params = true && this.isSetParams();
boolean that_present_params = true && that.isSetParams();
if (this_present_params || that_present_params) {
if (!(this_present_params && that_present_params))
return false;
if (!this.params.equals(that.params))
return false;
}
boolean this_present_split_source = true && this.isSetSplitSource();
boolean that_present_split_source = true && that.isSetSplitSource();
if (this_present_split_source || that_present_split_source) {
if (!(this_present_split_source && that_present_split_source))
return false;
if (!this.split_source.equals(that.split_source))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetRanges()) ? 131071 : 524287);
if (isSetRanges())
hashCode = hashCode * 8191 + ranges.hashCode();
hashCode = hashCode * 8191 + ((isSetParams()) ? 131071 : 524287);
if (isSetParams())
hashCode = hashCode * 8191 + params.hashCode();
hashCode = hashCode * 8191 + ((isSetSplitSource()) ? 131071 : 524287);
if (isSetSplitSource())
hashCode = hashCode * 8191 + split_source.hashCode();
return hashCode;
}
@Override
public int compareTo(TFileScanRange other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetRanges(), other.isSetRanges());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRanges()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ranges, other.ranges);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetParams(), other.isSetParams());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetParams()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.params, other.params);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSplitSource(), other.isSetSplitSource());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSplitSource()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.split_source, other.split_source);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("TFileScanRange(");
boolean first = true;
if (isSetRanges()) {
sb.append("ranges:");
if (this.ranges == null) {
sb.append("null");
} else {
sb.append(this.ranges);
}
first = false;
}
if (isSetParams()) {
if (!first) sb.append(", ");
sb.append("params:");
if (this.params == null) {
sb.append("null");
} else {
sb.append(this.params);
}
first = false;
}
if (isSetSplitSource()) {
if (!first) sb.append(", ");
sb.append("split_source:");
if (this.split_source == null) {
sb.append("null");
} else {
sb.append(this.split_source);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (params != null) {
params.validate();
}
if (split_source != null) {
split_source.validate();
}
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private static class TFileScanRangeStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TFileScanRangeStandardScheme getScheme() {
return new TFileScanRangeStandardScheme();
}
}
private static class TFileScanRangeStandardScheme extends org.apache.thrift.scheme.StandardScheme<TFileScanRange> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TFileScanRange struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // RANGES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list344 = iprot.readListBegin();
struct.ranges = new java.util.ArrayList<TFileRangeDesc>(_list344.size);
@org.apache.thrift.annotation.Nullable TFileRangeDesc _elem345;
for (int _i346 = 0; _i346 < _list344.size; ++_i346)
{
_elem345 = new TFileRangeDesc();
_elem345.read(iprot);
struct.ranges.add(_elem345);
}
iprot.readListEnd();
}
struct.setRangesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // PARAMS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.params = new TFileScanRangeParams();
struct.params.read(iprot);
struct.setParamsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // SPLIT_SOURCE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.split_source = new TSplitSource();
struct.split_source.read(iprot);
struct.setSplitSourceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, TFileScanRange struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.ranges != null) {
if (struct.isSetRanges()) {
oprot.writeFieldBegin(RANGES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.ranges.size()));
for (TFileRangeDesc _iter347 : struct.ranges)
{
_iter347.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.params != null) {
if (struct.isSetParams()) {
oprot.writeFieldBegin(PARAMS_FIELD_DESC);
struct.params.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.split_source != null) {
if (struct.isSetSplitSource()) {
oprot.writeFieldBegin(SPLIT_SOURCE_FIELD_DESC);
struct.split_source.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TFileScanRangeTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TFileScanRangeTupleScheme getScheme() {
return new TFileScanRangeTupleScheme();
}
}
private static class TFileScanRangeTupleScheme extends org.apache.thrift.scheme.TupleScheme<TFileScanRange> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TFileScanRange struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetRanges()) {
optionals.set(0);
}
if (struct.isSetParams()) {
optionals.set(1);
}
if (struct.isSetSplitSource()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetRanges()) {
{
oprot.writeI32(struct.ranges.size());
for (TFileRangeDesc _iter348 : struct.ranges)
{
_iter348.write(oprot);
}
}
}
if (struct.isSetParams()) {
struct.params.write(oprot);
}
if (struct.isSetSplitSource()) {
struct.split_source.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TFileScanRange struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TList _list349 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.ranges = new java.util.ArrayList<TFileRangeDesc>(_list349.size);
@org.apache.thrift.annotation.Nullable TFileRangeDesc _elem350;
for (int _i351 = 0; _i351 < _list349.size; ++_i351)
{
_elem350 = new TFileRangeDesc();
_elem350.read(iprot);
struct.ranges.add(_elem350);
}
}
struct.setRangesIsSet(true);
}
if (incoming.get(1)) {
struct.params = new TFileScanRangeParams();
struct.params.read(iprot);
struct.setParamsIsSet(true);
}
if (incoming.get(2)) {
struct.split_source = new TSplitSource();
struct.split_source.read(iprot);
struct.setSplitSourceIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}