TLanceFileDesc.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-08-04")
public class TLanceFileDesc implements org.apache.thrift.TBase<TLanceFileDesc, TLanceFileDesc._Fields>, java.io.Serializable, Cloneable, Comparable<TLanceFileDesc> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TLanceFileDesc");
private static final org.apache.thrift.protocol.TField DATASET_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("dataset_uri", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField FRAGMENT_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("fragment_ids", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TLanceFileDescStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TLanceFileDescTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String dataset_uri; // optional
public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> fragment_ids; // optional
public long version; // 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 {
DATASET_URI((short)1, "dataset_uri"),
FRAGMENT_IDS((short)2, "fragment_ids"),
VERSION((short)3, "version");
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: // DATASET_URI
return DATASET_URI;
case 2: // FRAGMENT_IDS
return FRAGMENT_IDS;
case 3: // VERSION
return VERSION;
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 int __VERSION_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.DATASET_URI,_Fields.FRAGMENT_IDS,_Fields.VERSION};
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.DATASET_URI, new org.apache.thrift.meta_data.FieldMetaData("dataset_uri", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.FRAGMENT_IDS, new org.apache.thrift.meta_data.FieldMetaData("fragment_ids", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TLanceFileDesc.class, metaDataMap);
}
public TLanceFileDesc() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public TLanceFileDesc(TLanceFileDesc other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetDatasetUri()) {
this.dataset_uri = other.dataset_uri;
}
if (other.isSetFragmentIds()) {
java.util.List<java.lang.Long> __this__fragment_ids = new java.util.ArrayList<java.lang.Long>(other.fragment_ids);
this.fragment_ids = __this__fragment_ids;
}
this.version = other.version;
}
public TLanceFileDesc deepCopy() {
return new TLanceFileDesc(this);
}
@Override
public void clear() {
this.dataset_uri = null;
this.fragment_ids = null;
setVersionIsSet(false);
this.version = 0;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getDatasetUri() {
return this.dataset_uri;
}
public TLanceFileDesc setDatasetUri(@org.apache.thrift.annotation.Nullable java.lang.String dataset_uri) {
this.dataset_uri = dataset_uri;
return this;
}
public void unsetDatasetUri() {
this.dataset_uri = null;
}
/** Returns true if field dataset_uri is set (has been assigned a value) and false otherwise */
public boolean isSetDatasetUri() {
return this.dataset_uri != null;
}
public void setDatasetUriIsSet(boolean value) {
if (!value) {
this.dataset_uri = null;
}
}
public int getFragmentIdsSize() {
return (this.fragment_ids == null) ? 0 : this.fragment_ids.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator<java.lang.Long> getFragmentIdsIterator() {
return (this.fragment_ids == null) ? null : this.fragment_ids.iterator();
}
public void addToFragmentIds(long elem) {
if (this.fragment_ids == null) {
this.fragment_ids = new java.util.ArrayList<java.lang.Long>();
}
this.fragment_ids.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List<java.lang.Long> getFragmentIds() {
return this.fragment_ids;
}
public TLanceFileDesc setFragmentIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Long> fragment_ids) {
this.fragment_ids = fragment_ids;
return this;
}
public void unsetFragmentIds() {
this.fragment_ids = null;
}
/** Returns true if field fragment_ids is set (has been assigned a value) and false otherwise */
public boolean isSetFragmentIds() {
return this.fragment_ids != null;
}
public void setFragmentIdsIsSet(boolean value) {
if (!value) {
this.fragment_ids = null;
}
}
public long getVersion() {
return this.version;
}
public TLanceFileDesc setVersion(long version) {
this.version = version;
setVersionIsSet(true);
return this;
}
public void unsetVersion() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
}
public void setVersionIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DATASET_URI:
if (value == null) {
unsetDatasetUri();
} else {
setDatasetUri((java.lang.String)value);
}
break;
case FRAGMENT_IDS:
if (value == null) {
unsetFragmentIds();
} else {
setFragmentIds((java.util.List<java.lang.Long>)value);
}
break;
case VERSION:
if (value == null) {
unsetVersion();
} else {
setVersion((java.lang.Long)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DATASET_URI:
return getDatasetUri();
case FRAGMENT_IDS:
return getFragmentIds();
case VERSION:
return getVersion();
}
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 DATASET_URI:
return isSetDatasetUri();
case FRAGMENT_IDS:
return isSetFragmentIds();
case VERSION:
return isSetVersion();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TLanceFileDesc)
return this.equals((TLanceFileDesc)that);
return false;
}
public boolean equals(TLanceFileDesc that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_dataset_uri = true && this.isSetDatasetUri();
boolean that_present_dataset_uri = true && that.isSetDatasetUri();
if (this_present_dataset_uri || that_present_dataset_uri) {
if (!(this_present_dataset_uri && that_present_dataset_uri))
return false;
if (!this.dataset_uri.equals(that.dataset_uri))
return false;
}
boolean this_present_fragment_ids = true && this.isSetFragmentIds();
boolean that_present_fragment_ids = true && that.isSetFragmentIds();
if (this_present_fragment_ids || that_present_fragment_ids) {
if (!(this_present_fragment_ids && that_present_fragment_ids))
return false;
if (!this.fragment_ids.equals(that.fragment_ids))
return false;
}
boolean this_present_version = true && this.isSetVersion();
boolean that_present_version = true && that.isSetVersion();
if (this_present_version || that_present_version) {
if (!(this_present_version && that_present_version))
return false;
if (this.version != that.version)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetDatasetUri()) ? 131071 : 524287);
if (isSetDatasetUri())
hashCode = hashCode * 8191 + dataset_uri.hashCode();
hashCode = hashCode * 8191 + ((isSetFragmentIds()) ? 131071 : 524287);
if (isSetFragmentIds())
hashCode = hashCode * 8191 + fragment_ids.hashCode();
hashCode = hashCode * 8191 + ((isSetVersion()) ? 131071 : 524287);
if (isSetVersion())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(version);
return hashCode;
}
@Override
public int compareTo(TLanceFileDesc other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetDatasetUri(), other.isSetDatasetUri());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetDatasetUri()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.dataset_uri, other.dataset_uri);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetFragmentIds(), other.isSetFragmentIds());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFragmentIds()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fragment_ids, other.fragment_ids);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetVersion(), other.isSetVersion());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetVersion()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
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("TLanceFileDesc(");
boolean first = true;
if (isSetDatasetUri()) {
sb.append("dataset_uri:");
if (this.dataset_uri == null) {
sb.append("null");
} else {
sb.append(this.dataset_uri);
}
first = false;
}
if (isSetFragmentIds()) {
if (!first) sb.append(", ");
sb.append("fragment_ids:");
if (this.fragment_ids == null) {
sb.append("null");
} else {
sb.append(this.fragment_ids);
}
first = false;
}
if (isSetVersion()) {
if (!first) sb.append(", ");
sb.append("version:");
sb.append(this.version);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
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 {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
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 TLanceFileDescStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TLanceFileDescStandardScheme getScheme() {
return new TLanceFileDescStandardScheme();
}
}
private static class TLanceFileDescStandardScheme extends org.apache.thrift.scheme.StandardScheme<TLanceFileDesc> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TLanceFileDesc 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: // DATASET_URI
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.dataset_uri = iprot.readString();
struct.setDatasetUriIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // FRAGMENT_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list220 = iprot.readListBegin();
struct.fragment_ids = new java.util.ArrayList<java.lang.Long>(_list220.size);
long _elem221;
for (int _i222 = 0; _i222 < _list220.size; ++_i222)
{
_elem221 = iprot.readI64();
struct.fragment_ids.add(_elem221);
}
iprot.readListEnd();
}
struct.setFragmentIdsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.version = iprot.readI64();
struct.setVersionIsSet(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, TLanceFileDesc struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.dataset_uri != null) {
if (struct.isSetDatasetUri()) {
oprot.writeFieldBegin(DATASET_URI_FIELD_DESC);
oprot.writeString(struct.dataset_uri);
oprot.writeFieldEnd();
}
}
if (struct.fragment_ids != null) {
if (struct.isSetFragmentIds()) {
oprot.writeFieldBegin(FRAGMENT_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.fragment_ids.size()));
for (long _iter223 : struct.fragment_ids)
{
oprot.writeI64(_iter223);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetVersion()) {
oprot.writeFieldBegin(VERSION_FIELD_DESC);
oprot.writeI64(struct.version);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TLanceFileDescTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TLanceFileDescTupleScheme getScheme() {
return new TLanceFileDescTupleScheme();
}
}
private static class TLanceFileDescTupleScheme extends org.apache.thrift.scheme.TupleScheme<TLanceFileDesc> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TLanceFileDesc 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.isSetDatasetUri()) {
optionals.set(0);
}
if (struct.isSetFragmentIds()) {
optionals.set(1);
}
if (struct.isSetVersion()) {
optionals.set(2);
}
oprot.writeBitSet(optionals, 3);
if (struct.isSetDatasetUri()) {
oprot.writeString(struct.dataset_uri);
}
if (struct.isSetFragmentIds()) {
{
oprot.writeI32(struct.fragment_ids.size());
for (long _iter224 : struct.fragment_ids)
{
oprot.writeI64(_iter224);
}
}
}
if (struct.isSetVersion()) {
oprot.writeI64(struct.version);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TLanceFileDesc 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)) {
struct.dataset_uri = iprot.readString();
struct.setDatasetUriIsSet(true);
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TList _list225 = iprot.readListBegin(org.apache.thrift.protocol.TType.I64);
struct.fragment_ids = new java.util.ArrayList<java.lang.Long>(_list225.size);
long _elem226;
for (int _i227 = 0; _i227 < _list225.size; ++_i227)
{
_elem226 = iprot.readI64();
struct.fragment_ids.add(_elem226);
}
}
struct.setFragmentIdsIsSet(true);
}
if (incoming.get(2)) {
struct.version = iprot.readI64();
struct.setVersionIsSet(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();
}
}