THiveSerDeProperties.java
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.doris.thrift;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.16.0)", date = "2026-05-14")
public class THiveSerDeProperties implements org.apache.thrift.TBase<THiveSerDeProperties, THiveSerDeProperties._Fields>, java.io.Serializable, Cloneable, Comparable<THiveSerDeProperties> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THiveSerDeProperties");
private static final org.apache.thrift.protocol.TField FIELD_DELIM_FIELD_DESC = new org.apache.thrift.protocol.TField("field_delim", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField LINE_DELIM_FIELD_DESC = new org.apache.thrift.protocol.TField("line_delim", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField COLLECTION_DELIM_FIELD_DESC = new org.apache.thrift.protocol.TField("collection_delim", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField MAPKV_DELIM_FIELD_DESC = new org.apache.thrift.protocol.TField("mapkv_delim", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField ESCAPE_CHAR_FIELD_DESC = new org.apache.thrift.protocol.TField("escape_char", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField NULL_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("null_format", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new THiveSerDePropertiesStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new THiveSerDePropertiesTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable java.lang.String field_delim; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String line_delim; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String collection_delim; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String mapkv_delim; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String escape_char; // optional
public @org.apache.thrift.annotation.Nullable java.lang.String null_format; // 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 {
FIELD_DELIM((short)1, "field_delim"),
LINE_DELIM((short)2, "line_delim"),
COLLECTION_DELIM((short)3, "collection_delim"),
MAPKV_DELIM((short)4, "mapkv_delim"),
ESCAPE_CHAR((short)5, "escape_char"),
NULL_FORMAT((short)6, "null_format");
private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // FIELD_DELIM
return FIELD_DELIM;
case 2: // LINE_DELIM
return LINE_DELIM;
case 3: // COLLECTION_DELIM
return COLLECTION_DELIM;
case 4: // MAPKV_DELIM
return MAPKV_DELIM;
case 5: // ESCAPE_CHAR
return ESCAPE_CHAR;
case 6: // NULL_FORMAT
return NULL_FORMAT;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
private final java.lang.String _fieldName;
_Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.FIELD_DELIM,_Fields.LINE_DELIM,_Fields.COLLECTION_DELIM,_Fields.MAPKV_DELIM,_Fields.ESCAPE_CHAR,_Fields.NULL_FORMAT};
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.FIELD_DELIM, new org.apache.thrift.meta_data.FieldMetaData("field_delim", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.LINE_DELIM, new org.apache.thrift.meta_data.FieldMetaData("line_delim", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.COLLECTION_DELIM, new org.apache.thrift.meta_data.FieldMetaData("collection_delim", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.MAPKV_DELIM, new org.apache.thrift.meta_data.FieldMetaData("mapkv_delim", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ESCAPE_CHAR, new org.apache.thrift.meta_data.FieldMetaData("escape_char", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NULL_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("null_format", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(THiveSerDeProperties.class, metaDataMap);
}
public THiveSerDeProperties() {
}
/**
* Performs a deep copy on <i>other</i>.
*/
public THiveSerDeProperties(THiveSerDeProperties other) {
if (other.isSetFieldDelim()) {
this.field_delim = other.field_delim;
}
if (other.isSetLineDelim()) {
this.line_delim = other.line_delim;
}
if (other.isSetCollectionDelim()) {
this.collection_delim = other.collection_delim;
}
if (other.isSetMapkvDelim()) {
this.mapkv_delim = other.mapkv_delim;
}
if (other.isSetEscapeChar()) {
this.escape_char = other.escape_char;
}
if (other.isSetNullFormat()) {
this.null_format = other.null_format;
}
}
public THiveSerDeProperties deepCopy() {
return new THiveSerDeProperties(this);
}
@Override
public void clear() {
this.field_delim = null;
this.line_delim = null;
this.collection_delim = null;
this.mapkv_delim = null;
this.escape_char = null;
this.null_format = null;
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getFieldDelim() {
return this.field_delim;
}
public THiveSerDeProperties setFieldDelim(@org.apache.thrift.annotation.Nullable java.lang.String field_delim) {
this.field_delim = field_delim;
return this;
}
public void unsetFieldDelim() {
this.field_delim = null;
}
/** Returns true if field field_delim is set (has been assigned a value) and false otherwise */
public boolean isSetFieldDelim() {
return this.field_delim != null;
}
public void setFieldDelimIsSet(boolean value) {
if (!value) {
this.field_delim = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getLineDelim() {
return this.line_delim;
}
public THiveSerDeProperties setLineDelim(@org.apache.thrift.annotation.Nullable java.lang.String line_delim) {
this.line_delim = line_delim;
return this;
}
public void unsetLineDelim() {
this.line_delim = null;
}
/** Returns true if field line_delim is set (has been assigned a value) and false otherwise */
public boolean isSetLineDelim() {
return this.line_delim != null;
}
public void setLineDelimIsSet(boolean value) {
if (!value) {
this.line_delim = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getCollectionDelim() {
return this.collection_delim;
}
public THiveSerDeProperties setCollectionDelim(@org.apache.thrift.annotation.Nullable java.lang.String collection_delim) {
this.collection_delim = collection_delim;
return this;
}
public void unsetCollectionDelim() {
this.collection_delim = null;
}
/** Returns true if field collection_delim is set (has been assigned a value) and false otherwise */
public boolean isSetCollectionDelim() {
return this.collection_delim != null;
}
public void setCollectionDelimIsSet(boolean value) {
if (!value) {
this.collection_delim = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getMapkvDelim() {
return this.mapkv_delim;
}
public THiveSerDeProperties setMapkvDelim(@org.apache.thrift.annotation.Nullable java.lang.String mapkv_delim) {
this.mapkv_delim = mapkv_delim;
return this;
}
public void unsetMapkvDelim() {
this.mapkv_delim = null;
}
/** Returns true if field mapkv_delim is set (has been assigned a value) and false otherwise */
public boolean isSetMapkvDelim() {
return this.mapkv_delim != null;
}
public void setMapkvDelimIsSet(boolean value) {
if (!value) {
this.mapkv_delim = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getEscapeChar() {
return this.escape_char;
}
public THiveSerDeProperties setEscapeChar(@org.apache.thrift.annotation.Nullable java.lang.String escape_char) {
this.escape_char = escape_char;
return this;
}
public void unsetEscapeChar() {
this.escape_char = null;
}
/** Returns true if field escape_char is set (has been assigned a value) and false otherwise */
public boolean isSetEscapeChar() {
return this.escape_char != null;
}
public void setEscapeCharIsSet(boolean value) {
if (!value) {
this.escape_char = null;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.String getNullFormat() {
return this.null_format;
}
public THiveSerDeProperties setNullFormat(@org.apache.thrift.annotation.Nullable java.lang.String null_format) {
this.null_format = null_format;
return this;
}
public void unsetNullFormat() {
this.null_format = null;
}
/** Returns true if field null_format is set (has been assigned a value) and false otherwise */
public boolean isSetNullFormat() {
return this.null_format != null;
}
public void setNullFormatIsSet(boolean value) {
if (!value) {
this.null_format = null;
}
}
public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case FIELD_DELIM:
if (value == null) {
unsetFieldDelim();
} else {
setFieldDelim((java.lang.String)value);
}
break;
case LINE_DELIM:
if (value == null) {
unsetLineDelim();
} else {
setLineDelim((java.lang.String)value);
}
break;
case COLLECTION_DELIM:
if (value == null) {
unsetCollectionDelim();
} else {
setCollectionDelim((java.lang.String)value);
}
break;
case MAPKV_DELIM:
if (value == null) {
unsetMapkvDelim();
} else {
setMapkvDelim((java.lang.String)value);
}
break;
case ESCAPE_CHAR:
if (value == null) {
unsetEscapeChar();
} else {
setEscapeChar((java.lang.String)value);
}
break;
case NULL_FORMAT:
if (value == null) {
unsetNullFormat();
} else {
setNullFormat((java.lang.String)value);
}
break;
}
}
@org.apache.thrift.annotation.Nullable
public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FIELD_DELIM:
return getFieldDelim();
case LINE_DELIM:
return getLineDelim();
case COLLECTION_DELIM:
return getCollectionDelim();
case MAPKV_DELIM:
return getMapkvDelim();
case ESCAPE_CHAR:
return getEscapeChar();
case NULL_FORMAT:
return getNullFormat();
}
throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new java.lang.IllegalArgumentException();
}
switch (field) {
case FIELD_DELIM:
return isSetFieldDelim();
case LINE_DELIM:
return isSetLineDelim();
case COLLECTION_DELIM:
return isSetCollectionDelim();
case MAPKV_DELIM:
return isSetMapkvDelim();
case ESCAPE_CHAR:
return isSetEscapeChar();
case NULL_FORMAT:
return isSetNullFormat();
}
throw new java.lang.IllegalStateException();
}
@Override
public boolean equals(java.lang.Object that) {
if (that instanceof THiveSerDeProperties)
return this.equals((THiveSerDeProperties)that);
return false;
}
public boolean equals(THiveSerDeProperties that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_field_delim = true && this.isSetFieldDelim();
boolean that_present_field_delim = true && that.isSetFieldDelim();
if (this_present_field_delim || that_present_field_delim) {
if (!(this_present_field_delim && that_present_field_delim))
return false;
if (!this.field_delim.equals(that.field_delim))
return false;
}
boolean this_present_line_delim = true && this.isSetLineDelim();
boolean that_present_line_delim = true && that.isSetLineDelim();
if (this_present_line_delim || that_present_line_delim) {
if (!(this_present_line_delim && that_present_line_delim))
return false;
if (!this.line_delim.equals(that.line_delim))
return false;
}
boolean this_present_collection_delim = true && this.isSetCollectionDelim();
boolean that_present_collection_delim = true && that.isSetCollectionDelim();
if (this_present_collection_delim || that_present_collection_delim) {
if (!(this_present_collection_delim && that_present_collection_delim))
return false;
if (!this.collection_delim.equals(that.collection_delim))
return false;
}
boolean this_present_mapkv_delim = true && this.isSetMapkvDelim();
boolean that_present_mapkv_delim = true && that.isSetMapkvDelim();
if (this_present_mapkv_delim || that_present_mapkv_delim) {
if (!(this_present_mapkv_delim && that_present_mapkv_delim))
return false;
if (!this.mapkv_delim.equals(that.mapkv_delim))
return false;
}
boolean this_present_escape_char = true && this.isSetEscapeChar();
boolean that_present_escape_char = true && that.isSetEscapeChar();
if (this_present_escape_char || that_present_escape_char) {
if (!(this_present_escape_char && that_present_escape_char))
return false;
if (!this.escape_char.equals(that.escape_char))
return false;
}
boolean this_present_null_format = true && this.isSetNullFormat();
boolean that_present_null_format = true && that.isSetNullFormat();
if (this_present_null_format || that_present_null_format) {
if (!(this_present_null_format && that_present_null_format))
return false;
if (!this.null_format.equals(that.null_format))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetFieldDelim()) ? 131071 : 524287);
if (isSetFieldDelim())
hashCode = hashCode * 8191 + field_delim.hashCode();
hashCode = hashCode * 8191 + ((isSetLineDelim()) ? 131071 : 524287);
if (isSetLineDelim())
hashCode = hashCode * 8191 + line_delim.hashCode();
hashCode = hashCode * 8191 + ((isSetCollectionDelim()) ? 131071 : 524287);
if (isSetCollectionDelim())
hashCode = hashCode * 8191 + collection_delim.hashCode();
hashCode = hashCode * 8191 + ((isSetMapkvDelim()) ? 131071 : 524287);
if (isSetMapkvDelim())
hashCode = hashCode * 8191 + mapkv_delim.hashCode();
hashCode = hashCode * 8191 + ((isSetEscapeChar()) ? 131071 : 524287);
if (isSetEscapeChar())
hashCode = hashCode * 8191 + escape_char.hashCode();
hashCode = hashCode * 8191 + ((isSetNullFormat()) ? 131071 : 524287);
if (isSetNullFormat())
hashCode = hashCode * 8191 + null_format.hashCode();
return hashCode;
}
@Override
public int compareTo(THiveSerDeProperties other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = java.lang.Boolean.compare(isSetFieldDelim(), other.isSetFieldDelim());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFieldDelim()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field_delim, other.field_delim);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetLineDelim(), other.isSetLineDelim());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetLineDelim()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.line_delim, other.line_delim);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetCollectionDelim(), other.isSetCollectionDelim());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetCollectionDelim()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.collection_delim, other.collection_delim);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetMapkvDelim(), other.isSetMapkvDelim());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetMapkvDelim()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mapkv_delim, other.mapkv_delim);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetEscapeChar(), other.isSetEscapeChar());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEscapeChar()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.escape_char, other.escape_char);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.compare(isSetNullFormat(), other.isSetNullFormat());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNullFormat()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.null_format, other.null_format);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
@org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public java.lang.String toString() {
java.lang.StringBuilder sb = new java.lang.StringBuilder("THiveSerDeProperties(");
boolean first = true;
if (isSetFieldDelim()) {
sb.append("field_delim:");
if (this.field_delim == null) {
sb.append("null");
} else {
sb.append(this.field_delim);
}
first = false;
}
if (isSetLineDelim()) {
if (!first) sb.append(", ");
sb.append("line_delim:");
if (this.line_delim == null) {
sb.append("null");
} else {
sb.append(this.line_delim);
}
first = false;
}
if (isSetCollectionDelim()) {
if (!first) sb.append(", ");
sb.append("collection_delim:");
if (this.collection_delim == null) {
sb.append("null");
} else {
sb.append(this.collection_delim);
}
first = false;
}
if (isSetMapkvDelim()) {
if (!first) sb.append(", ");
sb.append("mapkv_delim:");
if (this.mapkv_delim == null) {
sb.append("null");
} else {
sb.append(this.mapkv_delim);
}
first = false;
}
if (isSetEscapeChar()) {
if (!first) sb.append(", ");
sb.append("escape_char:");
if (this.escape_char == null) {
sb.append("null");
} else {
sb.append(this.escape_char);
}
first = false;
}
if (isSetNullFormat()) {
if (!first) sb.append(", ");
sb.append("null_format:");
if (this.null_format == null) {
sb.append("null");
} else {
sb.append(this.null_format);
}
first = false;
}
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
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 THiveSerDePropertiesStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public THiveSerDePropertiesStandardScheme getScheme() {
return new THiveSerDePropertiesStandardScheme();
}
}
private static class THiveSerDePropertiesStandardScheme extends org.apache.thrift.scheme.StandardScheme<THiveSerDeProperties> {
public void read(org.apache.thrift.protocol.TProtocol iprot, THiveSerDeProperties 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: // FIELD_DELIM
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.field_delim = iprot.readString();
struct.setFieldDelimIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // LINE_DELIM
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.line_delim = iprot.readString();
struct.setLineDelimIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // COLLECTION_DELIM
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.collection_delim = iprot.readString();
struct.setCollectionDelimIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // MAPKV_DELIM
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.mapkv_delim = iprot.readString();
struct.setMapkvDelimIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // ESCAPE_CHAR
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.escape_char = iprot.readString();
struct.setEscapeCharIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // NULL_FORMAT
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.null_format = iprot.readString();
struct.setNullFormatIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
public void write(org.apache.thrift.protocol.TProtocol oprot, THiveSerDeProperties struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.field_delim != null) {
if (struct.isSetFieldDelim()) {
oprot.writeFieldBegin(FIELD_DELIM_FIELD_DESC);
oprot.writeString(struct.field_delim);
oprot.writeFieldEnd();
}
}
if (struct.line_delim != null) {
if (struct.isSetLineDelim()) {
oprot.writeFieldBegin(LINE_DELIM_FIELD_DESC);
oprot.writeString(struct.line_delim);
oprot.writeFieldEnd();
}
}
if (struct.collection_delim != null) {
if (struct.isSetCollectionDelim()) {
oprot.writeFieldBegin(COLLECTION_DELIM_FIELD_DESC);
oprot.writeString(struct.collection_delim);
oprot.writeFieldEnd();
}
}
if (struct.mapkv_delim != null) {
if (struct.isSetMapkvDelim()) {
oprot.writeFieldBegin(MAPKV_DELIM_FIELD_DESC);
oprot.writeString(struct.mapkv_delim);
oprot.writeFieldEnd();
}
}
if (struct.escape_char != null) {
if (struct.isSetEscapeChar()) {
oprot.writeFieldBegin(ESCAPE_CHAR_FIELD_DESC);
oprot.writeString(struct.escape_char);
oprot.writeFieldEnd();
}
}
if (struct.null_format != null) {
if (struct.isSetNullFormat()) {
oprot.writeFieldBegin(NULL_FORMAT_FIELD_DESC);
oprot.writeString(struct.null_format);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class THiveSerDePropertiesTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public THiveSerDePropertiesTupleScheme getScheme() {
return new THiveSerDePropertiesTupleScheme();
}
}
private static class THiveSerDePropertiesTupleScheme extends org.apache.thrift.scheme.TupleScheme<THiveSerDeProperties> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, THiveSerDeProperties struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetFieldDelim()) {
optionals.set(0);
}
if (struct.isSetLineDelim()) {
optionals.set(1);
}
if (struct.isSetCollectionDelim()) {
optionals.set(2);
}
if (struct.isSetMapkvDelim()) {
optionals.set(3);
}
if (struct.isSetEscapeChar()) {
optionals.set(4);
}
if (struct.isSetNullFormat()) {
optionals.set(5);
}
oprot.writeBitSet(optionals, 6);
if (struct.isSetFieldDelim()) {
oprot.writeString(struct.field_delim);
}
if (struct.isSetLineDelim()) {
oprot.writeString(struct.line_delim);
}
if (struct.isSetCollectionDelim()) {
oprot.writeString(struct.collection_delim);
}
if (struct.isSetMapkvDelim()) {
oprot.writeString(struct.mapkv_delim);
}
if (struct.isSetEscapeChar()) {
oprot.writeString(struct.escape_char);
}
if (struct.isSetNullFormat()) {
oprot.writeString(struct.null_format);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, THiveSerDeProperties struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.field_delim = iprot.readString();
struct.setFieldDelimIsSet(true);
}
if (incoming.get(1)) {
struct.line_delim = iprot.readString();
struct.setLineDelimIsSet(true);
}
if (incoming.get(2)) {
struct.collection_delim = iprot.readString();
struct.setCollectionDelimIsSet(true);
}
if (incoming.get(3)) {
struct.mapkv_delim = iprot.readString();
struct.setMapkvDelimIsSet(true);
}
if (incoming.get(4)) {
struct.escape_char = iprot.readString();
struct.setEscapeCharIsSet(true);
}
if (incoming.get(5)) {
struct.null_format = iprot.readString();
struct.setNullFormatIsSet(true);
}
}
}
private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}