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