com.databricks.jdbc.client.impl.thrift.generated.TExecuteStatementReq 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 TExecuteStatementReq
implements org.apache.thrift.TBase,
java.io.Serializable,
Cloneable,
Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
new org.apache.thrift.protocol.TStruct("TExecuteStatementReq");
private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
private static final org.apache.thrift.protocol.TField STATEMENT_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"statement", org.apache.thrift.protocol.TType.STRING, (short) 2);
private static final org.apache.thrift.protocol.TField CONF_OVERLAY_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"confOverlay", org.apache.thrift.protocol.TType.MAP, (short) 3);
private static final org.apache.thrift.protocol.TField RUN_ASYNC_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"runAsync", org.apache.thrift.protocol.TType.BOOL, (short) 4);
private static final org.apache.thrift.protocol.TField GET_DIRECT_RESULTS_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"getDirectResults", org.apache.thrift.protocol.TType.STRUCT, (short) 1281);
private static final org.apache.thrift.protocol.TField QUERY_TIMEOUT_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"queryTimeout", org.apache.thrift.protocol.TType.I64, (short) 5);
private static final org.apache.thrift.protocol.TField CAN_READ_ARROW_RESULT_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"canReadArrowResult", org.apache.thrift.protocol.TType.BOOL, (short) 1282);
private static final org.apache.thrift.protocol.TField CAN_DOWNLOAD_RESULT_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"canDownloadResult", org.apache.thrift.protocol.TType.BOOL, (short) 1283);
private static final org.apache.thrift.protocol.TField CAN_DECOMPRESS_LZ4_RESULT_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"canDecompressLZ4Result", org.apache.thrift.protocol.TType.BOOL, (short) 1284);
private static final org.apache.thrift.protocol.TField MAX_BYTES_PER_FILE_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"maxBytesPerFile", org.apache.thrift.protocol.TType.I64, (short) 1285);
private static final org.apache.thrift.protocol.TField USE_ARROW_NATIVE_TYPES_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"useArrowNativeTypes", org.apache.thrift.protocol.TType.STRUCT, (short) 1286);
private static final org.apache.thrift.protocol.TField RESULT_ROW_LIMIT_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"resultRowLimit", org.apache.thrift.protocol.TType.I64, (short) 1287);
private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"parameters", org.apache.thrift.protocol.TType.LIST, (short) 1288);
private static final org.apache.thrift.protocol.TField MAX_BYTES_PER_BATCH_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"maxBytesPerBatch", org.apache.thrift.protocol.TType.I64, (short) 1289);
private static final org.apache.thrift.protocol.TField STATEMENT_CONF_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"statementConf", org.apache.thrift.protocol.TType.STRUCT, (short) 1296);
private static final org.apache.thrift.protocol.TField RESULT_PERSISTENCE_MODE_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"resultPersistenceMode", org.apache.thrift.protocol.TType.I32, (short) 3335);
private static final org.apache.thrift.protocol.TField
ENFORCE_RESULT_PERSISTENCE_MODE_FIELD_DESC =
new org.apache.thrift.protocol.TField(
"enforceResultPersistenceMode", org.apache.thrift.protocol.TType.BOOL, (short) 3344);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY =
new TExecuteStatementReqStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY =
new TExecuteStatementReqTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable TSessionHandle sessionHandle; // required
public @org.apache.thrift.annotation.Nullable java.lang.String statement; // required
public @org.apache.thrift.annotation.Nullable java.util.Map
confOverlay; // optional
public boolean runAsync; // optional
public @org.apache.thrift.annotation.Nullable TSparkGetDirectResults getDirectResults; // optional
public long queryTimeout; // optional
public boolean canReadArrowResult; // optional
public boolean canDownloadResult; // optional
public boolean canDecompressLZ4Result; // optional
public long maxBytesPerFile; // optional
public @org.apache.thrift.annotation.Nullable TSparkArrowTypes useArrowNativeTypes; // optional
public long resultRowLimit; // optional
public @org.apache.thrift.annotation.Nullable java.util.List
parameters; // optional
public long maxBytesPerBatch; // optional
public @org.apache.thrift.annotation.Nullable TStatementConf statementConf; // optional
/**
* @see TResultPersistenceMode
*/
public @org.apache.thrift.annotation.Nullable TResultPersistenceMode
resultPersistenceMode; // optional
public boolean enforceResultPersistenceMode; // 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 {
SESSION_HANDLE((short) 1, "sessionHandle"),
STATEMENT((short) 2, "statement"),
CONF_OVERLAY((short) 3, "confOverlay"),
RUN_ASYNC((short) 4, "runAsync"),
GET_DIRECT_RESULTS((short) 1281, "getDirectResults"),
QUERY_TIMEOUT((short) 5, "queryTimeout"),
CAN_READ_ARROW_RESULT((short) 1282, "canReadArrowResult"),
CAN_DOWNLOAD_RESULT((short) 1283, "canDownloadResult"),
CAN_DECOMPRESS_LZ4_RESULT((short) 1284, "canDecompressLZ4Result"),
MAX_BYTES_PER_FILE((short) 1285, "maxBytesPerFile"),
USE_ARROW_NATIVE_TYPES((short) 1286, "useArrowNativeTypes"),
RESULT_ROW_LIMIT((short) 1287, "resultRowLimit"),
PARAMETERS((short) 1288, "parameters"),
MAX_BYTES_PER_BATCH((short) 1289, "maxBytesPerBatch"),
STATEMENT_CONF((short) 1296, "statementConf"),
/**
* @see TResultPersistenceMode
*/
RESULT_PERSISTENCE_MODE((short) 3335, "resultPersistenceMode"),
ENFORCE_RESULT_PERSISTENCE_MODE((short) 3344, "enforceResultPersistenceMode");
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: // SESSION_HANDLE
return SESSION_HANDLE;
case 2: // STATEMENT
return STATEMENT;
case 3: // CONF_OVERLAY
return CONF_OVERLAY;
case 4: // RUN_ASYNC
return RUN_ASYNC;
case 1281: // GET_DIRECT_RESULTS
return GET_DIRECT_RESULTS;
case 5: // QUERY_TIMEOUT
return QUERY_TIMEOUT;
case 1282: // CAN_READ_ARROW_RESULT
return CAN_READ_ARROW_RESULT;
case 1283: // CAN_DOWNLOAD_RESULT
return CAN_DOWNLOAD_RESULT;
case 1284: // CAN_DECOMPRESS_LZ4_RESULT
return CAN_DECOMPRESS_LZ4_RESULT;
case 1285: // MAX_BYTES_PER_FILE
return MAX_BYTES_PER_FILE;
case 1286: // USE_ARROW_NATIVE_TYPES
return USE_ARROW_NATIVE_TYPES;
case 1287: // RESULT_ROW_LIMIT
return RESULT_ROW_LIMIT;
case 1288: // PARAMETERS
return PARAMETERS;
case 1289: // MAX_BYTES_PER_BATCH
return MAX_BYTES_PER_BATCH;
case 1296: // STATEMENT_CONF
return STATEMENT_CONF;
case 3335: // RESULT_PERSISTENCE_MODE
return RESULT_PERSISTENCE_MODE;
case 3344: // ENFORCE_RESULT_PERSISTENCE_MODE
return ENFORCE_RESULT_PERSISTENCE_MODE;
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 __RUNASYNC_ISSET_ID = 0;
private static final int __QUERYTIMEOUT_ISSET_ID = 1;
private static final int __CANREADARROWRESULT_ISSET_ID = 2;
private static final int __CANDOWNLOADRESULT_ISSET_ID = 3;
private static final int __CANDECOMPRESSLZ4RESULT_ISSET_ID = 4;
private static final int __MAXBYTESPERFILE_ISSET_ID = 5;
private static final int __RESULTROWLIMIT_ISSET_ID = 6;
private static final int __MAXBYTESPERBATCH_ISSET_ID = 7;
private static final int __ENFORCERESULTPERSISTENCEMODE_ISSET_ID = 8;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {
_Fields.CONF_OVERLAY,
_Fields.RUN_ASYNC,
_Fields.GET_DIRECT_RESULTS,
_Fields.QUERY_TIMEOUT,
_Fields.CAN_READ_ARROW_RESULT,
_Fields.CAN_DOWNLOAD_RESULT,
_Fields.CAN_DECOMPRESS_LZ4_RESULT,
_Fields.MAX_BYTES_PER_FILE,
_Fields.USE_ARROW_NATIVE_TYPES,
_Fields.RESULT_ROW_LIMIT,
_Fields.PARAMETERS,
_Fields.MAX_BYTES_PER_BATCH,
_Fields.STATEMENT_CONF,
_Fields.RESULT_PERSISTENCE_MODE,
_Fields.ENFORCE_RESULT_PERSISTENCE_MODE
};
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.SESSION_HANDLE,
new org.apache.thrift.meta_data.FieldMetaData(
"sessionHandle",
org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.StructMetaData(
org.apache.thrift.protocol.TType.STRUCT, TSessionHandle.class)));
tmpMap.put(
_Fields.STATEMENT,
new org.apache.thrift.meta_data.FieldMetaData(
"statement",
org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(
_Fields.CONF_OVERLAY,
new org.apache.thrift.meta_data.FieldMetaData(
"confOverlay",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(
org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(
_Fields.RUN_ASYNC,
new org.apache.thrift.meta_data.FieldMetaData(
"runAsync",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(
_Fields.GET_DIRECT_RESULTS,
new org.apache.thrift.meta_data.FieldMetaData(
"getDirectResults",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(
org.apache.thrift.protocol.TType.STRUCT, TSparkGetDirectResults.class)));
tmpMap.put(
_Fields.QUERY_TIMEOUT,
new org.apache.thrift.meta_data.FieldMetaData(
"queryTimeout",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.I64)));
tmpMap.put(
_Fields.CAN_READ_ARROW_RESULT,
new org.apache.thrift.meta_data.FieldMetaData(
"canReadArrowResult",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(
_Fields.CAN_DOWNLOAD_RESULT,
new org.apache.thrift.meta_data.FieldMetaData(
"canDownloadResult",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(
_Fields.CAN_DECOMPRESS_LZ4_RESULT,
new org.apache.thrift.meta_data.FieldMetaData(
"canDecompressLZ4Result",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(
_Fields.MAX_BYTES_PER_FILE,
new org.apache.thrift.meta_data.FieldMetaData(
"maxBytesPerFile",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.I64)));
tmpMap.put(
_Fields.USE_ARROW_NATIVE_TYPES,
new org.apache.thrift.meta_data.FieldMetaData(
"useArrowNativeTypes",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(
org.apache.thrift.protocol.TType.STRUCT, TSparkArrowTypes.class)));
tmpMap.put(
_Fields.RESULT_ROW_LIMIT,
new org.apache.thrift.meta_data.FieldMetaData(
"resultRowLimit",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.I64)));
tmpMap.put(
_Fields.PARAMETERS,
new org.apache.thrift.meta_data.FieldMetaData(
"parameters",
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, TSparkParameter.class))));
tmpMap.put(
_Fields.MAX_BYTES_PER_BATCH,
new org.apache.thrift.meta_data.FieldMetaData(
"maxBytesPerBatch",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(
org.apache.thrift.protocol.TType.I64)));
tmpMap.put(
_Fields.STATEMENT_CONF,
new org.apache.thrift.meta_data.FieldMetaData(
"statementConf",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(
org.apache.thrift.protocol.TType.STRUCT, TStatementConf.class)));
tmpMap.put(
_Fields.RESULT_PERSISTENCE_MODE,
new org.apache.thrift.meta_data.FieldMetaData(
"resultPersistenceMode",
org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(
org.apache.thrift.protocol.TType.ENUM, TResultPersistenceMode.class)));
tmpMap.put(
_Fields.ENFORCE_RESULT_PERSISTENCE_MODE,
new org.apache.thrift.meta_data.FieldMetaData(
"enforceResultPersistenceMode",
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(
TExecuteStatementReq.class, metaDataMap);
}
public TExecuteStatementReq() {
this.runAsync = false;
this.queryTimeout = 0L;
}
public TExecuteStatementReq(TSessionHandle sessionHandle, java.lang.String statement) {
this();
this.sessionHandle = sessionHandle;
this.statement = statement;
}
/** Performs a deep copy on other. */
public TExecuteStatementReq(TExecuteStatementReq other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetSessionHandle()) {
this.sessionHandle = new TSessionHandle(other.sessionHandle);
}
if (other.isSetStatement()) {
this.statement = other.statement;
}
if (other.isSetConfOverlay()) {
java.util.Map __this__confOverlay =
new java.util.HashMap(other.confOverlay);
this.confOverlay = __this__confOverlay;
}
this.runAsync = other.runAsync;
if (other.isSetGetDirectResults()) {
this.getDirectResults = new TSparkGetDirectResults(other.getDirectResults);
}
this.queryTimeout = other.queryTimeout;
this.canReadArrowResult = other.canReadArrowResult;
this.canDownloadResult = other.canDownloadResult;
this.canDecompressLZ4Result = other.canDecompressLZ4Result;
this.maxBytesPerFile = other.maxBytesPerFile;
if (other.isSetUseArrowNativeTypes()) {
this.useArrowNativeTypes = new TSparkArrowTypes(other.useArrowNativeTypes);
}
this.resultRowLimit = other.resultRowLimit;
if (other.isSetParameters()) {
java.util.List __this__parameters =
new java.util.ArrayList(other.parameters.size());
for (TSparkParameter other_element : other.parameters) {
__this__parameters.add(new TSparkParameter(other_element));
}
this.parameters = __this__parameters;
}
this.maxBytesPerBatch = other.maxBytesPerBatch;
if (other.isSetStatementConf()) {
this.statementConf = new TStatementConf(other.statementConf);
}
if (other.isSetResultPersistenceMode()) {
this.resultPersistenceMode = other.resultPersistenceMode;
}
this.enforceResultPersistenceMode = other.enforceResultPersistenceMode;
}
@Override
public TExecuteStatementReq deepCopy() {
return new TExecuteStatementReq(this);
}
@Override
public void clear() {
this.sessionHandle = null;
this.statement = null;
this.confOverlay = null;
this.runAsync = false;
this.getDirectResults = null;
this.queryTimeout = 0L;
setCanReadArrowResultIsSet(false);
this.canReadArrowResult = false;
setCanDownloadResultIsSet(false);
this.canDownloadResult = false;
setCanDecompressLZ4ResultIsSet(false);
this.canDecompressLZ4Result = false;
setMaxBytesPerFileIsSet(false);
this.maxBytesPerFile = 0;
this.useArrowNativeTypes = null;
setResultRowLimitIsSet(false);
this.resultRowLimit = 0;
this.parameters = null;
setMaxBytesPerBatchIsSet(false);
this.maxBytesPerBatch = 0;
this.statementConf = null;
this.resultPersistenceMode = null;
setEnforceResultPersistenceModeIsSet(false);
this.enforceResultPersistenceMode = false;
}
@org.apache.thrift.annotation.Nullable
public TSessionHandle getSessionHandle() {
return this.sessionHandle;
}
public TExecuteStatementReq setSessionHandle(
@org.apache.thrift.annotation.Nullable TSessionHandle sessionHandle) {
this.sessionHandle = sessionHandle;
return this;
}
public void unsetSessionHandle() {
this.sessionHandle = null;
}
/** Returns true if field sessionHandle is set (has been assigned a value) and false otherwise */
public boolean isSetSessionHandle() {
return this.sessionHandle != null;
}
public void setSessionHandleIsSet(boolean value) {
if (!value) {
this.sessionHandle = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getStatement() {
return this.statement;
}
public TExecuteStatementReq setStatement(
@org.apache.thrift.annotation.Nullable java.lang.String statement) {
this.statement = statement;
return this;
}
public void unsetStatement() {
this.statement = null;
}
/** Returns true if field statement is set (has been assigned a value) and false otherwise */
public boolean isSetStatement() {
return this.statement != null;
}
public void setStatementIsSet(boolean value) {
if (!value) {
this.statement = null;
}
}
@Deprecated
public int getConfOverlaySize() {
return (this.confOverlay == null) ? 0 : this.confOverlay.size();
}
@Deprecated
public void putToConfOverlay(java.lang.String key, java.lang.String val) {
if (this.confOverlay == null) {
this.confOverlay = new java.util.HashMap();
}
this.confOverlay.put(key, val);
}
@Deprecated
@org.apache.thrift.annotation.Nullable
public java.util.Map getConfOverlay() {
return this.confOverlay;
}
@Deprecated
public TExecuteStatementReq setConfOverlay(
@org.apache.thrift.annotation.Nullable
java.util.Map confOverlay) {
this.confOverlay = confOverlay;
return this;
}
@Deprecated
public void unsetConfOverlay() {
this.confOverlay = null;
}
/** Returns true if field confOverlay is set (has been assigned a value) and false otherwise */
@Deprecated
public boolean isSetConfOverlay() {
return this.confOverlay != null;
}
@Deprecated
public void setConfOverlayIsSet(boolean value) {
if (!value) {
this.confOverlay = null;
}
}
public boolean isRunAsync() {
return this.runAsync;
}
public TExecuteStatementReq setRunAsync(boolean runAsync) {
this.runAsync = runAsync;
setRunAsyncIsSet(true);
return this;
}
public void unsetRunAsync() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RUNASYNC_ISSET_ID);
}
/** Returns true if field runAsync is set (has been assigned a value) and false otherwise */
public boolean isSetRunAsync() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RUNASYNC_ISSET_ID);
}
public void setRunAsyncIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RUNASYNC_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public TSparkGetDirectResults getGetDirectResults() {
return this.getDirectResults;
}
public TExecuteStatementReq setGetDirectResults(
@org.apache.thrift.annotation.Nullable TSparkGetDirectResults getDirectResults) {
this.getDirectResults = getDirectResults;
return this;
}
public void unsetGetDirectResults() {
this.getDirectResults = null;
}
/**
* Returns true if field getDirectResults is set (has been assigned a value) and false otherwise
*/
public boolean isSetGetDirectResults() {
return this.getDirectResults != null;
}
public void setGetDirectResultsIsSet(boolean value) {
if (!value) {
this.getDirectResults = null;
}
}
public long getQueryTimeout() {
return this.queryTimeout;
}
public TExecuteStatementReq setQueryTimeout(long queryTimeout) {
this.queryTimeout = queryTimeout;
setQueryTimeoutIsSet(true);
return this;
}
public void unsetQueryTimeout() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __QUERYTIMEOUT_ISSET_ID);
}
/** Returns true if field queryTimeout is set (has been assigned a value) and false otherwise */
public boolean isSetQueryTimeout() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __QUERYTIMEOUT_ISSET_ID);
}
public void setQueryTimeoutIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __QUERYTIMEOUT_ISSET_ID, value);
}
public boolean isCanReadArrowResult() {
return this.canReadArrowResult;
}
public TExecuteStatementReq setCanReadArrowResult(boolean canReadArrowResult) {
this.canReadArrowResult = canReadArrowResult;
setCanReadArrowResultIsSet(true);
return this;
}
public void unsetCanReadArrowResult() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CANREADARROWRESULT_ISSET_ID);
}
/**
* Returns true if field canReadArrowResult is set (has been assigned a value) and false otherwise
*/
public boolean isSetCanReadArrowResult() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CANREADARROWRESULT_ISSET_ID);
}
public void setCanReadArrowResultIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(
__isset_bitfield, __CANREADARROWRESULT_ISSET_ID, value);
}
public boolean isCanDownloadResult() {
return this.canDownloadResult;
}
public TExecuteStatementReq setCanDownloadResult(boolean canDownloadResult) {
this.canDownloadResult = canDownloadResult;
setCanDownloadResultIsSet(true);
return this;
}
public void unsetCanDownloadResult() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CANDOWNLOADRESULT_ISSET_ID);
}
/**
* Returns true if field canDownloadResult is set (has been assigned a value) and false otherwise
*/
public boolean isSetCanDownloadResult() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CANDOWNLOADRESULT_ISSET_ID);
}
public void setCanDownloadResultIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(
__isset_bitfield, __CANDOWNLOADRESULT_ISSET_ID, value);
}
public boolean isCanDecompressLZ4Result() {
return this.canDecompressLZ4Result;
}
public TExecuteStatementReq setCanDecompressLZ4Result(boolean canDecompressLZ4Result) {
this.canDecompressLZ4Result = canDecompressLZ4Result;
setCanDecompressLZ4ResultIsSet(true);
return this;
}
public void unsetCanDecompressLZ4Result() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(
__isset_bitfield, __CANDECOMPRESSLZ4RESULT_ISSET_ID);
}
/**
* Returns true if field canDecompressLZ4Result is set (has been assigned a value) and false
* otherwise
*/
public boolean isSetCanDecompressLZ4Result() {
return org.apache.thrift.EncodingUtils.testBit(
__isset_bitfield, __CANDECOMPRESSLZ4RESULT_ISSET_ID);
}
public void setCanDecompressLZ4ResultIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(
__isset_bitfield, __CANDECOMPRESSLZ4RESULT_ISSET_ID, value);
}
public long getMaxBytesPerFile() {
return this.maxBytesPerFile;
}
public TExecuteStatementReq setMaxBytesPerFile(long maxBytesPerFile) {
this.maxBytesPerFile = maxBytesPerFile;
setMaxBytesPerFileIsSet(true);
return this;
}
public void unsetMaxBytesPerFile() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXBYTESPERFILE_ISSET_ID);
}
/**
* Returns true if field maxBytesPerFile is set (has been assigned a value) and false otherwise
*/
public boolean isSetMaxBytesPerFile() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXBYTESPERFILE_ISSET_ID);
}
public void setMaxBytesPerFileIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXBYTESPERFILE_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public TSparkArrowTypes getUseArrowNativeTypes() {
return this.useArrowNativeTypes;
}
public TExecuteStatementReq setUseArrowNativeTypes(
@org.apache.thrift.annotation.Nullable TSparkArrowTypes useArrowNativeTypes) {
this.useArrowNativeTypes = useArrowNativeTypes;
return this;
}
public void unsetUseArrowNativeTypes() {
this.useArrowNativeTypes = null;
}
/**
* Returns true if field useArrowNativeTypes is set (has been assigned a value) and false
* otherwise
*/
public boolean isSetUseArrowNativeTypes() {
return this.useArrowNativeTypes != null;
}
public void setUseArrowNativeTypesIsSet(boolean value) {
if (!value) {
this.useArrowNativeTypes = null;
}
}
public long getResultRowLimit() {
return this.resultRowLimit;
}
public TExecuteStatementReq setResultRowLimit(long resultRowLimit) {
this.resultRowLimit = resultRowLimit;
setResultRowLimitIsSet(true);
return this;
}
public void unsetResultRowLimit() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RESULTROWLIMIT_ISSET_ID);
}
/** Returns true if field resultRowLimit is set (has been assigned a value) and false otherwise */
public boolean isSetResultRowLimit() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RESULTROWLIMIT_ISSET_ID);
}
public void setResultRowLimitIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RESULTROWLIMIT_ISSET_ID, value);
}
public int getParametersSize() {
return (this.parameters == null) ? 0 : this.parameters.size();
}
@org.apache.thrift.annotation.Nullable
public java.util.Iterator getParametersIterator() {
return (this.parameters == null) ? null : this.parameters.iterator();
}
public void addToParameters(TSparkParameter elem) {
if (this.parameters == null) {
this.parameters = new java.util.ArrayList();
}
this.parameters.add(elem);
}
@org.apache.thrift.annotation.Nullable
public java.util.List getParameters() {
return this.parameters;
}
public TExecuteStatementReq setParameters(
@org.apache.thrift.annotation.Nullable java.util.List parameters) {
this.parameters = parameters;
return this;
}
public void unsetParameters() {
this.parameters = null;
}
/** Returns true if field parameters is set (has been assigned a value) and false otherwise */
public boolean isSetParameters() {
return this.parameters != null;
}
public void setParametersIsSet(boolean value) {
if (!value) {
this.parameters = null;
}
}
public long getMaxBytesPerBatch() {
return this.maxBytesPerBatch;
}
public TExecuteStatementReq setMaxBytesPerBatch(long maxBytesPerBatch) {
this.maxBytesPerBatch = maxBytesPerBatch;
setMaxBytesPerBatchIsSet(true);
return this;
}
public void unsetMaxBytesPerBatch() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXBYTESPERBATCH_ISSET_ID);
}
/**
* Returns true if field maxBytesPerBatch is set (has been assigned a value) and false otherwise
*/
public boolean isSetMaxBytesPerBatch() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXBYTESPERBATCH_ISSET_ID);
}
public void setMaxBytesPerBatchIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(
__isset_bitfield, __MAXBYTESPERBATCH_ISSET_ID, value);
}
@org.apache.thrift.annotation.Nullable
public TStatementConf getStatementConf() {
return this.statementConf;
}
public TExecuteStatementReq setStatementConf(
@org.apache.thrift.annotation.Nullable TStatementConf statementConf) {
this.statementConf = statementConf;
return this;
}
public void unsetStatementConf() {
this.statementConf = null;
}
/** Returns true if field statementConf is set (has been assigned a value) and false otherwise */
public boolean isSetStatementConf() {
return this.statementConf != null;
}
public void setStatementConfIsSet(boolean value) {
if (!value) {
this.statementConf = null;
}
}
/**
* @see TResultPersistenceMode
*/
@org.apache.thrift.annotation.Nullable
public TResultPersistenceMode getResultPersistenceMode() {
return this.resultPersistenceMode;
}
/**
* @see TResultPersistenceMode
*/
public TExecuteStatementReq setResultPersistenceMode(
@org.apache.thrift.annotation.Nullable TResultPersistenceMode resultPersistenceMode) {
this.resultPersistenceMode = resultPersistenceMode;
return this;
}
public void unsetResultPersistenceMode() {
this.resultPersistenceMode = null;
}
/**
* Returns true if field resultPersistenceMode is set (has been assigned a value) and false
* otherwise
*/
public boolean isSetResultPersistenceMode() {
return this.resultPersistenceMode != null;
}
public void setResultPersistenceModeIsSet(boolean value) {
if (!value) {
this.resultPersistenceMode = null;
}
}
public boolean isEnforceResultPersistenceMode() {
return this.enforceResultPersistenceMode;
}
public TExecuteStatementReq setEnforceResultPersistenceMode(
boolean enforceResultPersistenceMode) {
this.enforceResultPersistenceMode = enforceResultPersistenceMode;
setEnforceResultPersistenceModeIsSet(true);
return this;
}
public void unsetEnforceResultPersistenceMode() {
__isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(
__isset_bitfield, __ENFORCERESULTPERSISTENCEMODE_ISSET_ID);
}
/**
* Returns true if field enforceResultPersistenceMode is set (has been assigned a value) and false
* otherwise
*/
public boolean isSetEnforceResultPersistenceMode() {
return org.apache.thrift.EncodingUtils.testBit(
__isset_bitfield, __ENFORCERESULTPERSISTENCEMODE_ISSET_ID);
}
public void setEnforceResultPersistenceModeIsSet(boolean value) {
__isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(
__isset_bitfield, __ENFORCERESULTPERSISTENCEMODE_ISSET_ID, value);
}
@Override
public void setFieldValue(
_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_HANDLE:
if (value == null) {
unsetSessionHandle();
} else {
setSessionHandle((TSessionHandle) value);
}
break;
case STATEMENT:
if (value == null) {
unsetStatement();
} else {
setStatement((java.lang.String) value);
}
break;
case CONF_OVERLAY:
if (value == null) {
unsetConfOverlay();
} else {
setConfOverlay((java.util.Map) value);
}
break;
case RUN_ASYNC:
if (value == null) {
unsetRunAsync();
} else {
setRunAsync((java.lang.Boolean) value);
}
break;
case GET_DIRECT_RESULTS:
if (value == null) {
unsetGetDirectResults();
} else {
setGetDirectResults((TSparkGetDirectResults) value);
}
break;
case QUERY_TIMEOUT:
if (value == null) {
unsetQueryTimeout();
} else {
setQueryTimeout((java.lang.Long) value);
}
break;
case CAN_READ_ARROW_RESULT:
if (value == null) {
unsetCanReadArrowResult();
} else {
setCanReadArrowResult((java.lang.Boolean) value);
}
break;
case CAN_DOWNLOAD_RESULT:
if (value == null) {
unsetCanDownloadResult();
} else {
setCanDownloadResult((java.lang.Boolean) value);
}
break;
case CAN_DECOMPRESS_LZ4_RESULT:
if (value == null) {
unsetCanDecompressLZ4Result();
} else {
setCanDecompressLZ4Result((java.lang.Boolean) value);
}
break;
case MAX_BYTES_PER_FILE:
if (value == null) {
unsetMaxBytesPerFile();
} else {
setMaxBytesPerFile((java.lang.Long) value);
}
break;
case USE_ARROW_NATIVE_TYPES:
if (value == null) {
unsetUseArrowNativeTypes();
} else {
setUseArrowNativeTypes((TSparkArrowTypes) value);
}
break;
case RESULT_ROW_LIMIT:
if (value == null) {
unsetResultRowLimit();
} else {
setResultRowLimit((java.lang.Long) value);
}
break;
case PARAMETERS:
if (value == null) {
unsetParameters();
} else {
setParameters((java.util.List) value);
}
break;
case MAX_BYTES_PER_BATCH:
if (value == null) {
unsetMaxBytesPerBatch();
} else {
setMaxBytesPerBatch((java.lang.Long) value);
}
break;
case STATEMENT_CONF:
if (value == null) {
unsetStatementConf();
} else {
setStatementConf((TStatementConf) value);
}
break;
case RESULT_PERSISTENCE_MODE:
if (value == null) {
unsetResultPersistenceMode();
} else {
setResultPersistenceMode((TResultPersistenceMode) value);
}
break;
case ENFORCE_RESULT_PERSISTENCE_MODE:
if (value == null) {
unsetEnforceResultPersistenceMode();
} else {
setEnforceResultPersistenceMode((java.lang.Boolean) value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
@Override
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_HANDLE:
return getSessionHandle();
case STATEMENT:
return getStatement();
case CONF_OVERLAY:
return getConfOverlay();
case RUN_ASYNC:
return isRunAsync();
case GET_DIRECT_RESULTS:
return getGetDirectResults();
case QUERY_TIMEOUT:
return getQueryTimeout();
case CAN_READ_ARROW_RESULT:
return isCanReadArrowResult();
case CAN_DOWNLOAD_RESULT:
return isCanDownloadResult();
case CAN_DECOMPRESS_LZ4_RESULT:
return isCanDecompressLZ4Result();
case MAX_BYTES_PER_FILE:
return getMaxBytesPerFile();
case USE_ARROW_NATIVE_TYPES:
return getUseArrowNativeTypes();
case RESULT_ROW_LIMIT:
return getResultRowLimit();
case PARAMETERS:
return getParameters();
case MAX_BYTES_PER_BATCH:
return getMaxBytesPerBatch();
case STATEMENT_CONF:
return getStatementConf();
case RESULT_PERSISTENCE_MODE:
return getResultPersistenceMode();
case ENFORCE_RESULT_PERSISTENCE_MODE:
return isEnforceResultPersistenceMode();
}
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 SESSION_HANDLE:
return isSetSessionHandle();
case STATEMENT:
return isSetStatement();
case CONF_OVERLAY:
return isSetConfOverlay();
case RUN_ASYNC:
return isSetRunAsync();
case GET_DIRECT_RESULTS:
return isSetGetDirectResults();
case QUERY_TIMEOUT:
return isSetQueryTimeout();
case CAN_READ_ARROW_RESULT:
return isSetCanReadArrowResult();
case CAN_DOWNLOAD_RESULT:
return isSetCanDownloadResult();
case CAN_DECOMPRESS_LZ4_RESULT:
return isSetCanDecompressLZ4Result();
case MAX_BYTES_PER_FILE:
return isSetMaxBytesPerFile();
case USE_ARROW_NATIVE_TYPES:
return isSetUseArrowNativeTypes();
case RESULT_ROW_LIMIT:
return isSetResultRowLimit();
case PARAMETERS:
return isSetParameters();
case MAX_BYTES_PER_BATCH:
return isSetMaxBytesPerBatch();
case STATEMENT_CONF:
return isSetStatementConf();
case RESULT_PERSISTENCE_MODE:
return isSetResultPersistenceMode();
case ENFORCE_RESULT_PERSISTENCE_MODE:
return isSetEnforceResultPersistenceMode();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof TExecuteStatementReq) return this.equals((TExecuteStatementReq) that);
return false;
}
public boolean equals(TExecuteStatementReq that) {
if (that == null) return false;
if (this == that) return true;
boolean this_present_sessionHandle = true && this.isSetSessionHandle();
boolean that_present_sessionHandle = true && that.isSetSessionHandle();
if (this_present_sessionHandle || that_present_sessionHandle) {
if (!(this_present_sessionHandle && that_present_sessionHandle)) return false;
if (!this.sessionHandle.equals(that.sessionHandle)) return false;
}
boolean this_present_statement = true && this.isSetStatement();
boolean that_present_statement = true && that.isSetStatement();
if (this_present_statement || that_present_statement) {
if (!(this_present_statement && that_present_statement)) return false;
if (!this.statement.equals(that.statement)) return false;
}
boolean this_present_confOverlay = true && this.isSetConfOverlay();
boolean that_present_confOverlay = true && that.isSetConfOverlay();
if (this_present_confOverlay || that_present_confOverlay) {
if (!(this_present_confOverlay && that_present_confOverlay)) return false;
if (!this.confOverlay.equals(that.confOverlay)) return false;
}
boolean this_present_runAsync = true && this.isSetRunAsync();
boolean that_present_runAsync = true && that.isSetRunAsync();
if (this_present_runAsync || that_present_runAsync) {
if (!(this_present_runAsync && that_present_runAsync)) return false;
if (this.runAsync != that.runAsync) return false;
}
boolean this_present_getDirectResults = true && this.isSetGetDirectResults();
boolean that_present_getDirectResults = true && that.isSetGetDirectResults();
if (this_present_getDirectResults || that_present_getDirectResults) {
if (!(this_present_getDirectResults && that_present_getDirectResults)) return false;
if (!this.getDirectResults.equals(that.getDirectResults)) return false;
}
boolean this_present_queryTimeout = true && this.isSetQueryTimeout();
boolean that_present_queryTimeout = true && that.isSetQueryTimeout();
if (this_present_queryTimeout || that_present_queryTimeout) {
if (!(this_present_queryTimeout && that_present_queryTimeout)) return false;
if (this.queryTimeout != that.queryTimeout) return false;
}
boolean this_present_canReadArrowResult = true && this.isSetCanReadArrowResult();
boolean that_present_canReadArrowResult = true && that.isSetCanReadArrowResult();
if (this_present_canReadArrowResult || that_present_canReadArrowResult) {
if (!(this_present_canReadArrowResult && that_present_canReadArrowResult)) return false;
if (this.canReadArrowResult != that.canReadArrowResult) return false;
}
boolean this_present_canDownloadResult = true && this.isSetCanDownloadResult();
boolean that_present_canDownloadResult = true && that.isSetCanDownloadResult();
if (this_present_canDownloadResult || that_present_canDownloadResult) {
if (!(this_present_canDownloadResult && that_present_canDownloadResult)) return false;
if (this.canDownloadResult != that.canDownloadResult) return false;
}
boolean this_present_canDecompressLZ4Result = true && this.isSetCanDecompressLZ4Result();
boolean that_present_canDecompressLZ4Result = true && that.isSetCanDecompressLZ4Result();
if (this_present_canDecompressLZ4Result || that_present_canDecompressLZ4Result) {
if (!(this_present_canDecompressLZ4Result && that_present_canDecompressLZ4Result))
return false;
if (this.canDecompressLZ4Result != that.canDecompressLZ4Result) return false;
}
boolean this_present_maxBytesPerFile = true && this.isSetMaxBytesPerFile();
boolean that_present_maxBytesPerFile = true && that.isSetMaxBytesPerFile();
if (this_present_maxBytesPerFile || that_present_maxBytesPerFile) {
if (!(this_present_maxBytesPerFile && that_present_maxBytesPerFile)) return false;
if (this.maxBytesPerFile != that.maxBytesPerFile) return false;
}
boolean this_present_useArrowNativeTypes = true && this.isSetUseArrowNativeTypes();
boolean that_present_useArrowNativeTypes = true && that.isSetUseArrowNativeTypes();
if (this_present_useArrowNativeTypes || that_present_useArrowNativeTypes) {
if (!(this_present_useArrowNativeTypes && that_present_useArrowNativeTypes)) return false;
if (!this.useArrowNativeTypes.equals(that.useArrowNativeTypes)) return false;
}
boolean this_present_resultRowLimit = true && this.isSetResultRowLimit();
boolean that_present_resultRowLimit = true && that.isSetResultRowLimit();
if (this_present_resultRowLimit || that_present_resultRowLimit) {
if (!(this_present_resultRowLimit && that_present_resultRowLimit)) return false;
if (this.resultRowLimit != that.resultRowLimit) return false;
}
boolean this_present_parameters = true && this.isSetParameters();
boolean that_present_parameters = true && that.isSetParameters();
if (this_present_parameters || that_present_parameters) {
if (!(this_present_parameters && that_present_parameters)) return false;
if (!this.parameters.equals(that.parameters)) return false;
}
boolean this_present_maxBytesPerBatch = true && this.isSetMaxBytesPerBatch();
boolean that_present_maxBytesPerBatch = true && that.isSetMaxBytesPerBatch();
if (this_present_maxBytesPerBatch || that_present_maxBytesPerBatch) {
if (!(this_present_maxBytesPerBatch && that_present_maxBytesPerBatch)) return false;
if (this.maxBytesPerBatch != that.maxBytesPerBatch) return false;
}
boolean this_present_statementConf = true && this.isSetStatementConf();
boolean that_present_statementConf = true && that.isSetStatementConf();
if (this_present_statementConf || that_present_statementConf) {
if (!(this_present_statementConf && that_present_statementConf)) return false;
if (!this.statementConf.equals(that.statementConf)) return false;
}
boolean this_present_resultPersistenceMode = true && this.isSetResultPersistenceMode();
boolean that_present_resultPersistenceMode = true && that.isSetResultPersistenceMode();
if (this_present_resultPersistenceMode || that_present_resultPersistenceMode) {
if (!(this_present_resultPersistenceMode && that_present_resultPersistenceMode)) return false;
if (!this.resultPersistenceMode.equals(that.resultPersistenceMode)) return false;
}
boolean this_present_enforceResultPersistenceMode =
true && this.isSetEnforceResultPersistenceMode();
boolean that_present_enforceResultPersistenceMode =
true && that.isSetEnforceResultPersistenceMode();
if (this_present_enforceResultPersistenceMode || that_present_enforceResultPersistenceMode) {
if (!(this_present_enforceResultPersistenceMode && that_present_enforceResultPersistenceMode))
return false;
if (this.enforceResultPersistenceMode != that.enforceResultPersistenceMode) return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSessionHandle()) ? 131071 : 524287);
if (isSetSessionHandle()) hashCode = hashCode * 8191 + sessionHandle.hashCode();
hashCode = hashCode * 8191 + ((isSetStatement()) ? 131071 : 524287);
if (isSetStatement()) hashCode = hashCode * 8191 + statement.hashCode();
hashCode = hashCode * 8191 + ((isSetConfOverlay()) ? 131071 : 524287);
if (isSetConfOverlay()) hashCode = hashCode * 8191 + confOverlay.hashCode();
hashCode = hashCode * 8191 + ((isSetRunAsync()) ? 131071 : 524287);
if (isSetRunAsync()) hashCode = hashCode * 8191 + ((runAsync) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetGetDirectResults()) ? 131071 : 524287);
if (isSetGetDirectResults()) hashCode = hashCode * 8191 + getDirectResults.hashCode();
hashCode = hashCode * 8191 + ((isSetQueryTimeout()) ? 131071 : 524287);
if (isSetQueryTimeout())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(queryTimeout);
hashCode = hashCode * 8191 + ((isSetCanReadArrowResult()) ? 131071 : 524287);
if (isSetCanReadArrowResult())
hashCode = hashCode * 8191 + ((canReadArrowResult) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetCanDownloadResult()) ? 131071 : 524287);
if (isSetCanDownloadResult())
hashCode = hashCode * 8191 + ((canDownloadResult) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetCanDecompressLZ4Result()) ? 131071 : 524287);
if (isSetCanDecompressLZ4Result())
hashCode = hashCode * 8191 + ((canDecompressLZ4Result) ? 131071 : 524287);
hashCode = hashCode * 8191 + ((isSetMaxBytesPerFile()) ? 131071 : 524287);
if (isSetMaxBytesPerFile())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(maxBytesPerFile);
hashCode = hashCode * 8191 + ((isSetUseArrowNativeTypes()) ? 131071 : 524287);
if (isSetUseArrowNativeTypes()) hashCode = hashCode * 8191 + useArrowNativeTypes.hashCode();
hashCode = hashCode * 8191 + ((isSetResultRowLimit()) ? 131071 : 524287);
if (isSetResultRowLimit())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(resultRowLimit);
hashCode = hashCode * 8191 + ((isSetParameters()) ? 131071 : 524287);
if (isSetParameters()) hashCode = hashCode * 8191 + parameters.hashCode();
hashCode = hashCode * 8191 + ((isSetMaxBytesPerBatch()) ? 131071 : 524287);
if (isSetMaxBytesPerBatch())
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(maxBytesPerBatch);
hashCode = hashCode * 8191 + ((isSetStatementConf()) ? 131071 : 524287);
if (isSetStatementConf()) hashCode = hashCode * 8191 + statementConf.hashCode();
hashCode = hashCode * 8191 + ((isSetResultPersistenceMode()) ? 131071 : 524287);
if (isSetResultPersistenceMode()) hashCode = hashCode * 8191 + resultPersistenceMode.getValue();
hashCode = hashCode * 8191 + ((isSetEnforceResultPersistenceMode()) ? 131071 : 524287);
if (isSetEnforceResultPersistenceMode())
hashCode = hashCode * 8191 + ((enforceResultPersistenceMode) ? 131071 : 524287);
return hashCode;
}
@Override
public int compareTo(TExecuteStatementReq other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetSessionHandle(), other.isSetSessionHandle());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSessionHandle()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStatement(), other.isSetStatement());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatement()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statement, other.statement);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetConfOverlay(), other.isSetConfOverlay());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetConfOverlay()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.confOverlay, other.confOverlay);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetRunAsync(), other.isSetRunAsync());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetRunAsync()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runAsync, other.runAsync);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetGetDirectResults(), other.isSetGetDirectResults());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetGetDirectResults()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.getDirectResults, other.getDirectResults);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetQueryTimeout(), other.isSetQueryTimeout());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetQueryTimeout()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.queryTimeout, other.queryTimeout);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetCanReadArrowResult(), other.isSetCanReadArrowResult());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCanReadArrowResult()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(
this.canReadArrowResult, other.canReadArrowResult);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetCanDownloadResult(), other.isSetCanDownloadResult());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCanDownloadResult()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.canDownloadResult, other.canDownloadResult);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(
isSetCanDecompressLZ4Result(), other.isSetCanDecompressLZ4Result());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCanDecompressLZ4Result()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(
this.canDecompressLZ4Result, other.canDecompressLZ4Result);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetMaxBytesPerFile(), other.isSetMaxBytesPerFile());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMaxBytesPerFile()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.maxBytesPerFile, other.maxBytesPerFile);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetUseArrowNativeTypes(), other.isSetUseArrowNativeTypes());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUseArrowNativeTypes()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(
this.useArrowNativeTypes, other.useArrowNativeTypes);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetResultRowLimit(), other.isSetResultRowLimit());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetResultRowLimit()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.resultRowLimit, other.resultRowLimit);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetParameters(), other.isSetParameters());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetParameters()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parameters, other.parameters);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetMaxBytesPerBatch(), other.isSetMaxBytesPerBatch());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMaxBytesPerBatch()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.maxBytesPerBatch, other.maxBytesPerBatch);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetStatementConf(), other.isSetStatementConf());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetStatementConf()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(this.statementConf, other.statementConf);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(isSetResultPersistenceMode(), other.isSetResultPersistenceMode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetResultPersistenceMode()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(
this.resultPersistenceMode, other.resultPersistenceMode);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison =
java.lang.Boolean.compare(
isSetEnforceResultPersistenceMode(), other.isSetEnforceResultPersistenceMode());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEnforceResultPersistenceMode()) {
lastComparison =
org.apache.thrift.TBaseHelper.compareTo(
this.enforceResultPersistenceMode, other.enforceResultPersistenceMode);
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("TExecuteStatementReq(");
boolean first = true;
sb.append("sessionHandle:");
if (this.sessionHandle == null) {
sb.append("null");
} else {
sb.append(this.sessionHandle);
}
first = false;
if (!first) sb.append(", ");
sb.append("statement:");
if (this.statement == null) {
sb.append("null");
} else {
sb.append(this.statement);
}
first = false;
if (isSetConfOverlay()) {
if (!first) sb.append(", ");
sb.append("confOverlay:");
if (this.confOverlay == null) {
sb.append("null");
} else {
sb.append(this.confOverlay);
}
first = false;
}
if (isSetRunAsync()) {
if (!first) sb.append(", ");
sb.append("runAsync:");
sb.append(this.runAsync);
first = false;
}
if (isSetGetDirectResults()) {
if (!first) sb.append(", ");
sb.append("getDirectResults:");
if (this.getDirectResults == null) {
sb.append("null");
} else {
sb.append(this.getDirectResults);
}
first = false;
}
if (isSetQueryTimeout()) {
if (!first) sb.append(", ");
sb.append("queryTimeout:");
sb.append(this.queryTimeout);
first = false;
}
if (isSetCanReadArrowResult()) {
if (!first) sb.append(", ");
sb.append("canReadArrowResult:");
sb.append(this.canReadArrowResult);
first = false;
}
if (isSetCanDownloadResult()) {
if (!first) sb.append(", ");
sb.append("canDownloadResult:");
sb.append(this.canDownloadResult);
first = false;
}
if (isSetCanDecompressLZ4Result()) {
if (!first) sb.append(", ");
sb.append("canDecompressLZ4Result:");
sb.append(this.canDecompressLZ4Result);
first = false;
}
if (isSetMaxBytesPerFile()) {
if (!first) sb.append(", ");
sb.append("maxBytesPerFile:");
sb.append(this.maxBytesPerFile);
first = false;
}
if (isSetUseArrowNativeTypes()) {
if (!first) sb.append(", ");
sb.append("useArrowNativeTypes:");
if (this.useArrowNativeTypes == null) {
sb.append("null");
} else {
sb.append(this.useArrowNativeTypes);
}
first = false;
}
if (isSetResultRowLimit()) {
if (!first) sb.append(", ");
sb.append("resultRowLimit:");
sb.append(this.resultRowLimit);
first = false;
}
if (isSetParameters()) {
if (!first) sb.append(", ");
sb.append("parameters:");
if (this.parameters == null) {
sb.append("null");
} else {
sb.append(this.parameters);
}
first = false;
}
if (isSetMaxBytesPerBatch()) {
if (!first) sb.append(", ");
sb.append("maxBytesPerBatch:");
sb.append(this.maxBytesPerBatch);
first = false;
}
if (isSetStatementConf()) {
if (!first) sb.append(", ");
sb.append("statementConf:");
if (this.statementConf == null) {
sb.append("null");
} else {
sb.append(this.statementConf);
}
first = false;
}
if (isSetResultPersistenceMode()) {
if (!first) sb.append(", ");
sb.append("resultPersistenceMode:");
if (this.resultPersistenceMode == null) {
sb.append("null");
} else {
sb.append(this.resultPersistenceMode);
}
first = false;
}
if (isSetEnforceResultPersistenceMode()) {
if (!first) sb.append(", ");
sb.append("enforceResultPersistenceMode:");
sb.append(this.enforceResultPersistenceMode);
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
if (sessionHandle == null) {
throw new org.apache.thrift.protocol.TProtocolException(
"Required field 'sessionHandle' was not present! Struct: " + toString());
}
if (statement == null) {
throw new org.apache.thrift.protocol.TProtocolException(
"Required field 'statement' was not present! Struct: " + toString());
}
// check for sub-struct validity
if (sessionHandle != null) {
sessionHandle.validate();
}
if (getDirectResults != null) {
getDirectResults.validate();
}
if (useArrowNativeTypes != null) {
useArrowNativeTypes.validate();
}
if (statementConf != null) {
statementConf.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 TExecuteStatementReqStandardSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TExecuteStatementReqStandardScheme getScheme() {
return new TExecuteStatementReqStandardScheme();
}
}
private static class TExecuteStatementReqStandardScheme
extends org.apache.thrift.scheme.StandardScheme {
@Override
public void read(org.apache.thrift.protocol.TProtocol iprot, TExecuteStatementReq 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: // SESSION_HANDLE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.sessionHandle = new TSessionHandle();
struct.sessionHandle.read(iprot);
struct.setSessionHandleIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // STATEMENT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.statement = iprot.readString();
struct.setStatementIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // CONF_OVERLAY
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map278 = iprot.readMapBegin();
struct.confOverlay =
new java.util.HashMap(2 * _map278.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key279;
@org.apache.thrift.annotation.Nullable java.lang.String _val280;
for (int _i281 = 0; _i281 < _map278.size; ++_i281) {
_key279 = iprot.readString();
_val280 = iprot.readString();
struct.confOverlay.put(_key279, _val280);
}
iprot.readMapEnd();
}
struct.setConfOverlayIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // RUN_ASYNC
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.runAsync = iprot.readBool();
struct.setRunAsyncIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1281: // GET_DIRECT_RESULTS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.getDirectResults = new TSparkGetDirectResults();
struct.getDirectResults.read(iprot);
struct.setGetDirectResultsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // QUERY_TIMEOUT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.queryTimeout = iprot.readI64();
struct.setQueryTimeoutIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1282: // CAN_READ_ARROW_RESULT
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.canReadArrowResult = iprot.readBool();
struct.setCanReadArrowResultIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1283: // CAN_DOWNLOAD_RESULT
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.canDownloadResult = iprot.readBool();
struct.setCanDownloadResultIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1284: // CAN_DECOMPRESS_LZ4_RESULT
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.canDecompressLZ4Result = iprot.readBool();
struct.setCanDecompressLZ4ResultIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1285: // MAX_BYTES_PER_FILE
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.maxBytesPerFile = iprot.readI64();
struct.setMaxBytesPerFileIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1286: // USE_ARROW_NATIVE_TYPES
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.useArrowNativeTypes = new TSparkArrowTypes();
struct.useArrowNativeTypes.read(iprot);
struct.setUseArrowNativeTypesIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1287: // RESULT_ROW_LIMIT
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.resultRowLimit = iprot.readI64();
struct.setResultRowLimitIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1288: // PARAMETERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list282 = iprot.readListBegin();
struct.parameters = new java.util.ArrayList(_list282.size);
@org.apache.thrift.annotation.Nullable TSparkParameter _elem283;
for (int _i284 = 0; _i284 < _list282.size; ++_i284) {
_elem283 = new TSparkParameter();
_elem283.read(iprot);
struct.parameters.add(_elem283);
}
iprot.readListEnd();
}
struct.setParametersIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1289: // MAX_BYTES_PER_BATCH
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.maxBytesPerBatch = iprot.readI64();
struct.setMaxBytesPerBatchIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1296: // STATEMENT_CONF
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.statementConf = new TStatementConf();
struct.statementConf.read(iprot);
struct.setStatementConfIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3335: // RESULT_PERSISTENCE_MODE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.resultPersistenceMode =
com.databricks.jdbc.client.impl.thrift.generated.TResultPersistenceMode
.findByValue(iprot.readI32());
struct.setResultPersistenceModeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3344: // ENFORCE_RESULT_PERSISTENCE_MODE
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.enforceResultPersistenceMode = iprot.readBool();
struct.setEnforceResultPersistenceModeIsSet(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, TExecuteStatementReq struct)
throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.sessionHandle != null) {
oprot.writeFieldBegin(SESSION_HANDLE_FIELD_DESC);
struct.sessionHandle.write(oprot);
oprot.writeFieldEnd();
}
if (struct.statement != null) {
oprot.writeFieldBegin(STATEMENT_FIELD_DESC);
oprot.writeString(struct.statement);
oprot.writeFieldEnd();
}
if (struct.confOverlay != null) {
if (struct.isSetConfOverlay()) {
oprot.writeFieldBegin(CONF_OVERLAY_FIELD_DESC);
{
oprot.writeMapBegin(
new org.apache.thrift.protocol.TMap(
org.apache.thrift.protocol.TType.STRING,
org.apache.thrift.protocol.TType.STRING,
struct.confOverlay.size()));
for (java.util.Map.Entry _iter285 :
struct.confOverlay.entrySet()) {
oprot.writeString(_iter285.getKey());
oprot.writeString(_iter285.getValue());
}
oprot.writeMapEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetRunAsync()) {
oprot.writeFieldBegin(RUN_ASYNC_FIELD_DESC);
oprot.writeBool(struct.runAsync);
oprot.writeFieldEnd();
}
if (struct.isSetQueryTimeout()) {
oprot.writeFieldBegin(QUERY_TIMEOUT_FIELD_DESC);
oprot.writeI64(struct.queryTimeout);
oprot.writeFieldEnd();
}
if (struct.getDirectResults != null) {
if (struct.isSetGetDirectResults()) {
oprot.writeFieldBegin(GET_DIRECT_RESULTS_FIELD_DESC);
struct.getDirectResults.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.isSetCanReadArrowResult()) {
oprot.writeFieldBegin(CAN_READ_ARROW_RESULT_FIELD_DESC);
oprot.writeBool(struct.canReadArrowResult);
oprot.writeFieldEnd();
}
if (struct.isSetCanDownloadResult()) {
oprot.writeFieldBegin(CAN_DOWNLOAD_RESULT_FIELD_DESC);
oprot.writeBool(struct.canDownloadResult);
oprot.writeFieldEnd();
}
if (struct.isSetCanDecompressLZ4Result()) {
oprot.writeFieldBegin(CAN_DECOMPRESS_LZ4_RESULT_FIELD_DESC);
oprot.writeBool(struct.canDecompressLZ4Result);
oprot.writeFieldEnd();
}
if (struct.isSetMaxBytesPerFile()) {
oprot.writeFieldBegin(MAX_BYTES_PER_FILE_FIELD_DESC);
oprot.writeI64(struct.maxBytesPerFile);
oprot.writeFieldEnd();
}
if (struct.useArrowNativeTypes != null) {
if (struct.isSetUseArrowNativeTypes()) {
oprot.writeFieldBegin(USE_ARROW_NATIVE_TYPES_FIELD_DESC);
struct.useArrowNativeTypes.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.isSetResultRowLimit()) {
oprot.writeFieldBegin(RESULT_ROW_LIMIT_FIELD_DESC);
oprot.writeI64(struct.resultRowLimit);
oprot.writeFieldEnd();
}
if (struct.parameters != null) {
if (struct.isSetParameters()) {
oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
{
oprot.writeListBegin(
new org.apache.thrift.protocol.TList(
org.apache.thrift.protocol.TType.STRUCT, struct.parameters.size()));
for (TSparkParameter _iter286 : struct.parameters) {
_iter286.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
}
if (struct.isSetMaxBytesPerBatch()) {
oprot.writeFieldBegin(MAX_BYTES_PER_BATCH_FIELD_DESC);
oprot.writeI64(struct.maxBytesPerBatch);
oprot.writeFieldEnd();
}
if (struct.statementConf != null) {
if (struct.isSetStatementConf()) {
oprot.writeFieldBegin(STATEMENT_CONF_FIELD_DESC);
struct.statementConf.write(oprot);
oprot.writeFieldEnd();
}
}
if (struct.resultPersistenceMode != null) {
if (struct.isSetResultPersistenceMode()) {
oprot.writeFieldBegin(RESULT_PERSISTENCE_MODE_FIELD_DESC);
oprot.writeI32(struct.resultPersistenceMode.getValue());
oprot.writeFieldEnd();
}
}
if (struct.isSetEnforceResultPersistenceMode()) {
oprot.writeFieldBegin(ENFORCE_RESULT_PERSISTENCE_MODE_FIELD_DESC);
oprot.writeBool(struct.enforceResultPersistenceMode);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class TExecuteStatementReqTupleSchemeFactory
implements org.apache.thrift.scheme.SchemeFactory {
@Override
public TExecuteStatementReqTupleScheme getScheme() {
return new TExecuteStatementReqTupleScheme();
}
}
private static class TExecuteStatementReqTupleScheme
extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TExecuteStatementReq struct)
throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
struct.sessionHandle.write(oprot);
oprot.writeString(struct.statement);
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetConfOverlay()) {
optionals.set(0);
}
if (struct.isSetRunAsync()) {
optionals.set(1);
}
if (struct.isSetGetDirectResults()) {
optionals.set(2);
}
if (struct.isSetQueryTimeout()) {
optionals.set(3);
}
if (struct.isSetCanReadArrowResult()) {
optionals.set(4);
}
if (struct.isSetCanDownloadResult()) {
optionals.set(5);
}
if (struct.isSetCanDecompressLZ4Result()) {
optionals.set(6);
}
if (struct.isSetMaxBytesPerFile()) {
optionals.set(7);
}
if (struct.isSetUseArrowNativeTypes()) {
optionals.set(8);
}
if (struct.isSetResultRowLimit()) {
optionals.set(9);
}
if (struct.isSetParameters()) {
optionals.set(10);
}
if (struct.isSetMaxBytesPerBatch()) {
optionals.set(11);
}
if (struct.isSetStatementConf()) {
optionals.set(12);
}
if (struct.isSetResultPersistenceMode()) {
optionals.set(13);
}
if (struct.isSetEnforceResultPersistenceMode()) {
optionals.set(14);
}
oprot.writeBitSet(optionals, 15);
if (struct.isSetConfOverlay()) {
{
oprot.writeI32(struct.confOverlay.size());
for (java.util.Map.Entry _iter287 :
struct.confOverlay.entrySet()) {
oprot.writeString(_iter287.getKey());
oprot.writeString(_iter287.getValue());
}
}
}
if (struct.isSetRunAsync()) {
oprot.writeBool(struct.runAsync);
}
if (struct.isSetGetDirectResults()) {
struct.getDirectResults.write(oprot);
}
if (struct.isSetQueryTimeout()) {
oprot.writeI64(struct.queryTimeout);
}
if (struct.isSetCanReadArrowResult()) {
oprot.writeBool(struct.canReadArrowResult);
}
if (struct.isSetCanDownloadResult()) {
oprot.writeBool(struct.canDownloadResult);
}
if (struct.isSetCanDecompressLZ4Result()) {
oprot.writeBool(struct.canDecompressLZ4Result);
}
if (struct.isSetMaxBytesPerFile()) {
oprot.writeI64(struct.maxBytesPerFile);
}
if (struct.isSetUseArrowNativeTypes()) {
struct.useArrowNativeTypes.write(oprot);
}
if (struct.isSetResultRowLimit()) {
oprot.writeI64(struct.resultRowLimit);
}
if (struct.isSetParameters()) {
{
oprot.writeI32(struct.parameters.size());
for (TSparkParameter _iter288 : struct.parameters) {
_iter288.write(oprot);
}
}
}
if (struct.isSetMaxBytesPerBatch()) {
oprot.writeI64(struct.maxBytesPerBatch);
}
if (struct.isSetStatementConf()) {
struct.statementConf.write(oprot);
}
if (struct.isSetResultPersistenceMode()) {
oprot.writeI32(struct.resultPersistenceMode.getValue());
}
if (struct.isSetEnforceResultPersistenceMode()) {
oprot.writeBool(struct.enforceResultPersistenceMode);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TExecuteStatementReq struct)
throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
struct.sessionHandle = new TSessionHandle();
struct.sessionHandle.read(iprot);
struct.setSessionHandleIsSet(true);
struct.statement = iprot.readString();
struct.setStatementIsSet(true);
java.util.BitSet incoming = iprot.readBitSet(15);
if (incoming.get(0)) {
{
org.apache.thrift.protocol.TMap _map289 =
iprot.readMapBegin(
org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.confOverlay =
new java.util.HashMap(2 * _map289.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key290;
@org.apache.thrift.annotation.Nullable java.lang.String _val291;
for (int _i292 = 0; _i292 < _map289.size; ++_i292) {
_key290 = iprot.readString();
_val291 = iprot.readString();
struct.confOverlay.put(_key290, _val291);
}
}
struct.setConfOverlayIsSet(true);
}
if (incoming.get(1)) {
struct.runAsync = iprot.readBool();
struct.setRunAsyncIsSet(true);
}
if (incoming.get(2)) {
struct.getDirectResults = new TSparkGetDirectResults();
struct.getDirectResults.read(iprot);
struct.setGetDirectResultsIsSet(true);
}
if (incoming.get(3)) {
struct.queryTimeout = iprot.readI64();
struct.setQueryTimeoutIsSet(true);
}
if (incoming.get(4)) {
struct.canReadArrowResult = iprot.readBool();
struct.setCanReadArrowResultIsSet(true);
}
if (incoming.get(5)) {
struct.canDownloadResult = iprot.readBool();
struct.setCanDownloadResultIsSet(true);
}
if (incoming.get(6)) {
struct.canDecompressLZ4Result = iprot.readBool();
struct.setCanDecompressLZ4ResultIsSet(true);
}
if (incoming.get(7)) {
struct.maxBytesPerFile = iprot.readI64();
struct.setMaxBytesPerFileIsSet(true);
}
if (incoming.get(8)) {
struct.useArrowNativeTypes = new TSparkArrowTypes();
struct.useArrowNativeTypes.read(iprot);
struct.setUseArrowNativeTypesIsSet(true);
}
if (incoming.get(9)) {
struct.resultRowLimit = iprot.readI64();
struct.setResultRowLimitIsSet(true);
}
if (incoming.get(10)) {
{
org.apache.thrift.protocol.TList _list293 =
iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
struct.parameters = new java.util.ArrayList(_list293.size);
@org.apache.thrift.annotation.Nullable TSparkParameter _elem294;
for (int _i295 = 0; _i295 < _list293.size; ++_i295) {
_elem294 = new TSparkParameter();
_elem294.read(iprot);
struct.parameters.add(_elem294);
}
}
struct.setParametersIsSet(true);
}
if (incoming.get(11)) {
struct.maxBytesPerBatch = iprot.readI64();
struct.setMaxBytesPerBatchIsSet(true);
}
if (incoming.get(12)) {
struct.statementConf = new TStatementConf();
struct.statementConf.read(iprot);
struct.setStatementConfIsSet(true);
}
if (incoming.get(13)) {
struct.resultPersistenceMode =
com.databricks.jdbc.client.impl.thrift.generated.TResultPersistenceMode.findByValue(
iprot.readI32());
struct.setResultPersistenceModeIsSet(true);
}
if (incoming.get(14)) {
struct.enforceResultPersistenceMode = iprot.readBool();
struct.setEnforceResultPersistenceModeIsSet(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();
}
}