0001
0002
0003
0004
0005
0006
0007 package org.apache.hive.service.rpc.thrift;
0008
0009 import org.apache.thrift.scheme.IScheme;
0010 import org.apache.thrift.scheme.SchemeFactory;
0011 import org.apache.thrift.scheme.StandardScheme;
0012
0013 import org.apache.thrift.scheme.TupleScheme;
0014 import org.apache.thrift.protocol.TTupleProtocol;
0015 import org.apache.thrift.protocol.TProtocolException;
0016 import org.apache.thrift.EncodingUtils;
0017 import org.apache.thrift.TException;
0018 import org.apache.thrift.async.AsyncMethodCallback;
0019 import org.apache.thrift.server.AbstractNonblockingServer.*;
0020 import java.util.List;
0021 import java.util.ArrayList;
0022 import java.util.Map;
0023 import java.util.HashMap;
0024 import java.util.EnumMap;
0025 import java.util.Set;
0026 import java.util.HashSet;
0027 import java.util.EnumSet;
0028 import java.util.Collections;
0029 import java.util.BitSet;
0030 import java.nio.ByteBuffer;
0031 import java.util.Arrays;
0032 import javax.annotation.Generated;
0033 import org.slf4j.Logger;
0034 import org.slf4j.LoggerFactory;
0035
0036 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
0037 @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
0038 public class TGetFunctionsReq implements org.apache.thrift.TBase<TGetFunctionsReq, TGetFunctionsReq._Fields>, java.io.Serializable, Cloneable, Comparable<TGetFunctionsReq> {
0039 private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetFunctionsReq");
0040
0041 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);
0042 private static final org.apache.thrift.protocol.TField CATALOG_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catalogName", org.apache.thrift.protocol.TType.STRING, (short)2);
0043 private static final org.apache.thrift.protocol.TField SCHEMA_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("schemaName", org.apache.thrift.protocol.TType.STRING, (short)3);
0044 private static final org.apache.thrift.protocol.TField FUNCTION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("functionName", org.apache.thrift.protocol.TType.STRING, (short)4);
0045
0046 private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
0047 static {
0048 schemes.put(StandardScheme.class, new TGetFunctionsReqStandardSchemeFactory());
0049 schemes.put(TupleScheme.class, new TGetFunctionsReqTupleSchemeFactory());
0050 }
0051
0052 private TSessionHandle sessionHandle;
0053 private String catalogName;
0054 private String schemaName;
0055 private String functionName;
0056
0057
0058 public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0059 SESSION_HANDLE((short)1, "sessionHandle"),
0060 CATALOG_NAME((short)2, "catalogName"),
0061 SCHEMA_NAME((short)3, "schemaName"),
0062 FUNCTION_NAME((short)4, "functionName");
0063
0064 private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
0065
0066 static {
0067 for (_Fields field : EnumSet.allOf(_Fields.class)) {
0068 byName.put(field.getFieldName(), field);
0069 }
0070 }
0071
0072
0073
0074
0075 public static _Fields findByThriftId(int fieldId) {
0076 switch(fieldId) {
0077 case 1:
0078 return SESSION_HANDLE;
0079 case 2:
0080 return CATALOG_NAME;
0081 case 3:
0082 return SCHEMA_NAME;
0083 case 4:
0084 return FUNCTION_NAME;
0085 default:
0086 return null;
0087 }
0088 }
0089
0090
0091
0092
0093
0094 public static _Fields findByThriftIdOrThrow(int fieldId) {
0095 _Fields fields = findByThriftId(fieldId);
0096 if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
0097 return fields;
0098 }
0099
0100
0101
0102
0103 public static _Fields findByName(String name) {
0104 return byName.get(name);
0105 }
0106
0107 private final short _thriftId;
0108 private final String _fieldName;
0109
0110 _Fields(short thriftId, String fieldName) {
0111 _thriftId = thriftId;
0112 _fieldName = fieldName;
0113 }
0114
0115 public short getThriftFieldId() {
0116 return _thriftId;
0117 }
0118
0119 public String getFieldName() {
0120 return _fieldName;
0121 }
0122 }
0123
0124
0125 private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME};
0126 public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
0127 static {
0128 Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
0129 tmpMap.put(_Fields.SESSION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("sessionHandle", org.apache.thrift.TFieldRequirementType.REQUIRED,
0130 new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSessionHandle.class)));
0131 tmpMap.put(_Fields.CATALOG_NAME, new org.apache.thrift.meta_data.FieldMetaData("catalogName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
0132 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TIdentifier")));
0133 tmpMap.put(_Fields.SCHEMA_NAME, new org.apache.thrift.meta_data.FieldMetaData("schemaName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
0134 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TPatternOrIdentifier")));
0135 tmpMap.put(_Fields.FUNCTION_NAME, new org.apache.thrift.meta_data.FieldMetaData("functionName", org.apache.thrift.TFieldRequirementType.REQUIRED,
0136 new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "TPatternOrIdentifier")));
0137 metaDataMap = Collections.unmodifiableMap(tmpMap);
0138 org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetFunctionsReq.class, metaDataMap);
0139 }
0140
0141 public TGetFunctionsReq() {
0142 }
0143
0144 public TGetFunctionsReq(
0145 TSessionHandle sessionHandle,
0146 String functionName)
0147 {
0148 this();
0149 this.sessionHandle = sessionHandle;
0150 this.functionName = functionName;
0151 }
0152
0153
0154
0155
0156 public TGetFunctionsReq(TGetFunctionsReq other) {
0157 if (other.isSetSessionHandle()) {
0158 this.sessionHandle = new TSessionHandle(other.sessionHandle);
0159 }
0160 if (other.isSetCatalogName()) {
0161 this.catalogName = other.catalogName;
0162 }
0163 if (other.isSetSchemaName()) {
0164 this.schemaName = other.schemaName;
0165 }
0166 if (other.isSetFunctionName()) {
0167 this.functionName = other.functionName;
0168 }
0169 }
0170
0171 public TGetFunctionsReq deepCopy() {
0172 return new TGetFunctionsReq(this);
0173 }
0174
0175 @Override
0176 public void clear() {
0177 this.sessionHandle = null;
0178 this.catalogName = null;
0179 this.schemaName = null;
0180 this.functionName = null;
0181 }
0182
0183 public TSessionHandle getSessionHandle() {
0184 return this.sessionHandle;
0185 }
0186
0187 public void setSessionHandle(TSessionHandle sessionHandle) {
0188 this.sessionHandle = sessionHandle;
0189 }
0190
0191 public void unsetSessionHandle() {
0192 this.sessionHandle = null;
0193 }
0194
0195
0196 public boolean isSetSessionHandle() {
0197 return this.sessionHandle != null;
0198 }
0199
0200 public void setSessionHandleIsSet(boolean value) {
0201 if (!value) {
0202 this.sessionHandle = null;
0203 }
0204 }
0205
0206 public String getCatalogName() {
0207 return this.catalogName;
0208 }
0209
0210 public void setCatalogName(String catalogName) {
0211 this.catalogName = catalogName;
0212 }
0213
0214 public void unsetCatalogName() {
0215 this.catalogName = null;
0216 }
0217
0218
0219 public boolean isSetCatalogName() {
0220 return this.catalogName != null;
0221 }
0222
0223 public void setCatalogNameIsSet(boolean value) {
0224 if (!value) {
0225 this.catalogName = null;
0226 }
0227 }
0228
0229 public String getSchemaName() {
0230 return this.schemaName;
0231 }
0232
0233 public void setSchemaName(String schemaName) {
0234 this.schemaName = schemaName;
0235 }
0236
0237 public void unsetSchemaName() {
0238 this.schemaName = null;
0239 }
0240
0241
0242 public boolean isSetSchemaName() {
0243 return this.schemaName != null;
0244 }
0245
0246 public void setSchemaNameIsSet(boolean value) {
0247 if (!value) {
0248 this.schemaName = null;
0249 }
0250 }
0251
0252 public String getFunctionName() {
0253 return this.functionName;
0254 }
0255
0256 public void setFunctionName(String functionName) {
0257 this.functionName = functionName;
0258 }
0259
0260 public void unsetFunctionName() {
0261 this.functionName = null;
0262 }
0263
0264
0265 public boolean isSetFunctionName() {
0266 return this.functionName != null;
0267 }
0268
0269 public void setFunctionNameIsSet(boolean value) {
0270 if (!value) {
0271 this.functionName = null;
0272 }
0273 }
0274
0275 public void setFieldValue(_Fields field, Object value) {
0276 switch (field) {
0277 case SESSION_HANDLE:
0278 if (value == null) {
0279 unsetSessionHandle();
0280 } else {
0281 setSessionHandle((TSessionHandle)value);
0282 }
0283 break;
0284
0285 case CATALOG_NAME:
0286 if (value == null) {
0287 unsetCatalogName();
0288 } else {
0289 setCatalogName((String)value);
0290 }
0291 break;
0292
0293 case SCHEMA_NAME:
0294 if (value == null) {
0295 unsetSchemaName();
0296 } else {
0297 setSchemaName((String)value);
0298 }
0299 break;
0300
0301 case FUNCTION_NAME:
0302 if (value == null) {
0303 unsetFunctionName();
0304 } else {
0305 setFunctionName((String)value);
0306 }
0307 break;
0308
0309 }
0310 }
0311
0312 public Object getFieldValue(_Fields field) {
0313 switch (field) {
0314 case SESSION_HANDLE:
0315 return getSessionHandle();
0316
0317 case CATALOG_NAME:
0318 return getCatalogName();
0319
0320 case SCHEMA_NAME:
0321 return getSchemaName();
0322
0323 case FUNCTION_NAME:
0324 return getFunctionName();
0325
0326 }
0327 throw new IllegalStateException();
0328 }
0329
0330
0331 public boolean isSet(_Fields field) {
0332 if (field == null) {
0333 throw new IllegalArgumentException();
0334 }
0335
0336 switch (field) {
0337 case SESSION_HANDLE:
0338 return isSetSessionHandle();
0339 case CATALOG_NAME:
0340 return isSetCatalogName();
0341 case SCHEMA_NAME:
0342 return isSetSchemaName();
0343 case FUNCTION_NAME:
0344 return isSetFunctionName();
0345 }
0346 throw new IllegalStateException();
0347 }
0348
0349 @Override
0350 public boolean equals(Object that) {
0351 if (that == null)
0352 return false;
0353 if (that instanceof TGetFunctionsReq)
0354 return this.equals((TGetFunctionsReq)that);
0355 return false;
0356 }
0357
0358 public boolean equals(TGetFunctionsReq that) {
0359 if (that == null)
0360 return false;
0361
0362 boolean this_present_sessionHandle = true && this.isSetSessionHandle();
0363 boolean that_present_sessionHandle = true && that.isSetSessionHandle();
0364 if (this_present_sessionHandle || that_present_sessionHandle) {
0365 if (!(this_present_sessionHandle && that_present_sessionHandle))
0366 return false;
0367 if (!this.sessionHandle.equals(that.sessionHandle))
0368 return false;
0369 }
0370
0371 boolean this_present_catalogName = true && this.isSetCatalogName();
0372 boolean that_present_catalogName = true && that.isSetCatalogName();
0373 if (this_present_catalogName || that_present_catalogName) {
0374 if (!(this_present_catalogName && that_present_catalogName))
0375 return false;
0376 if (!this.catalogName.equals(that.catalogName))
0377 return false;
0378 }
0379
0380 boolean this_present_schemaName = true && this.isSetSchemaName();
0381 boolean that_present_schemaName = true && that.isSetSchemaName();
0382 if (this_present_schemaName || that_present_schemaName) {
0383 if (!(this_present_schemaName && that_present_schemaName))
0384 return false;
0385 if (!this.schemaName.equals(that.schemaName))
0386 return false;
0387 }
0388
0389 boolean this_present_functionName = true && this.isSetFunctionName();
0390 boolean that_present_functionName = true && that.isSetFunctionName();
0391 if (this_present_functionName || that_present_functionName) {
0392 if (!(this_present_functionName && that_present_functionName))
0393 return false;
0394 if (!this.functionName.equals(that.functionName))
0395 return false;
0396 }
0397
0398 return true;
0399 }
0400
0401 @Override
0402 public int hashCode() {
0403 List<Object> list = new ArrayList<Object>();
0404
0405 boolean present_sessionHandle = true && (isSetSessionHandle());
0406 list.add(present_sessionHandle);
0407 if (present_sessionHandle)
0408 list.add(sessionHandle);
0409
0410 boolean present_catalogName = true && (isSetCatalogName());
0411 list.add(present_catalogName);
0412 if (present_catalogName)
0413 list.add(catalogName);
0414
0415 boolean present_schemaName = true && (isSetSchemaName());
0416 list.add(present_schemaName);
0417 if (present_schemaName)
0418 list.add(schemaName);
0419
0420 boolean present_functionName = true && (isSetFunctionName());
0421 list.add(present_functionName);
0422 if (present_functionName)
0423 list.add(functionName);
0424
0425 return list.hashCode();
0426 }
0427
0428 @Override
0429 public int compareTo(TGetFunctionsReq other) {
0430 if (!getClass().equals(other.getClass())) {
0431 return getClass().getName().compareTo(other.getClass().getName());
0432 }
0433
0434 int lastComparison = 0;
0435
0436 lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle());
0437 if (lastComparison != 0) {
0438 return lastComparison;
0439 }
0440 if (isSetSessionHandle()) {
0441 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle);
0442 if (lastComparison != 0) {
0443 return lastComparison;
0444 }
0445 }
0446 lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName());
0447 if (lastComparison != 0) {
0448 return lastComparison;
0449 }
0450 if (isSetCatalogName()) {
0451 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName);
0452 if (lastComparison != 0) {
0453 return lastComparison;
0454 }
0455 }
0456 lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName());
0457 if (lastComparison != 0) {
0458 return lastComparison;
0459 }
0460 if (isSetSchemaName()) {
0461 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName);
0462 if (lastComparison != 0) {
0463 return lastComparison;
0464 }
0465 }
0466 lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(other.isSetFunctionName());
0467 if (lastComparison != 0) {
0468 return lastComparison;
0469 }
0470 if (isSetFunctionName()) {
0471 lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, other.functionName);
0472 if (lastComparison != 0) {
0473 return lastComparison;
0474 }
0475 }
0476 return 0;
0477 }
0478
0479 public _Fields fieldForId(int fieldId) {
0480 return _Fields.findByThriftId(fieldId);
0481 }
0482
0483 public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
0484 schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
0485 }
0486
0487 public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
0488 schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
0489 }
0490
0491 @Override
0492 public String toString() {
0493 StringBuilder sb = new StringBuilder("TGetFunctionsReq(");
0494 boolean first = true;
0495
0496 sb.append("sessionHandle:");
0497 if (this.sessionHandle == null) {
0498 sb.append("null");
0499 } else {
0500 sb.append(this.sessionHandle);
0501 }
0502 first = false;
0503 if (isSetCatalogName()) {
0504 if (!first) sb.append(", ");
0505 sb.append("catalogName:");
0506 if (this.catalogName == null) {
0507 sb.append("null");
0508 } else {
0509 sb.append(this.catalogName);
0510 }
0511 first = false;
0512 }
0513 if (isSetSchemaName()) {
0514 if (!first) sb.append(", ");
0515 sb.append("schemaName:");
0516 if (this.schemaName == null) {
0517 sb.append("null");
0518 } else {
0519 sb.append(this.schemaName);
0520 }
0521 first = false;
0522 }
0523 if (!first) sb.append(", ");
0524 sb.append("functionName:");
0525 if (this.functionName == null) {
0526 sb.append("null");
0527 } else {
0528 sb.append(this.functionName);
0529 }
0530 first = false;
0531 sb.append(")");
0532 return sb.toString();
0533 }
0534
0535 public void validate() throws org.apache.thrift.TException {
0536
0537 if (!isSetSessionHandle()) {
0538 throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString());
0539 }
0540
0541 if (!isSetFunctionName()) {
0542 throw new org.apache.thrift.protocol.TProtocolException("Required field 'functionName' is unset! Struct:" + toString());
0543 }
0544
0545
0546 if (sessionHandle != null) {
0547 sessionHandle.validate();
0548 }
0549 }
0550
0551 private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
0552 try {
0553 write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
0554 } catch (org.apache.thrift.TException te) {
0555 throw new java.io.IOException(te);
0556 }
0557 }
0558
0559 private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
0560 try {
0561 read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
0562 } catch (org.apache.thrift.TException te) {
0563 throw new java.io.IOException(te);
0564 }
0565 }
0566
0567 private static class TGetFunctionsReqStandardSchemeFactory implements SchemeFactory {
0568 public TGetFunctionsReqStandardScheme getScheme() {
0569 return new TGetFunctionsReqStandardScheme();
0570 }
0571 }
0572
0573 private static class TGetFunctionsReqStandardScheme extends StandardScheme<TGetFunctionsReq> {
0574
0575 public void read(org.apache.thrift.protocol.TProtocol iprot, TGetFunctionsReq struct) throws org.apache.thrift.TException {
0576 org.apache.thrift.protocol.TField schemeField;
0577 iprot.readStructBegin();
0578 while (true)
0579 {
0580 schemeField = iprot.readFieldBegin();
0581 if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
0582 break;
0583 }
0584 switch (schemeField.id) {
0585 case 1:
0586 if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
0587 struct.sessionHandle = new TSessionHandle();
0588 struct.sessionHandle.read(iprot);
0589 struct.setSessionHandleIsSet(true);
0590 } else {
0591 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0592 }
0593 break;
0594 case 2:
0595 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0596 struct.catalogName = iprot.readString();
0597 struct.setCatalogNameIsSet(true);
0598 } else {
0599 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0600 }
0601 break;
0602 case 3:
0603 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0604 struct.schemaName = iprot.readString();
0605 struct.setSchemaNameIsSet(true);
0606 } else {
0607 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0608 }
0609 break;
0610 case 4:
0611 if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
0612 struct.functionName = iprot.readString();
0613 struct.setFunctionNameIsSet(true);
0614 } else {
0615 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0616 }
0617 break;
0618 default:
0619 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0620 }
0621 iprot.readFieldEnd();
0622 }
0623 iprot.readStructEnd();
0624 struct.validate();
0625 }
0626
0627 public void write(org.apache.thrift.protocol.TProtocol oprot, TGetFunctionsReq struct) throws org.apache.thrift.TException {
0628 struct.validate();
0629
0630 oprot.writeStructBegin(STRUCT_DESC);
0631 if (struct.sessionHandle != null) {
0632 oprot.writeFieldBegin(SESSION_HANDLE_FIELD_DESC);
0633 struct.sessionHandle.write(oprot);
0634 oprot.writeFieldEnd();
0635 }
0636 if (struct.catalogName != null) {
0637 if (struct.isSetCatalogName()) {
0638 oprot.writeFieldBegin(CATALOG_NAME_FIELD_DESC);
0639 oprot.writeString(struct.catalogName);
0640 oprot.writeFieldEnd();
0641 }
0642 }
0643 if (struct.schemaName != null) {
0644 if (struct.isSetSchemaName()) {
0645 oprot.writeFieldBegin(SCHEMA_NAME_FIELD_DESC);
0646 oprot.writeString(struct.schemaName);
0647 oprot.writeFieldEnd();
0648 }
0649 }
0650 if (struct.functionName != null) {
0651 oprot.writeFieldBegin(FUNCTION_NAME_FIELD_DESC);
0652 oprot.writeString(struct.functionName);
0653 oprot.writeFieldEnd();
0654 }
0655 oprot.writeFieldStop();
0656 oprot.writeStructEnd();
0657 }
0658
0659 }
0660
0661 private static class TGetFunctionsReqTupleSchemeFactory implements SchemeFactory {
0662 public TGetFunctionsReqTupleScheme getScheme() {
0663 return new TGetFunctionsReqTupleScheme();
0664 }
0665 }
0666
0667 private static class TGetFunctionsReqTupleScheme extends TupleScheme<TGetFunctionsReq> {
0668
0669 @Override
0670 public void write(org.apache.thrift.protocol.TProtocol prot, TGetFunctionsReq struct) throws org.apache.thrift.TException {
0671 TTupleProtocol oprot = (TTupleProtocol) prot;
0672 struct.sessionHandle.write(oprot);
0673 oprot.writeString(struct.functionName);
0674 BitSet optionals = new BitSet();
0675 if (struct.isSetCatalogName()) {
0676 optionals.set(0);
0677 }
0678 if (struct.isSetSchemaName()) {
0679 optionals.set(1);
0680 }
0681 oprot.writeBitSet(optionals, 2);
0682 if (struct.isSetCatalogName()) {
0683 oprot.writeString(struct.catalogName);
0684 }
0685 if (struct.isSetSchemaName()) {
0686 oprot.writeString(struct.schemaName);
0687 }
0688 }
0689
0690 @Override
0691 public void read(org.apache.thrift.protocol.TProtocol prot, TGetFunctionsReq struct) throws org.apache.thrift.TException {
0692 TTupleProtocol iprot = (TTupleProtocol) prot;
0693 struct.sessionHandle = new TSessionHandle();
0694 struct.sessionHandle.read(iprot);
0695 struct.setSessionHandleIsSet(true);
0696 struct.functionName = iprot.readString();
0697 struct.setFunctionNameIsSet(true);
0698 BitSet incoming = iprot.readBitSet(2);
0699 if (incoming.get(0)) {
0700 struct.catalogName = iprot.readString();
0701 struct.setCatalogNameIsSet(true);
0702 }
0703 if (incoming.get(1)) {
0704 struct.schemaName = iprot.readString();
0705 struct.setSchemaNameIsSet(true);
0706 }
0707 }
0708 }
0709
0710 }
0711