com.databricks.jdbc.client.impl.thrift.generated.TGetResultSetMetadataResp Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.19.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*
* @generated
*/
package com.databricks.jdbc.client.impl.thrift.generated;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(
value = "Autogenerated by Thrift Compiler (0.19.0)",
date = "2024-05-06")
public class TGetResultSetMetadataResp
implements org.apache.thrift.TBase<
TGetResultSetMetadataResp, TGetResultSetMetadataResp._Fields>,
java.io.Serializable,
Cloneable,
Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
new org.apache.thrift.protocol.TStruct("TGetResultSetMetadataResp");
private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"status", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
private static final org.apache.thrift.protocol.TField SCHEMA_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"schema", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
private static final org.apache.thrift.protocol.TField RESULT_FORMAT_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"resultFormat", org.apache.thrift.protocol.TType.I32, (short) 1281);
private static final org.apache.thrift.protocol.TField LZ4_COMPRESSED_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"lz4Compressed", org.apache.thrift.protocol.TType.BOOL, (short) 1282);
private static final org.apache.thrift.protocol.TField ARROW_SCHEMA_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"arrowSchema", org.apache.thrift.protocol.TType.STRING, (short) 1283);
private static final org.apache.thrift.protocol.TField CACHE_LOOKUP_RESULT_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"cacheLookupResult", org.apache.thrift.protocol.TType.I32, (short) 1284);
private static final org.apache.thrift.protocol.TField UNCOMPRESSED_BYTES_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"uncompressedBytes", org.apache.thrift.protocol.TType.I64, (short) 1285);
private static final org.apache.thrift.protocol.TField COMPRESSED_BYTES_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"compressedBytes", org.apache.thrift.protocol.TType.I64, (short) 1286);
private static final org.apache.thrift.protocol.TField IS_STAGING_OPERATION_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"isStagingOperation", org.apache.thrift.protocol.TType.BOOL, (short) 1287);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
new TGetResultSetMetadataRespStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
new TGetResultSetMetadataRespTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable TStatus status; // required
public @org.apache.thrift.annotation.Nullable TTableSchema schema; // optional
/**
* @see TSparkRowSetType
*/
public @org.apache.thrift.annotation.Nullable TSparkRowSetType resultFormat; // optional
public boolean lz4Compressed; // optional
public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer arrowSchema; // optional
/**
* @see TCacheLookupResult
*/
public @org.apache.thrift.annotation.Nullable TCacheLookupResult cacheLookupResult; // optional
public long uncompressedBytes; // optional
public long compressedBytes; // optional
public boolean isStagingOperation; // 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 {
STATUS((short) 1, "status"),
SCHEMA((short) 2, "schema"),
/**
* @see TSparkRowSetType
*/
RESULT_FORMAT((short) 1281, "resultFormat"),
LZ4_COMPRESSED((short) 1282, "lz4Compressed"),
ARROW_SCHEMA((short) 1283, "arrowSchema"),
/**
* @see TCacheLookupResult
*/
CACHE_LOOKUP_RESULT((short) 1284, "cacheLookupResult"),
UNCOMPRESSED_BYTES((short) 1285, "uncompressedBytes"),
COMPRESSED_BYTES((short) 1286, "compressedBytes"),
IS_STAGING_OPERATION((short) 1287, "isStagingOperation");
private static final java.util.Map byName =
new java.util.HashMap();
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: // STATUS
return STATUS;
case 2: // SCHEMA
return SCHEMA;
case 1281: // RESULT_FORMAT
return RESULT_FORMAT;
case 1282: // LZ4_COMPRESSED
return LZ4_COMPRESSED;
case 1283: // ARROW_SCHEMA
return ARROW_SCHEMA;
case 1284: // CACHE_LOOKUP_RESULT
return CACHE_LOOKUP_RESULT;
case 1285: // UNCOMPRESSED_BYTES
return UNCOMPRESSED_BYTES;
case 1286: // COMPRESSED_BYTES
return COMPRESSED_BYTES;
case 1287: // IS_STAGING_OPERATION
return IS_STAGING_OPERATION;
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;
}
@Override
public short getThriftFieldId() {
return _thriftId;
}
@Override
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __LZ4COMPRESSED_ISSET_ID = 0;
private static final int __UNCOMPRESSEDBYTES_ISSET_ID = 1;
private static final int __COMPRESSEDBYTES_ISSET_ID = 2;
private static final int __ISSTAGINGOPERATION_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {
_Fields.SCHEMA,
_Fields.RESULT_FORMAT,
_Fields.LZ4_COMPRESSED,
_Fields.ARROW_SCHEMA,
_Fields.CACHE_LOOKUP_RESULT,
_Fields.UNCOMPRESSED_BYTES,
_Fields.COMPRESSED_BYTES,
_Fields.IS_STAGING_OPERATION
};
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.STATUS,
new org.apache.thrift.meta_data.FieldMetaData(
"status",
org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(
org.apache.thrift.protocol.TType.STRUCT, TStatus.class)));
tmpMap.put(
_Fields.SCHEMA,
new org.apache.thrift.meta_data.FieldMetaData(
"schema",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(
org.apache.thrift.protocol.TType.STRUCT, TTableSchema.class)));
tmpMap.put(
_Fields.RESULT_FORMAT,
new org.apache.thrift.meta_data.FieldMetaData(
"resultFormat",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(
org.apache.thrift.protocol.TType.ENUM, TSparkRowSetType.class)));
tmpMap.put(
_Fields.LZ4_COMPRESSED,
new org.apache.thrift.meta_data.FieldMetaData(
"lz4Compressed",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(
_Fields.ARROW_SCHEMA,
new org.apache.thrift.meta_data.FieldMetaData(
"arrowSchema",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.STRING, true)));
tmpMap.put(
_Fields.CACHE_LOOKUP_RESULT,
new org.apache.thrift.meta_data.FieldMetaData(
"cacheLookupResult",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(
org.apache.thrift.protocol.TType.ENUM, TCacheLookupResult.class)));
tmpMap.put(
_Fields.UNCOMPRESSED_BYTES,
new org.apache.thrift.meta_data.FieldMetaData(
"uncompressedBytes",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.I64)));
tmpMap.put(
_Fields.COMPRESSED_BYTES,
new org.apache.thrift.meta_data.FieldMetaData(
"compressedBytes",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.I64)));
tmpMap.put(
_Fields.IS_STAGING_OPERATION,
new org.apache.thrift.meta_data.FieldMetaData(
"isStagingOperation",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
TGetResultSetMetadataResp.class, metaDataMap);
}
public TGetResultSetMetadataResp() {}
public TGetResultSetMetadataResp(TStatus status) {
this();
this.status = status;
}
/** Performs a deep copy on other. */
public TGetResultSetMetadataResp(TGetResultSetMetadataResp other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetStatus()) {
this.status = new TStatus(other.status);
}
if (other.isSetSchema()) {
this.schema = new TTableSchema(other.schema);
}
if (other.isSetResultFormat()) {
this.resultFormat = other.resultFormat;
}
this.lz4Compressed = other.lz4Compressed;
if (other.isSetArrowSchema()) {
this.arrowSchema = org.apache.thrift.TBaseHelper.copyBinary(other.arrowSchema);
}
if (other.isSetCacheLookupResult()) {
this.cacheLookupResult = other.cacheLookupResult;
}
this.uncompressedBytes = other.uncompressedBytes;
this.compressedBytes = other.compressedBytes;
this.isStagingOperation = other.isStagingOperation;
}
@Override
public TGetResultSetMetadataResp deepCopy() {
return new TGetResultSetMetadataResp(this);
}
@Override
public void clear() {
this.status = null;
this.schema = null;
this.resultFormat = null;
setLz4CompressedIsSet(false);
this.lz4Compressed = false;
this.arrowSchema = null;
this.cacheLookupResult = null;
setUncompressedBytesIsSet(false);
this.uncompressedBytes = 0;
setCompressedBytesIsSet(false);
this.compressedBytes = 0;
setIsStagingOperationIsSet(false);
this.isStagingOperation = false;
}
@org.apache.thrift.annotation.Nullable
public TStatus getStatus() {
return this.status;
}
public TGetResultSetMetadataResp setStatus(
@org.apache.thrift.annotation.Nullable TStatus status) {
this.status = status;
return this;
}
public void unsetStatus() {
this.status = null;
}
/** Returns true if field status is set (has been assigned a value) and false otherwise */
public boolean isSetStatus() {
return this.status != null;
}
public void setStatusIsSet(boolean value) {
if (!value) {
this.status = null;
}
}
@org.apache.thrift.annotation.Nullable
public TTableSchema getSchema() {
return this.schema;
}
public TGetResultSetMetadataResp setSchema(
@org.apache.thrift.annotation.Nullable TTableSchema schema) {
this.schema = schema;
return this;
}
public void unsetSchema() {
this.schema = null;
}
/** Returns true if field schema is set (has been assigned a value) and false otherwise */
public boolean isSetSchema() {
return this.schema != null;
}
public void setSchemaIsSet(boolean value) {
if (!value) {
this.schema = null;
}
}
/**
* @see TSparkRowSetType
*/
@org.apache.thrift.annotation.Nullable
public TSparkRowSetType getResultFormat() {
return this.resultFormat;
}
/**
* @see TSparkRowSetType
*/
public TGetResultSetMetadataResp setResultFormat(
@org.apache.thrift.annotation.Nullable TSparkRowSetType resultFormat) {
this.resultFormat = resultFormat;
return this;
}
public void unsetResultFormat() {
this.resultFormat = null;
}
/** Returns true if field resultFormat is set (has been assigned a value) and false otherwise */
public boolean isSetResultFormat() {
return this.resultFormat != null;
}
public void setResultFormatIsSet(boolean value) {
if (!value) {
this.resultFormat = null;
}
}
public boolean isLz4Compressed() {
return this.lz4Compressed;
}
public TGetResultSetMetadataResp setLz4Compressed(boolean lz4Compressed) {
this.lz4Compressed = lz4Compressed;
setLz4CompressedIsSet(true);
return this;
}
public void unsetLz4Compressed() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LZ4COMPRESSED_ISSET_ID);
}
/** Returns true if field lz4Compressed is set (has been assigned a value) and false otherwise */
public boolean isSetLz4Compressed() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LZ4COMPRESSED_ISSET_ID);
}
public void setLz4CompressedIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LZ4COMPRESSED_ISSET_ID, value);
}
public byte[] getArrowSchema() {
setArrowSchema(org.apache.thrift.TBaseHelper.rightSize(arrowSchema));
return arrowSchema == null ? null : arrowSchema.array();
}
public java.nio.ByteBuffer bufferForArrowSchema() {
return org.apache.thrift.TBaseHelper.copyBinary(arrowSchema);
}
public TGetResultSetMetadataResp setArrowSchema(byte[] arrowSchema) {
this.arrowSchema =
arrowSchema == null
? (java.nio.ByteBuffer) null
: java.nio.ByteBuffer.wrap(arrowSchema.clone());
return this;
}
public TGetResultSetMetadataResp setArrowSchema(
@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer arrowSchema) {
this.arrowSchema = org.apache.thrift.TBaseHelper.copyBinary(arrowSchema);
return this;
}
public void unsetArrowSchema() {
this.arrowSchema = null;
}
/** Returns true if field arrowSchema is set (has been assigned a value) and false otherwise */
public boolean isSetArrowSchema() {
return this.arrowSchema != null;
}
public void setArrowSchemaIsSet(boolean value) {
if (!value) {
this.arrowSchema = null;
}
}
/**
* @see TCacheLookupResult
*/
@org.apache.thrift.annotation.Nullable
public TCacheLookupResult getCacheLookupResult() {
return this.cacheLookupResult;
}
/**
* @see TCacheLookupResult
*/
public TGetResultSetMetadataResp setCacheLookupResult(
@org.apache.thrift.annotation.Nullable TCacheLookupResult cacheLookupResult) {
this.cacheLookupResult = cacheLookupResult;
return this;
}
public void unsetCacheLookupResult() {
this.cacheLookupResult = null;
}
/**
* Returns true if field cacheLookupResult is set (has been assigned a value) and false otherwise
*/
public boolean isSetCacheLookupResult() {
return this.cacheLookupResult != null;
}
public void setCacheLookupResultIsSet(boolean value) {
if (!value) {
this.cacheLookupResult = null;
}
}
public long getUncompressedBytes() {
return this.uncompressedBytes;
}
public TGetResultSetMetadataResp setUncompressedBytes(long uncompressedBytes) {
this.uncompressedBytes = uncompressedBytes;
setUncompressedBytesIsSet(true);
return this;
}
public void unsetUncompressedBytes() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNCOMPRESSEDBYTES_ISSET_ID);
}
/**
* Returns true if field uncompressedBytes is set (has been assigned a value) and false otherwise
*/
public boolean isSetUncompressedBytes() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNCOMPRESSEDBYTES_ISSET_ID);
}
public void setUncompressedBytesIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(
__isset_bitfield, __UNCOMPRESSEDBYTES_ISSET_ID, value);
}
public long getCompressedBytes() {
return this.compressedBytes;
}
public TGetResultSetMetadataResp setCompressedBytes(long compressedBytes) {
this.compressedBytes = compressedBytes;
setCompressedBytesIsSet(true);
return this;
}
public void unsetCompressedBytes() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __COMPRESSEDBYTES_ISSET_ID);
}
/**
* Returns true if field compressedBytes is set (has been assigned a value) and false otherwise
*/
public boolean isSetCompressedBytes() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __COMPRESSEDBYTES_ISSET_ID);
}
public void setCompressedBytesIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __COMPRESSEDBYTES_ISSET_ID, value);
}
public boolean isIsStagingOperation() {
return this.isStagingOperation;
}
public TGetResultSetMetadataResp setIsStagingOperation(boolean isStagingOperation) {
this.isStagingOperation = isStagingOperation;
setIsStagingOperationIsSet(true);
return this;
}
public void unsetIsStagingOperation() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISSTAGINGOPERATION_ISSET_ID);
}
/**
* Returns true if field isStagingOperation is set (has been assigned a value) and false otherwise
*/
public boolean isSetIsStagingOperation() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISSTAGINGOPERATION_ISSET_ID);
}
public void setIsStagingOperationIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(
__isset_bitfield, __ISSTAGINGOPERATION_ISSET_ID, value);
}
@Override
public void setFieldValue(
_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case STATUS:
if (value == null) {
unsetStatus();
} else {
setStatus((TStatus) value);
}
break;
case SCHEMA:
if (value == null) {
unsetSchema();
} else {
setSchema((TTableSchema) value);
}
break;
case RESULT_FORMAT:
if (value == null) {
unsetResultFormat();
} else {
setResultFormat((TSparkRowSetType) value);
}
break;
case LZ4_COMPRESSED:
if (value == null) {
unsetLz4Compressed();
} else {
setLz4Compressed((java.lang.Boolean) value);
}
break;
case ARROW_SCHEMA:
if (value == null) {
unsetArrowSchema();
} else {
if (value instanceof byte[]) {
setArrowSchema((byte[]) value);
} else {
setArrowSchema((java.nio.ByteBuffer) value);
}
}
break;
case CACHE_LOOKUP_RESULT:
if (value == null) {
unsetCacheLookupResult();
} else {
setCacheLookupResult((TCacheLookupResult) value);
}
break;
case UNCOMPRESSED_BYTES:
if (value == null) {
unsetUncompressedBytes();
} else {
setUncompressedBytes((java.lang.Long) value);
}
break;
case COMPRESSED_BYTES:
if (value == null) {
unsetCompressedBytes();
} else {
setCompressedBytes((java.lang.Long) value);
}
break;
case IS_STAGING_OPERATION:
if (value == null) {
unsetIsStagingOperation();
} else {
setIsStagingOperation((java.lang.Boolean) value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case STATUS:
return getStatus();
case SCHEMA:
return getSchema();
case RESULT_FORMAT:
return getResultFormat();
case LZ4_COMPRESSED:
return isLz4Compressed();
case ARROW_SCHEMA:
return getArrowSchema();
case CACHE_LOOKUP_RESULT:
return getCacheLookupResult();
case UNCOMPRESSED_BYTES:
return getUncompressedBytes();
case COMPRESSED_BYTES:
return getCompressedBytes();
case IS_STAGING_OPERATION:
return isIsStagingOperation();
}
throw new java.lang.IllegalStateException();
}
/**
* Returns true if field corresponding to fieldID is set (has been assigned a value) and false
* otherwise
*/
@Override
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case STATUS:
return isSetStatus();
case SCHEMA:
return isSetSchema();
case RESULT_FORMAT:
return isSetResultFormat();
case LZ4_COMPRESSED:
return isSetLz4Compressed();
case ARROW_SCHEMA:
return isSetArrowSchema();
case CACHE_LOOKUP_RESULT:
return isSetCacheLookupResult();
case UNCOMPRESSED_BYTES:
return isSetUncompressedBytes();
case COMPRESSED_BYTES:
return isSetCompressedBytes();
case IS_STAGING_OPERATION:
return isSetIsStagingOperation();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TGetResultSetMetadataResp)
return this.equals((TGetResultSetMetadataResp) that);
return false;
}
public boolean equals(TGetResultSetMetadataResp that) {
if (that == null) return false;
if (this == that) return true;
boolean this_present_status = true && this.isSetStatus();
boolean that_present_status = true && that.isSetStatus();
if (this_present_status || that_present_status) {
if (!(this_present_status && that_present_status)) return false;
if (!this.status.equals(that.status)) return false;
}
boolean this_present_schema = true && this.isSetSchema();
boolean that_present_schema = true && that.isSetSchema();
if (this_present_schema || that_present_schema) {
if (!(this_present_schema && that_present_schema)) return false;
if (!this.schema.equals(that.schema)) return false;
}
boolean this_present_resultFormat = true && this.isSetResultFormat();
boolean that_present_resultFormat = true && that.isSetResultFormat();
if (this_present_resultFormat || that_present_resultFormat) {
if (!(this_present_resultFormat && that_present_resultFormat)) return false;
if (!this.resultFormat.equals(that.resultFormat)) return false;
}
boolean this_present_lz4Compressed = true && this.isSetLz4Compressed();
boolean that_present_lz4Compressed = true && that.isSetLz4Compressed();
if (this_present_lz4Compressed || that_present_lz4Compressed) {
if (!(this_present_lz4Compressed && that_present_lz4Compressed)) return false;
if (this.lz4Compressed != that.lz4Compressed) return false;
}
boolean this_present_arrowSchema = true && this.isSetArrowSchema();
boolean that_present_arrowSchema = true && that.isSetArrowSchema();
if (this_present_arrowSchema || that_present_arrowSchema) {
if (!(this_present_arrowSchema && that_present_arrowSchema)) return false;
if (!this.arrowSchema.equals(that.arrowSchema)) return false;
}
boolean this_present_cacheLookupResult = true && this.isSetCacheLookupResult();
boolean that_present_cacheLookupResult = true && that.isSetCacheLookupResult();
if (this_present_cacheLookupResult || that_present_cacheLookupResult) {
if (!(this_present_cacheLookupResult && that_present_cacheLookupResult)) return false;
if (!this.cacheLookupResult.equals(that.cacheLookupResult)) return false;
}
boolean this_present_uncompressedBytes = true && this.isSetUncompressedBytes();
boolean that_present_uncompressedBytes = true && that.isSetUncompressedBytes();
if (this_present_uncompressedBytes || that_present_uncompressedBytes) {
if (!(this_present_uncompressedBytes && that_present_uncompressedBytes)) return false;
if (this.uncompressedBytes != that.uncompressedBytes) return false;
}
boolean this_present_compressedBytes = true && this.isSetCompressedBytes();
boolean that_present_compressedBytes = true && that.isSetCompressedBytes();
if (this_present_compressedBytes || that_present_compressedBytes) {
if (!(this_present_compressedBytes && that_present_compressedBytes)) return false;
if (this.compressedBytes != that.compressedBytes) return false;
}
boolean this_present_isStagingOperation = true && this.isSetIsStagingOperation();
boolean that_present_isStagingOperation = true && that.isSetIsStagingOperation();
if (this_present_isStagingOperation || that_present_isStagingOperation) {
if (!(this_present_isStagingOperation && that_present_isStagingOperation)) return false;
if (this.isStagingOperation != that.isStagingOperation) return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
if (isSetStatus()) hashCode = hashCode * 8191 + status.hashCode();
hashCode = hashCode * 8191 + ((isSetSchema()) ? 131071 : 524287);
if (isSetSchema()) hashCode = hashCode * 8191 + schema.hashCode();
hashCode = hashCode * 8191 + ((isSetResultFormat()) ? 131071 : 524287);
if (isSetResultFormat()) hashCode = hashCode * 8191 + resultFormat.getValue();
hashCode = hashCode * 8191 + ((isSetLz4Compressed()) ? 131071 : 524287);
if (isSetLz4Compressed()) hashCode = hashCode * 8191 + ((lz4Compressed) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetArrowSchema()) ? 131071 : 524287);
if (isSetArrowSchema()) hashCode = hashCode * 8191 + arrowSchema.hashCode();
hashCode = hashCode * 8191 + ((isSetCacheLookupResult()) ? 131071 : 524287);
if (isSetCacheLookupResult()) hashCode = hashCode * 8191 + cacheLookupResult.getValue();
hashCode = hashCode * 8191 + ((isSetUncompressedBytes()) ? 131071 : 524287);
if (isSetUncompressedBytes())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(uncompressedBytes);
hashCode = hashCode * 8191 + ((isSetCompressedBytes()) ? 131071 : 524287);
if (isSetCompressedBytes())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(compressedBytes);
hashCode = hashCode * 8191 + ((isSetIsStagingOperation()) ? 131071 : 524287);
if (isSetIsStagingOperation())
hashCode = hashCode * 8191 + ((isStagingOperation) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(TGetResultSetMetadataResp other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetStatus(), other.isSetStatus());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatus()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetSchema(), other.isSetSchema());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSchema()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, other.schema);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetResultFormat(), other.isSetResultFormat());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetResultFormat()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.resultFormat, other.resultFormat);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetLz4Compressed(), other.isSetLz4Compressed());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLz4Compressed()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.lz4Compressed, other.lz4Compressed);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetArrowSchema(), other.isSetArrowSchema());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetArrowSchema()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.arrowSchema, other.arrowSchema);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetCacheLookupResult(), other.isSetCacheLookupResult());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCacheLookupResult()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.cacheLookupResult, other.cacheLookupResult);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetUncompressedBytes(), other.isSetUncompressedBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUncompressedBytes()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.uncompressedBytes, other.uncompressedBytes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetCompressedBytes(), other.isSetCompressedBytes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCompressedBytes()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.compressedBytes, other.compressedBytes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetIsStagingOperation(), other.isSetIsStagingOperation());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetIsStagingOperation()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(
this.isStagingOperation, other.isStagingOperation);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
@Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
@Override
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("TGetResultSetMetadataResp(");
boolean first = true;
sb.append("status:");
if (this.status == null) {
sb.append("null");
} else {
sb.append(this.status);
}
first = false;
if (isSetSchema()) {
if (!first) sb.append(", ");
sb.append("schema:");
if (this.schema == null) {
sb.append("null");
} else {
sb.append(this.schema);
}
first = false;
}
if (isSetResultFormat()) {
if (!first) sb.append(", ");
sb.append("resultFormat:");
if (this.resultFormat == null) {
sb.append("null");
} else {
sb.append(this.resultFormat);
}
first = false;
}
if (isSetLz4Compressed()) {
if (!first) sb.append(", ");
sb.append("lz4Compressed:");
sb.append(this.lz4Compressed);
first = false;
}
if (isSetArrowSchema()) {
if (!first) sb.append(", ");
sb.append("arrowSchema:");
if (this.arrowSchema == null) {
sb.append("null");
} else {
org.apache.thrift.TBaseHelper.toString(this.arrowSchema, sb);
}
first = false;
}
if (isSetCacheLookupResult()) {
if (!first) sb.append(", ");
sb.append("cacheLookupResult:");
if (this.cacheLookupResult == null) {
sb.append("null");
} else {
sb.append(this.cacheLookupResult);
}
first = false;
}
if (isSetUncompressedBytes()) {
if (!first) sb.append(", ");
sb.append("uncompressedBytes:");
sb.append(this.uncompressedBytes);
first = false;
}
if (isSetCompressedBytes()) {
if (!first) sb.append(", ");
sb.append("compressedBytes:");
sb.append(this.compressedBytes);
first = false;
}
if (isSetIsStagingOperation()) {
if (!first) sb.append(", ");
sb.append("isStagingOperation:");
sb.append(this.isStagingOperation);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (status == null) {
throw new org.apache.thrift.protocol.TProtocolException(
"Required field 'status' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (status != null) {
status.validate();
}
if (schema != null) {
schema.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 {
// 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 TGetResultSetMetadataRespStandardSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TGetResultSetMetadataRespStandardScheme getScheme() {
return new TGetResultSetMetadataRespStandardScheme();
}
}
private static class TGetResultSetMetadataRespStandardScheme
extends org.apache.thrift.scheme.StandardScheme {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, TGetResultSetMetadataResp 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: // STATUS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.status = new TStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // SCHEMA
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.schema = new TTableSchema();
struct.schema.read(iprot);
struct.setSchemaIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1281: // RESULT_FORMAT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.resultFormat =
com.databricks.jdbc.client.impl.thrift.generated.TSparkRowSetType.findByValue(
iprot.readI32());
struct.setResultFormatIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1282: // LZ4_COMPRESSED
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.lz4Compressed = iprot.readBool();
struct.setLz4CompressedIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1283: // ARROW_SCHEMA
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.arrowSchema = iprot.readBinary();
struct.setArrowSchemaIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1284: // CACHE_LOOKUP_RESULT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.cacheLookupResult =
com.databricks.jdbc.client.impl.thrift.generated.TCacheLookupResult.findByValue(
iprot.readI32());
struct.setCacheLookupResultIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1285: // UNCOMPRESSED_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.uncompressedBytes = iprot.readI64();
struct.setUncompressedBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1286: // COMPRESSED_BYTES
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.compressedBytes = iprot.readI64();
struct.setCompressedBytesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1287: // IS_STAGING_OPERATION
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.isStagingOperation = iprot.readBool();
struct.setIsStagingOperationIsSet(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();
}
@Override
public void write(org.apache.thrift.protocol.TProtocol oprot, TGetResultSetMetadataResp struct)
throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.status != null) {
oprot.writeFieldBegin(STATUS_FIELD_DESC);
struct.status.write(oprot);
oprot.writeFieldEnd();
}
if (struct.schema != null) {
if (struct.isSetSchema()) {
oprot.writeFieldBegin(SCHEMA_FIELD_DESC);
struct.schema.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.resultFormat != null) {
if (struct.isSetResultFormat()) {
oprot.writeFieldBegin(RESULT_FORMAT_FIELD_DESC);
oprot.writeI32(struct.resultFormat.getValue());
oprot.writeFieldEnd();
}
}
if (struct.isSetLz4Compressed()) {
oprot.writeFieldBegin(LZ4_COMPRESSED_FIELD_DESC);
oprot.writeBool(struct.lz4Compressed);
oprot.writeFieldEnd();
}
if (struct.arrowSchema != null) {
if (struct.isSetArrowSchema()) {
oprot.writeFieldBegin(ARROW_SCHEMA_FIELD_DESC);
oprot.writeBinary(struct.arrowSchema);
oprot.writeFieldEnd();
}
}
if (struct.cacheLookupResult != null) {
if (struct.isSetCacheLookupResult()) {
oprot.writeFieldBegin(CACHE_LOOKUP_RESULT_FIELD_DESC);
oprot.writeI32(struct.cacheLookupResult.getValue());
oprot.writeFieldEnd();
}
}
if (struct.isSetUncompressedBytes()) {
oprot.writeFieldBegin(UNCOMPRESSED_BYTES_FIELD_DESC);
oprot.writeI64(struct.uncompressedBytes);
oprot.writeFieldEnd();
}
if (struct.isSetCompressedBytes()) {
oprot.writeFieldBegin(COMPRESSED_BYTES_FIELD_DESC);
oprot.writeI64(struct.compressedBytes);
oprot.writeFieldEnd();
}
if (struct.isSetIsStagingOperation()) {
oprot.writeFieldBegin(IS_STAGING_OPERATION_FIELD_DESC);
oprot.writeBool(struct.isStagingOperation);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TGetResultSetMetadataRespTupleSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TGetResultSetMetadataRespTupleScheme getScheme() {
return new TGetResultSetMetadataRespTupleScheme();
}
}
private static class TGetResultSetMetadataRespTupleScheme
extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TGetResultSetMetadataResp struct)
throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
struct.status.write(oprot);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSchema()) {
optionals.set(0);
}
if (struct.isSetResultFormat()) {
optionals.set(1);
}
if (struct.isSetLz4Compressed()) {
optionals.set(2);
}
if (struct.isSetArrowSchema()) {
optionals.set(3);
}
if (struct.isSetCacheLookupResult()) {
optionals.set(4);
}
if (struct.isSetUncompressedBytes()) {
optionals.set(5);
}
if (struct.isSetCompressedBytes()) {
optionals.set(6);
}
if (struct.isSetIsStagingOperation()) {
optionals.set(7);
}
oprot.writeBitSet(optionals, 8);
if (struct.isSetSchema()) {
struct.schema.write(oprot);
}
if (struct.isSetResultFormat()) {
oprot.writeI32(struct.resultFormat.getValue());
}
if (struct.isSetLz4Compressed()) {
oprot.writeBool(struct.lz4Compressed);
}
if (struct.isSetArrowSchema()) {
oprot.writeBinary(struct.arrowSchema);
}
if (struct.isSetCacheLookupResult()) {
oprot.writeI32(struct.cacheLookupResult.getValue());
}
if (struct.isSetUncompressedBytes()) {
oprot.writeI64(struct.uncompressedBytes);
}
if (struct.isSetCompressedBytes()) {
oprot.writeI64(struct.compressedBytes);
}
if (struct.isSetIsStagingOperation()) {
oprot.writeBool(struct.isStagingOperation);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TGetResultSetMetadataResp struct)
throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
struct.status = new TStatus();
struct.status.read(iprot);
struct.setStatusIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(8);
if (incoming.get(0)) {
struct.schema = new TTableSchema();
struct.schema.read(iprot);
struct.setSchemaIsSet(true);
}
if (incoming.get(1)) {
struct.resultFormat =
com.databricks.jdbc.client.impl.thrift.generated.TSparkRowSetType.findByValue(
iprot.readI32());
struct.setResultFormatIsSet(true);
}
if (incoming.get(2)) {
struct.lz4Compressed = iprot.readBool();
struct.setLz4CompressedIsSet(true);
}
if (incoming.get(3)) {
struct.arrowSchema = iprot.readBinary();
struct.setArrowSchemaIsSet(true);
}
if (incoming.get(4)) {
struct.cacheLookupResult =
com.databricks.jdbc.client.impl.thrift.generated.TCacheLookupResult.findByValue(
iprot.readI32());
struct.setCacheLookupResultIsSet(true);
}
if (incoming.get(5)) {
struct.uncompressedBytes = iprot.readI64();
struct.setUncompressedBytesIsSet(true);
}
if (incoming.get(6)) {
struct.compressedBytes = iprot.readI64();
struct.setCompressedBytesIsSet(true);
}
if (incoming.get(7)) {
struct.isStagingOperation = iprot.readBool();
struct.setIsStagingOperationIsSet(true);
}
}
}
private static 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();
}
}