http://git-wip-us.apache.org/repos/asf/hive/blob/ba8a99e1/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLDefaultConstraint.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLDefaultConstraint.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLDefaultConstraint.java index 185b77e..7b8a257 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLDefaultConstraint.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLDefaultConstraint.java @@ -38,14 +38,15 @@ import org.slf4j.LoggerFactory; @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class SQLDefaultConstraint implements org.apache.thrift.TBase<SQLDefaultConstraint, SQLDefaultConstraint._Fields>, java.io.Serializable, Cloneable, Comparable<SQLDefaultConstraint> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLDefaultConstraint"); - private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField DEFAULT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("default_value", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField DC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dc_name", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); - private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField DEFAULT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("default_value", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField DC_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("dc_name", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)9); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -53,6 +54,7 @@ import org.slf4j.LoggerFactory; schemes.put(TupleScheme.class, new SQLDefaultConstraintTupleSchemeFactory()); } + private String catName; // required private String table_db; // required private String table_name; // required private String column_name; // required @@ -64,14 +66,15 @@ import org.slf4j.LoggerFactory; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLE_DB((short)1, "table_db"), - TABLE_NAME((short)2, "table_name"), - COLUMN_NAME((short)3, "column_name"), - DEFAULT_VALUE((short)4, "default_value"), - DC_NAME((short)5, "dc_name"), - ENABLE_CSTR((short)6, "enable_cstr"), - VALIDATE_CSTR((short)7, "validate_cstr"), - RELY_CSTR((short)8, "rely_cstr"); + CAT_NAME((short)1, "catName"), + TABLE_DB((short)2, "table_db"), + TABLE_NAME((short)3, "table_name"), + COLUMN_NAME((short)4, "column_name"), + DEFAULT_VALUE((short)5, "default_value"), + DC_NAME((short)6, "dc_name"), + ENABLE_CSTR((short)7, "enable_cstr"), + VALIDATE_CSTR((short)8, "validate_cstr"), + RELY_CSTR((short)9, "rely_cstr"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -86,21 +89,23 @@ import org.slf4j.LoggerFactory; */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE_DB + case 1: // CAT_NAME + return CAT_NAME; + case 2: // TABLE_DB return TABLE_DB; - case 2: // TABLE_NAME + case 3: // TABLE_NAME return TABLE_NAME; - case 3: // COLUMN_NAME + case 4: // COLUMN_NAME return COLUMN_NAME; - case 4: // DEFAULT_VALUE + case 5: // DEFAULT_VALUE return DEFAULT_VALUE; - case 5: // DC_NAME + case 6: // DC_NAME return DC_NAME; - case 6: // ENABLE_CSTR + case 7: // ENABLE_CSTR return ENABLE_CSTR; - case 7: // VALIDATE_CSTR + case 8: // VALIDATE_CSTR return VALIDATE_CSTR; - case 8: // RELY_CSTR + case 9: // RELY_CSTR return RELY_CSTR; default: return null; @@ -149,6 +154,8 @@ import org.slf4j.LoggerFactory; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("table_db", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -173,6 +180,7 @@ import org.slf4j.LoggerFactory; } public SQLDefaultConstraint( + String catName, String table_db, String table_name, String column_name, @@ -183,6 +191,7 @@ import org.slf4j.LoggerFactory; boolean rely_cstr) { this(); + this.catName = catName; this.table_db = table_db; this.table_name = table_name; this.column_name = column_name; @@ -201,6 +210,9 @@ import org.slf4j.LoggerFactory; */ public SQLDefaultConstraint(SQLDefaultConstraint other) { __isset_bitfield = other.__isset_bitfield; + if (other.isSetCatName()) { + this.catName = other.catName; + } if (other.isSetTable_db()) { this.table_db = other.table_db; } @@ -227,6 +239,7 @@ import org.slf4j.LoggerFactory; @Override public void clear() { + this.catName = null; this.table_db = null; this.table_name = null; this.column_name = null; @@ -240,6 +253,29 @@ import org.slf4j.LoggerFactory; this.rely_cstr = false; } + public String getCatName() { + return this.catName; + } + + public void setCatName(String catName) { + this.catName = catName; + } + + public void unsetCatName() { + this.catName = null; + } + + /** Returns true if field catName is set (has been assigned a value) and false otherwise */ + public boolean isSetCatName() { + return this.catName != null; + } + + public void setCatNameIsSet(boolean value) { + if (!value) { + this.catName = null; + } + } + public String getTable_db() { return this.table_db; } @@ -423,6 +459,14 @@ import org.slf4j.LoggerFactory; public void setFieldValue(_Fields field, Object value) { switch (field) { + case CAT_NAME: + if (value == null) { + unsetCatName(); + } else { + setCatName((String)value); + } + break; + case TABLE_DB: if (value == null) { unsetTable_db(); @@ -492,6 +536,9 @@ import org.slf4j.LoggerFactory; public Object getFieldValue(_Fields field) { switch (field) { + case CAT_NAME: + return getCatName(); + case TABLE_DB: return getTable_db(); @@ -527,6 +574,8 @@ import org.slf4j.LoggerFactory; } switch (field) { + case CAT_NAME: + return isSetCatName(); case TABLE_DB: return isSetTable_db(); case TABLE_NAME: @@ -560,6 +609,15 @@ import org.slf4j.LoggerFactory; if (that == null) return false; + boolean this_present_catName = true && this.isSetCatName(); + boolean that_present_catName = true && that.isSetCatName(); + if (this_present_catName || that_present_catName) { + if (!(this_present_catName && that_present_catName)) + return false; + if (!this.catName.equals(that.catName)) + return false; + } + boolean this_present_table_db = true && this.isSetTable_db(); boolean that_present_table_db = true && that.isSetTable_db(); if (this_present_table_db || that_present_table_db) { @@ -639,6 +697,11 @@ import org.slf4j.LoggerFactory; public int hashCode() { List<Object> list = new ArrayList<Object>(); + boolean present_catName = true && (isSetCatName()); + list.add(present_catName); + if (present_catName) + list.add(catName); + boolean present_table_db = true && (isSetTable_db()); list.add(present_table_db); if (present_table_db) @@ -690,6 +753,16 @@ import org.slf4j.LoggerFactory; int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCatName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetTable_db()).compareTo(other.isSetTable_db()); if (lastComparison != 0) { return lastComparison; @@ -790,6 +863,14 @@ import org.slf4j.LoggerFactory; StringBuilder sb = new StringBuilder("SQLDefaultConstraint("); boolean first = true; + sb.append("catName:"); + if (this.catName == null) { + sb.append("null"); + } else { + sb.append(this.catName); + } + first = false; + if (!first) sb.append(", "); sb.append("table_db:"); if (this.table_db == null) { sb.append("null"); @@ -886,7 +967,15 @@ import org.slf4j.LoggerFactory; break; } switch (schemeField.id) { - case 1: // TABLE_DB + case 1: // CAT_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.catName = iprot.readString(); + struct.setCatNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TABLE_DB if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_db = iprot.readString(); struct.setTable_dbIsSet(true); @@ -894,7 +983,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // TABLE_NAME + case 3: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); @@ -902,7 +991,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // COLUMN_NAME + case 4: // COLUMN_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.column_name = iprot.readString(); struct.setColumn_nameIsSet(true); @@ -910,7 +999,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // DEFAULT_VALUE + case 5: // DEFAULT_VALUE if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.default_value = iprot.readString(); struct.setDefault_valueIsSet(true); @@ -918,7 +1007,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // DC_NAME + case 6: // DC_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.dc_name = iprot.readString(); struct.setDc_nameIsSet(true); @@ -926,7 +1015,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // ENABLE_CSTR + case 7: // ENABLE_CSTR if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.enable_cstr = iprot.readBool(); struct.setEnable_cstrIsSet(true); @@ -934,7 +1023,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 7: // VALIDATE_CSTR + case 8: // VALIDATE_CSTR if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.validate_cstr = iprot.readBool(); struct.setValidate_cstrIsSet(true); @@ -942,7 +1031,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 8: // RELY_CSTR + case 9: // RELY_CSTR if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.rely_cstr = iprot.readBool(); struct.setRely_cstrIsSet(true); @@ -963,6 +1052,11 @@ import org.slf4j.LoggerFactory; struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.catName != null) { + oprot.writeFieldBegin(CAT_NAME_FIELD_DESC); + oprot.writeString(struct.catName); + oprot.writeFieldEnd(); + } if (struct.table_db != null) { oprot.writeFieldBegin(TABLE_DB_FIELD_DESC); oprot.writeString(struct.table_db); @@ -1015,31 +1109,37 @@ import org.slf4j.LoggerFactory; public void write(org.apache.thrift.protocol.TProtocol prot, SQLDefaultConstraint struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetTable_db()) { + if (struct.isSetCatName()) { optionals.set(0); } - if (struct.isSetTable_name()) { + if (struct.isSetTable_db()) { optionals.set(1); } - if (struct.isSetColumn_name()) { + if (struct.isSetTable_name()) { optionals.set(2); } - if (struct.isSetDefault_value()) { + if (struct.isSetColumn_name()) { optionals.set(3); } - if (struct.isSetDc_name()) { + if (struct.isSetDefault_value()) { optionals.set(4); } - if (struct.isSetEnable_cstr()) { + if (struct.isSetDc_name()) { optionals.set(5); } - if (struct.isSetValidate_cstr()) { + if (struct.isSetEnable_cstr()) { optionals.set(6); } - if (struct.isSetRely_cstr()) { + if (struct.isSetValidate_cstr()) { optionals.set(7); } - oprot.writeBitSet(optionals, 8); + if (struct.isSetRely_cstr()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetCatName()) { + oprot.writeString(struct.catName); + } if (struct.isSetTable_db()) { oprot.writeString(struct.table_db); } @@ -1069,36 +1169,40 @@ import org.slf4j.LoggerFactory; @Override public void read(org.apache.thrift.protocol.TProtocol prot, SQLDefaultConstraint struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(8); + BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { + struct.catName = iprot.readString(); + struct.setCatNameIsSet(true); + } + if (incoming.get(1)) { struct.table_db = iprot.readString(); struct.setTable_dbIsSet(true); } - if (incoming.get(1)) { + if (incoming.get(2)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } - if (incoming.get(2)) { + if (incoming.get(3)) { struct.column_name = iprot.readString(); struct.setColumn_nameIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(4)) { struct.default_value = iprot.readString(); struct.setDefault_valueIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(5)) { struct.dc_name = iprot.readString(); struct.setDc_nameIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(6)) { struct.enable_cstr = iprot.readBool(); struct.setEnable_cstrIsSet(true); } - if (incoming.get(6)) { + if (incoming.get(7)) { struct.validate_cstr = iprot.readBool(); struct.setValidate_cstrIsSet(true); } - if (incoming.get(7)) { + if (incoming.get(8)) { struct.rely_cstr = iprot.readBool(); struct.setRely_cstrIsSet(true); }
http://git-wip-us.apache.org/repos/asf/hive/blob/ba8a99e1/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java index 6cf6f31..a7cf241 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLForeignKey.java @@ -52,6 +52,7 @@ import org.slf4j.LoggerFactory; private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)12); private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)13); private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)14); + private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)15); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -73,6 +74,7 @@ import org.slf4j.LoggerFactory; private boolean enable_cstr; // required private boolean validate_cstr; // required private boolean rely_cstr; // required + private String catName; // 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 { @@ -89,7 +91,8 @@ import org.slf4j.LoggerFactory; PK_NAME((short)11, "pk_name"), ENABLE_CSTR((short)12, "enable_cstr"), VALIDATE_CSTR((short)13, "validate_cstr"), - RELY_CSTR((short)14, "rely_cstr"); + RELY_CSTR((short)14, "rely_cstr"), + CAT_NAME((short)15, "catName"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -132,6 +135,8 @@ import org.slf4j.LoggerFactory; return VALIDATE_CSTR; case 14: // RELY_CSTR return RELY_CSTR; + case 15: // CAT_NAME + return CAT_NAME; default: return null; } @@ -179,6 +184,7 @@ import org.slf4j.LoggerFactory; private static final int __VALIDATE_CSTR_ISSET_ID = 4; private static final int __RELY_CSTR_ISSET_ID = 5; private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.CAT_NAME}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -210,6 +216,8 @@ import org.slf4j.LoggerFactory; new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLForeignKey.class, metaDataMap); } @@ -291,6 +299,9 @@ import org.slf4j.LoggerFactory; this.enable_cstr = other.enable_cstr; this.validate_cstr = other.validate_cstr; this.rely_cstr = other.rely_cstr; + if (other.isSetCatName()) { + this.catName = other.catName; + } } public SQLForeignKey deepCopy() { @@ -319,6 +330,7 @@ import org.slf4j.LoggerFactory; this.validate_cstr = false; setRely_cstrIsSet(false); this.rely_cstr = false; + this.catName = null; } public String getPktable_db() { @@ -637,6 +649,29 @@ import org.slf4j.LoggerFactory; __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value); } + public String getCatName() { + return this.catName; + } + + public void setCatName(String catName) { + this.catName = catName; + } + + public void unsetCatName() { + this.catName = null; + } + + /** Returns true if field catName is set (has been assigned a value) and false otherwise */ + public boolean isSetCatName() { + return this.catName != null; + } + + public void setCatNameIsSet(boolean value) { + if (!value) { + this.catName = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case PKTABLE_DB: @@ -751,6 +786,14 @@ import org.slf4j.LoggerFactory; } break; + case CAT_NAME: + if (value == null) { + unsetCatName(); + } else { + setCatName((String)value); + } + break; + } } @@ -798,6 +841,9 @@ import org.slf4j.LoggerFactory; case RELY_CSTR: return isRely_cstr(); + case CAT_NAME: + return getCatName(); + } throw new IllegalStateException(); } @@ -837,6 +883,8 @@ import org.slf4j.LoggerFactory; return isSetValidate_cstr(); case RELY_CSTR: return isSetRely_cstr(); + case CAT_NAME: + return isSetCatName(); } throw new IllegalStateException(); } @@ -980,6 +1028,15 @@ import org.slf4j.LoggerFactory; return false; } + boolean this_present_catName = true && this.isSetCatName(); + boolean that_present_catName = true && that.isSetCatName(); + if (this_present_catName || that_present_catName) { + if (!(this_present_catName && that_present_catName)) + return false; + if (!this.catName.equals(that.catName)) + return false; + } + return true; } @@ -1057,6 +1114,11 @@ import org.slf4j.LoggerFactory; if (present_rely_cstr) list.add(rely_cstr); + boolean present_catName = true && (isSetCatName()); + list.add(present_catName); + if (present_catName) + list.add(catName); + return list.hashCode(); } @@ -1208,6 +1270,16 @@ import org.slf4j.LoggerFactory; return lastComparison; } } + lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCatName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -1315,6 +1387,16 @@ import org.slf4j.LoggerFactory; sb.append("rely_cstr:"); sb.append(this.rely_cstr); first = false; + if (isSetCatName()) { + if (!first) sb.append(", "); + sb.append("catName:"); + if (this.catName == null) { + sb.append("null"); + } else { + sb.append(this.catName); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -1472,6 +1554,14 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 15: // CAT_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.catName = iprot.readString(); + struct.setCatNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -1543,6 +1633,13 @@ import org.slf4j.LoggerFactory; oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC); oprot.writeBool(struct.rely_cstr); oprot.writeFieldEnd(); + if (struct.catName != null) { + if (struct.isSetCatName()) { + oprot.writeFieldBegin(CAT_NAME_FIELD_DESC); + oprot.writeString(struct.catName); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1603,7 +1700,10 @@ import org.slf4j.LoggerFactory; if (struct.isSetRely_cstr()) { optionals.set(13); } - oprot.writeBitSet(optionals, 14); + if (struct.isSetCatName()) { + optionals.set(14); + } + oprot.writeBitSet(optionals, 15); if (struct.isSetPktable_db()) { oprot.writeString(struct.pktable_db); } @@ -1646,12 +1746,15 @@ import org.slf4j.LoggerFactory; if (struct.isSetRely_cstr()) { oprot.writeBool(struct.rely_cstr); } + if (struct.isSetCatName()) { + oprot.writeString(struct.catName); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, SQLForeignKey struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(14); + BitSet incoming = iprot.readBitSet(15); if (incoming.get(0)) { struct.pktable_db = iprot.readString(); struct.setPktable_dbIsSet(true); @@ -1708,6 +1811,10 @@ import org.slf4j.LoggerFactory; struct.rely_cstr = iprot.readBool(); struct.setRely_cstrIsSet(true); } + if (incoming.get(14)) { + struct.catName = iprot.readString(); + struct.setCatNameIsSet(true); + } } } http://git-wip-us.apache.org/repos/asf/hive/blob/ba8a99e1/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java index cb0f295..97b9c1f 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLNotNullConstraint.java @@ -38,13 +38,14 @@ import org.slf4j.LoggerFactory; @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class SQLNotNullConstraint implements org.apache.thrift.TBase<SQLNotNullConstraint, SQLNotNullConstraint._Fields>, java.io.Serializable, Cloneable, Comparable<SQLNotNullConstraint> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLNotNullConstraint"); - private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField NN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("nn_name", org.apache.thrift.protocol.TType.STRING, (short)4); - private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)5); - private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField NN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("nn_name", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); + private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)8); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -52,6 +53,7 @@ import org.slf4j.LoggerFactory; schemes.put(TupleScheme.class, new SQLNotNullConstraintTupleSchemeFactory()); } + private String catName; // required private String table_db; // required private String table_name; // required private String column_name; // required @@ -62,13 +64,14 @@ import org.slf4j.LoggerFactory; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLE_DB((short)1, "table_db"), - TABLE_NAME((short)2, "table_name"), - COLUMN_NAME((short)3, "column_name"), - NN_NAME((short)4, "nn_name"), - ENABLE_CSTR((short)5, "enable_cstr"), - VALIDATE_CSTR((short)6, "validate_cstr"), - RELY_CSTR((short)7, "rely_cstr"); + CAT_NAME((short)1, "catName"), + TABLE_DB((short)2, "table_db"), + TABLE_NAME((short)3, "table_name"), + COLUMN_NAME((short)4, "column_name"), + NN_NAME((short)5, "nn_name"), + ENABLE_CSTR((short)6, "enable_cstr"), + VALIDATE_CSTR((short)7, "validate_cstr"), + RELY_CSTR((short)8, "rely_cstr"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -83,19 +86,21 @@ import org.slf4j.LoggerFactory; */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE_DB + case 1: // CAT_NAME + return CAT_NAME; + case 2: // TABLE_DB return TABLE_DB; - case 2: // TABLE_NAME + case 3: // TABLE_NAME return TABLE_NAME; - case 3: // COLUMN_NAME + case 4: // COLUMN_NAME return COLUMN_NAME; - case 4: // NN_NAME + case 5: // NN_NAME return NN_NAME; - case 5: // ENABLE_CSTR + case 6: // ENABLE_CSTR return ENABLE_CSTR; - case 6: // VALIDATE_CSTR + case 7: // VALIDATE_CSTR return VALIDATE_CSTR; - case 7: // RELY_CSTR + case 8: // RELY_CSTR return RELY_CSTR; default: return null; @@ -144,6 +149,8 @@ import org.slf4j.LoggerFactory; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("table_db", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -166,6 +173,7 @@ import org.slf4j.LoggerFactory; } public SQLNotNullConstraint( + String catName, String table_db, String table_name, String column_name, @@ -175,6 +183,7 @@ import org.slf4j.LoggerFactory; boolean rely_cstr) { this(); + this.catName = catName; this.table_db = table_db; this.table_name = table_name; this.column_name = column_name; @@ -192,6 +201,9 @@ import org.slf4j.LoggerFactory; */ public SQLNotNullConstraint(SQLNotNullConstraint other) { __isset_bitfield = other.__isset_bitfield; + if (other.isSetCatName()) { + this.catName = other.catName; + } if (other.isSetTable_db()) { this.table_db = other.table_db; } @@ -215,6 +227,7 @@ import org.slf4j.LoggerFactory; @Override public void clear() { + this.catName = null; this.table_db = null; this.table_name = null; this.column_name = null; @@ -227,6 +240,29 @@ import org.slf4j.LoggerFactory; this.rely_cstr = false; } + public String getCatName() { + return this.catName; + } + + public void setCatName(String catName) { + this.catName = catName; + } + + public void unsetCatName() { + this.catName = null; + } + + /** Returns true if field catName is set (has been assigned a value) and false otherwise */ + public boolean isSetCatName() { + return this.catName != null; + } + + public void setCatNameIsSet(boolean value) { + if (!value) { + this.catName = null; + } + } + public String getTable_db() { return this.table_db; } @@ -387,6 +423,14 @@ import org.slf4j.LoggerFactory; public void setFieldValue(_Fields field, Object value) { switch (field) { + case CAT_NAME: + if (value == null) { + unsetCatName(); + } else { + setCatName((String)value); + } + break; + case TABLE_DB: if (value == null) { unsetTable_db(); @@ -448,6 +492,9 @@ import org.slf4j.LoggerFactory; public Object getFieldValue(_Fields field) { switch (field) { + case CAT_NAME: + return getCatName(); + case TABLE_DB: return getTable_db(); @@ -480,6 +527,8 @@ import org.slf4j.LoggerFactory; } switch (field) { + case CAT_NAME: + return isSetCatName(); case TABLE_DB: return isSetTable_db(); case TABLE_NAME: @@ -511,6 +560,15 @@ import org.slf4j.LoggerFactory; if (that == null) return false; + boolean this_present_catName = true && this.isSetCatName(); + boolean that_present_catName = true && that.isSetCatName(); + if (this_present_catName || that_present_catName) { + if (!(this_present_catName && that_present_catName)) + return false; + if (!this.catName.equals(that.catName)) + return false; + } + boolean this_present_table_db = true && this.isSetTable_db(); boolean that_present_table_db = true && that.isSetTable_db(); if (this_present_table_db || that_present_table_db) { @@ -581,6 +639,11 @@ import org.slf4j.LoggerFactory; public int hashCode() { List<Object> list = new ArrayList<Object>(); + boolean present_catName = true && (isSetCatName()); + list.add(present_catName); + if (present_catName) + list.add(catName); + boolean present_table_db = true && (isSetTable_db()); list.add(present_table_db); if (present_table_db) @@ -627,6 +690,16 @@ import org.slf4j.LoggerFactory; int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCatName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetTable_db()).compareTo(other.isSetTable_db()); if (lastComparison != 0) { return lastComparison; @@ -717,6 +790,14 @@ import org.slf4j.LoggerFactory; StringBuilder sb = new StringBuilder("SQLNotNullConstraint("); boolean first = true; + sb.append("catName:"); + if (this.catName == null) { + sb.append("null"); + } else { + sb.append(this.catName); + } + first = false; + if (!first) sb.append(", "); sb.append("table_db:"); if (this.table_db == null) { sb.append("null"); @@ -805,7 +886,15 @@ import org.slf4j.LoggerFactory; break; } switch (schemeField.id) { - case 1: // TABLE_DB + case 1: // CAT_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.catName = iprot.readString(); + struct.setCatNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TABLE_DB if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_db = iprot.readString(); struct.setTable_dbIsSet(true); @@ -813,7 +902,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // TABLE_NAME + case 3: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); @@ -821,7 +910,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // COLUMN_NAME + case 4: // COLUMN_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.column_name = iprot.readString(); struct.setColumn_nameIsSet(true); @@ -829,7 +918,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // NN_NAME + case 5: // NN_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.nn_name = iprot.readString(); struct.setNn_nameIsSet(true); @@ -837,7 +926,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // ENABLE_CSTR + case 6: // ENABLE_CSTR if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.enable_cstr = iprot.readBool(); struct.setEnable_cstrIsSet(true); @@ -845,7 +934,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // VALIDATE_CSTR + case 7: // VALIDATE_CSTR if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.validate_cstr = iprot.readBool(); struct.setValidate_cstrIsSet(true); @@ -853,7 +942,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 7: // RELY_CSTR + case 8: // RELY_CSTR if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.rely_cstr = iprot.readBool(); struct.setRely_cstrIsSet(true); @@ -874,6 +963,11 @@ import org.slf4j.LoggerFactory; struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.catName != null) { + oprot.writeFieldBegin(CAT_NAME_FIELD_DESC); + oprot.writeString(struct.catName); + oprot.writeFieldEnd(); + } if (struct.table_db != null) { oprot.writeFieldBegin(TABLE_DB_FIELD_DESC); oprot.writeString(struct.table_db); @@ -921,28 +1015,34 @@ import org.slf4j.LoggerFactory; public void write(org.apache.thrift.protocol.TProtocol prot, SQLNotNullConstraint struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetTable_db()) { + if (struct.isSetCatName()) { optionals.set(0); } - if (struct.isSetTable_name()) { + if (struct.isSetTable_db()) { optionals.set(1); } - if (struct.isSetColumn_name()) { + if (struct.isSetTable_name()) { optionals.set(2); } - if (struct.isSetNn_name()) { + if (struct.isSetColumn_name()) { optionals.set(3); } - if (struct.isSetEnable_cstr()) { + if (struct.isSetNn_name()) { optionals.set(4); } - if (struct.isSetValidate_cstr()) { + if (struct.isSetEnable_cstr()) { optionals.set(5); } - if (struct.isSetRely_cstr()) { + if (struct.isSetValidate_cstr()) { optionals.set(6); } - oprot.writeBitSet(optionals, 7); + if (struct.isSetRely_cstr()) { + optionals.set(7); + } + oprot.writeBitSet(optionals, 8); + if (struct.isSetCatName()) { + oprot.writeString(struct.catName); + } if (struct.isSetTable_db()) { oprot.writeString(struct.table_db); } @@ -969,32 +1069,36 @@ import org.slf4j.LoggerFactory; @Override public void read(org.apache.thrift.protocol.TProtocol prot, SQLNotNullConstraint struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(7); + BitSet incoming = iprot.readBitSet(8); if (incoming.get(0)) { + struct.catName = iprot.readString(); + struct.setCatNameIsSet(true); + } + if (incoming.get(1)) { struct.table_db = iprot.readString(); struct.setTable_dbIsSet(true); } - if (incoming.get(1)) { + if (incoming.get(2)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } - if (incoming.get(2)) { + if (incoming.get(3)) { struct.column_name = iprot.readString(); struct.setColumn_nameIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(4)) { struct.nn_name = iprot.readString(); struct.setNn_nameIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(5)) { struct.enable_cstr = iprot.readBool(); struct.setEnable_cstrIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(6)) { struct.validate_cstr = iprot.readBool(); struct.setValidate_cstrIsSet(true); } - if (incoming.get(6)) { + if (incoming.get(7)) { struct.rely_cstr = iprot.readBool(); struct.setRely_cstrIsSet(true); } http://git-wip-us.apache.org/repos/asf/hive/blob/ba8a99e1/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java index 45484a2..b77316f 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLPrimaryKey.java @@ -46,6 +46,7 @@ import org.slf4j.LoggerFactory; private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)9); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -61,6 +62,7 @@ import org.slf4j.LoggerFactory; private boolean enable_cstr; // required private boolean validate_cstr; // required private boolean rely_cstr; // required + private String catName; // 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 { @@ -71,7 +73,8 @@ import org.slf4j.LoggerFactory; PK_NAME((short)5, "pk_name"), ENABLE_CSTR((short)6, "enable_cstr"), VALIDATE_CSTR((short)7, "validate_cstr"), - RELY_CSTR((short)8, "rely_cstr"); + RELY_CSTR((short)8, "rely_cstr"), + CAT_NAME((short)9, "catName"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -102,6 +105,8 @@ import org.slf4j.LoggerFactory; return VALIDATE_CSTR; case 8: // RELY_CSTR return RELY_CSTR; + case 9: // CAT_NAME + return CAT_NAME; default: return null; } @@ -147,6 +152,7 @@ import org.slf4j.LoggerFactory; private static final int __VALIDATE_CSTR_ISSET_ID = 2; private static final int __RELY_CSTR_ISSET_ID = 3; private byte __isset_bitfield = 0; + private static final _Fields optionals[] = {_Fields.CAT_NAME}; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); @@ -166,6 +172,8 @@ import org.slf4j.LoggerFactory; new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); tmpMap.put(_Fields.RELY_CSTR, new org.apache.thrift.meta_data.FieldMetaData("rely_cstr", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SQLPrimaryKey.class, metaDataMap); } @@ -219,6 +227,9 @@ import org.slf4j.LoggerFactory; this.enable_cstr = other.enable_cstr; this.validate_cstr = other.validate_cstr; this.rely_cstr = other.rely_cstr; + if (other.isSetCatName()) { + this.catName = other.catName; + } } public SQLPrimaryKey deepCopy() { @@ -239,6 +250,7 @@ import org.slf4j.LoggerFactory; this.validate_cstr = false; setRely_cstrIsSet(false); this.rely_cstr = false; + this.catName = null; } public String getTable_db() { @@ -421,6 +433,29 @@ import org.slf4j.LoggerFactory; __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RELY_CSTR_ISSET_ID, value); } + public String getCatName() { + return this.catName; + } + + public void setCatName(String catName) { + this.catName = catName; + } + + public void unsetCatName() { + this.catName = null; + } + + /** Returns true if field catName is set (has been assigned a value) and false otherwise */ + public boolean isSetCatName() { + return this.catName != null; + } + + public void setCatNameIsSet(boolean value) { + if (!value) { + this.catName = null; + } + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case TABLE_DB: @@ -487,6 +522,14 @@ import org.slf4j.LoggerFactory; } break; + case CAT_NAME: + if (value == null) { + unsetCatName(); + } else { + setCatName((String)value); + } + break; + } } @@ -516,6 +559,9 @@ import org.slf4j.LoggerFactory; case RELY_CSTR: return isRely_cstr(); + case CAT_NAME: + return getCatName(); + } throw new IllegalStateException(); } @@ -543,6 +589,8 @@ import org.slf4j.LoggerFactory; return isSetValidate_cstr(); case RELY_CSTR: return isSetRely_cstr(); + case CAT_NAME: + return isSetCatName(); } throw new IllegalStateException(); } @@ -632,6 +680,15 @@ import org.slf4j.LoggerFactory; return false; } + boolean this_present_catName = true && this.isSetCatName(); + boolean that_present_catName = true && that.isSetCatName(); + if (this_present_catName || that_present_catName) { + if (!(this_present_catName && that_present_catName)) + return false; + if (!this.catName.equals(that.catName)) + return false; + } + return true; } @@ -679,6 +736,11 @@ import org.slf4j.LoggerFactory; if (present_rely_cstr) list.add(rely_cstr); + boolean present_catName = true && (isSetCatName()); + list.add(present_catName); + if (present_catName) + list.add(catName); + return list.hashCode(); } @@ -770,6 +832,16 @@ import org.slf4j.LoggerFactory; return lastComparison; } } + lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCatName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName); + if (lastComparison != 0) { + return lastComparison; + } + } return 0; } @@ -837,6 +909,16 @@ import org.slf4j.LoggerFactory; sb.append("rely_cstr:"); sb.append(this.rely_cstr); first = false; + if (isSetCatName()) { + if (!first) sb.append(", "); + sb.append("catName:"); + if (this.catName == null) { + sb.append("null"); + } else { + sb.append(this.catName); + } + first = false; + } sb.append(")"); return sb.toString(); } @@ -946,6 +1028,14 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 9: // CAT_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.catName = iprot.readString(); + struct.setCatNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } @@ -991,6 +1081,13 @@ import org.slf4j.LoggerFactory; oprot.writeFieldBegin(RELY_CSTR_FIELD_DESC); oprot.writeBool(struct.rely_cstr); oprot.writeFieldEnd(); + if (struct.catName != null) { + if (struct.isSetCatName()) { + oprot.writeFieldBegin(CAT_NAME_FIELD_DESC); + oprot.writeString(struct.catName); + oprot.writeFieldEnd(); + } + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1033,7 +1130,10 @@ import org.slf4j.LoggerFactory; if (struct.isSetRely_cstr()) { optionals.set(7); } - oprot.writeBitSet(optionals, 8); + if (struct.isSetCatName()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); if (struct.isSetTable_db()) { oprot.writeString(struct.table_db); } @@ -1058,12 +1158,15 @@ import org.slf4j.LoggerFactory; if (struct.isSetRely_cstr()) { oprot.writeBool(struct.rely_cstr); } + if (struct.isSetCatName()) { + oprot.writeString(struct.catName); + } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, SQLPrimaryKey struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(8); + BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { struct.table_db = iprot.readString(); struct.setTable_dbIsSet(true); @@ -1096,6 +1199,10 @@ import org.slf4j.LoggerFactory; struct.rely_cstr = iprot.readBool(); struct.setRely_cstrIsSet(true); } + if (incoming.get(8)) { + struct.catName = iprot.readString(); + struct.setCatNameIsSet(true); + } } } http://git-wip-us.apache.org/repos/asf/hive/blob/ba8a99e1/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java index 493fded..a25a91c 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SQLUniqueConstraint.java @@ -38,14 +38,15 @@ import org.slf4j.LoggerFactory; @org.apache.hadoop.classification.InterfaceAudience.Public @org.apache.hadoop.classification.InterfaceStability.Stable public class SQLUniqueConstraint implements org.apache.thrift.TBase<SQLUniqueConstraint, SQLUniqueConstraint._Fields>, java.io.Serializable, Cloneable, Comparable<SQLUniqueConstraint> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SQLUniqueConstraint"); - private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", org.apache.thrift.protocol.TType.STRING, (short)1); - private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)2); - private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)3); - private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)4); - private static final org.apache.thrift.protocol.TField UK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("uk_name", org.apache.thrift.protocol.TType.STRING, (short)5); - private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)6); - private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); - private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final org.apache.thrift.protocol.TField CAT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("catName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TABLE_DB_FIELD_DESC = new org.apache.thrift.protocol.TField("table_db", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("table_name", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("column_name", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField KEY_SEQ_FIELD_DESC = new org.apache.thrift.protocol.TField("key_seq", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField UK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("uk_name", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField ENABLE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("enable_cstr", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField VALIDATE_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("validate_cstr", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final org.apache.thrift.protocol.TField RELY_CSTR_FIELD_DESC = new org.apache.thrift.protocol.TField("rely_cstr", org.apache.thrift.protocol.TType.BOOL, (short)9); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { @@ -53,6 +54,7 @@ import org.slf4j.LoggerFactory; schemes.put(TupleScheme.class, new SQLUniqueConstraintTupleSchemeFactory()); } + private String catName; // required private String table_db; // required private String table_name; // required private String column_name; // required @@ -64,14 +66,15 @@ import org.slf4j.LoggerFactory; /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { - TABLE_DB((short)1, "table_db"), - TABLE_NAME((short)2, "table_name"), - COLUMN_NAME((short)3, "column_name"), - KEY_SEQ((short)4, "key_seq"), - UK_NAME((short)5, "uk_name"), - ENABLE_CSTR((short)6, "enable_cstr"), - VALIDATE_CSTR((short)7, "validate_cstr"), - RELY_CSTR((short)8, "rely_cstr"); + CAT_NAME((short)1, "catName"), + TABLE_DB((short)2, "table_db"), + TABLE_NAME((short)3, "table_name"), + COLUMN_NAME((short)4, "column_name"), + KEY_SEQ((short)5, "key_seq"), + UK_NAME((short)6, "uk_name"), + ENABLE_CSTR((short)7, "enable_cstr"), + VALIDATE_CSTR((short)8, "validate_cstr"), + RELY_CSTR((short)9, "rely_cstr"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); @@ -86,21 +89,23 @@ import org.slf4j.LoggerFactory; */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { - case 1: // TABLE_DB + case 1: // CAT_NAME + return CAT_NAME; + case 2: // TABLE_DB return TABLE_DB; - case 2: // TABLE_NAME + case 3: // TABLE_NAME return TABLE_NAME; - case 3: // COLUMN_NAME + case 4: // COLUMN_NAME return COLUMN_NAME; - case 4: // KEY_SEQ + case 5: // KEY_SEQ return KEY_SEQ; - case 5: // UK_NAME + case 6: // UK_NAME return UK_NAME; - case 6: // ENABLE_CSTR + case 7: // ENABLE_CSTR return ENABLE_CSTR; - case 7: // VALIDATE_CSTR + case 8: // VALIDATE_CSTR return VALIDATE_CSTR; - case 8: // RELY_CSTR + case 9: // RELY_CSTR return RELY_CSTR; default: return null; @@ -150,6 +155,8 @@ import org.slf4j.LoggerFactory; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.CAT_NAME, new org.apache.thrift.meta_data.FieldMetaData("catName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE_DB, new org.apache.thrift.meta_data.FieldMetaData("table_db", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("table_name", org.apache.thrift.TFieldRequirementType.DEFAULT, @@ -174,6 +181,7 @@ import org.slf4j.LoggerFactory; } public SQLUniqueConstraint( + String catName, String table_db, String table_name, String column_name, @@ -184,6 +192,7 @@ import org.slf4j.LoggerFactory; boolean rely_cstr) { this(); + this.catName = catName; this.table_db = table_db; this.table_name = table_name; this.column_name = column_name; @@ -203,6 +212,9 @@ import org.slf4j.LoggerFactory; */ public SQLUniqueConstraint(SQLUniqueConstraint other) { __isset_bitfield = other.__isset_bitfield; + if (other.isSetCatName()) { + this.catName = other.catName; + } if (other.isSetTable_db()) { this.table_db = other.table_db; } @@ -227,6 +239,7 @@ import org.slf4j.LoggerFactory; @Override public void clear() { + this.catName = null; this.table_db = null; this.table_name = null; this.column_name = null; @@ -241,6 +254,29 @@ import org.slf4j.LoggerFactory; this.rely_cstr = false; } + public String getCatName() { + return this.catName; + } + + public void setCatName(String catName) { + this.catName = catName; + } + + public void unsetCatName() { + this.catName = null; + } + + /** Returns true if field catName is set (has been assigned a value) and false otherwise */ + public boolean isSetCatName() { + return this.catName != null; + } + + public void setCatNameIsSet(boolean value) { + if (!value) { + this.catName = null; + } + } + public String getTable_db() { return this.table_db; } @@ -423,6 +459,14 @@ import org.slf4j.LoggerFactory; public void setFieldValue(_Fields field, Object value) { switch (field) { + case CAT_NAME: + if (value == null) { + unsetCatName(); + } else { + setCatName((String)value); + } + break; + case TABLE_DB: if (value == null) { unsetTable_db(); @@ -492,6 +536,9 @@ import org.slf4j.LoggerFactory; public Object getFieldValue(_Fields field) { switch (field) { + case CAT_NAME: + return getCatName(); + case TABLE_DB: return getTable_db(); @@ -527,6 +574,8 @@ import org.slf4j.LoggerFactory; } switch (field) { + case CAT_NAME: + return isSetCatName(); case TABLE_DB: return isSetTable_db(); case TABLE_NAME: @@ -560,6 +609,15 @@ import org.slf4j.LoggerFactory; if (that == null) return false; + boolean this_present_catName = true && this.isSetCatName(); + boolean that_present_catName = true && that.isSetCatName(); + if (this_present_catName || that_present_catName) { + if (!(this_present_catName && that_present_catName)) + return false; + if (!this.catName.equals(that.catName)) + return false; + } + boolean this_present_table_db = true && this.isSetTable_db(); boolean that_present_table_db = true && that.isSetTable_db(); if (this_present_table_db || that_present_table_db) { @@ -639,6 +697,11 @@ import org.slf4j.LoggerFactory; public int hashCode() { List<Object> list = new ArrayList<Object>(); + boolean present_catName = true && (isSetCatName()); + list.add(present_catName); + if (present_catName) + list.add(catName); + boolean present_table_db = true && (isSetTable_db()); list.add(present_table_db); if (present_table_db) @@ -690,6 +753,16 @@ import org.slf4j.LoggerFactory; int lastComparison = 0; + lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCatName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName); + if (lastComparison != 0) { + return lastComparison; + } + } lastComparison = Boolean.valueOf(isSetTable_db()).compareTo(other.isSetTable_db()); if (lastComparison != 0) { return lastComparison; @@ -790,6 +863,14 @@ import org.slf4j.LoggerFactory; StringBuilder sb = new StringBuilder("SQLUniqueConstraint("); boolean first = true; + sb.append("catName:"); + if (this.catName == null) { + sb.append("null"); + } else { + sb.append(this.catName); + } + first = false; + if (!first) sb.append(", "); sb.append("table_db:"); if (this.table_db == null) { sb.append("null"); @@ -882,7 +963,15 @@ import org.slf4j.LoggerFactory; break; } switch (schemeField.id) { - case 1: // TABLE_DB + case 1: // CAT_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.catName = iprot.readString(); + struct.setCatNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TABLE_DB if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_db = iprot.readString(); struct.setTable_dbIsSet(true); @@ -890,7 +979,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 2: // TABLE_NAME + case 3: // TABLE_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); @@ -898,7 +987,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 3: // COLUMN_NAME + case 4: // COLUMN_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.column_name = iprot.readString(); struct.setColumn_nameIsSet(true); @@ -906,7 +995,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 4: // KEY_SEQ + case 5: // KEY_SEQ if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.key_seq = iprot.readI32(); struct.setKey_seqIsSet(true); @@ -914,7 +1003,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 5: // UK_NAME + case 6: // UK_NAME if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.uk_name = iprot.readString(); struct.setUk_nameIsSet(true); @@ -922,7 +1011,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 6: // ENABLE_CSTR + case 7: // ENABLE_CSTR if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.enable_cstr = iprot.readBool(); struct.setEnable_cstrIsSet(true); @@ -930,7 +1019,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 7: // VALIDATE_CSTR + case 8: // VALIDATE_CSTR if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.validate_cstr = iprot.readBool(); struct.setValidate_cstrIsSet(true); @@ -938,7 +1027,7 @@ import org.slf4j.LoggerFactory; org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; - case 8: // RELY_CSTR + case 9: // RELY_CSTR if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.rely_cstr = iprot.readBool(); struct.setRely_cstrIsSet(true); @@ -959,6 +1048,11 @@ import org.slf4j.LoggerFactory; struct.validate(); oprot.writeStructBegin(STRUCT_DESC); + if (struct.catName != null) { + oprot.writeFieldBegin(CAT_NAME_FIELD_DESC); + oprot.writeString(struct.catName); + oprot.writeFieldEnd(); + } if (struct.table_db != null) { oprot.writeFieldBegin(TABLE_DB_FIELD_DESC); oprot.writeString(struct.table_db); @@ -1009,31 +1103,37 @@ import org.slf4j.LoggerFactory; public void write(org.apache.thrift.protocol.TProtocol prot, SQLUniqueConstraint struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); - if (struct.isSetTable_db()) { + if (struct.isSetCatName()) { optionals.set(0); } - if (struct.isSetTable_name()) { + if (struct.isSetTable_db()) { optionals.set(1); } - if (struct.isSetColumn_name()) { + if (struct.isSetTable_name()) { optionals.set(2); } - if (struct.isSetKey_seq()) { + if (struct.isSetColumn_name()) { optionals.set(3); } - if (struct.isSetUk_name()) { + if (struct.isSetKey_seq()) { optionals.set(4); } - if (struct.isSetEnable_cstr()) { + if (struct.isSetUk_name()) { optionals.set(5); } - if (struct.isSetValidate_cstr()) { + if (struct.isSetEnable_cstr()) { optionals.set(6); } - if (struct.isSetRely_cstr()) { + if (struct.isSetValidate_cstr()) { optionals.set(7); } - oprot.writeBitSet(optionals, 8); + if (struct.isSetRely_cstr()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetCatName()) { + oprot.writeString(struct.catName); + } if (struct.isSetTable_db()) { oprot.writeString(struct.table_db); } @@ -1063,36 +1163,40 @@ import org.slf4j.LoggerFactory; @Override public void read(org.apache.thrift.protocol.TProtocol prot, SQLUniqueConstraint struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - BitSet incoming = iprot.readBitSet(8); + BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { + struct.catName = iprot.readString(); + struct.setCatNameIsSet(true); + } + if (incoming.get(1)) { struct.table_db = iprot.readString(); struct.setTable_dbIsSet(true); } - if (incoming.get(1)) { + if (incoming.get(2)) { struct.table_name = iprot.readString(); struct.setTable_nameIsSet(true); } - if (incoming.get(2)) { + if (incoming.get(3)) { struct.column_name = iprot.readString(); struct.setColumn_nameIsSet(true); } - if (incoming.get(3)) { + if (incoming.get(4)) { struct.key_seq = iprot.readI32(); struct.setKey_seqIsSet(true); } - if (incoming.get(4)) { + if (incoming.get(5)) { struct.uk_name = iprot.readString(); struct.setUk_nameIsSet(true); } - if (incoming.get(5)) { + if (incoming.get(6)) { struct.enable_cstr = iprot.readBool(); struct.setEnable_cstrIsSet(true); } - if (incoming.get(6)) { + if (incoming.get(7)) { struct.validate_cstr = iprot.readBool(); struct.setValidate_cstrIsSet(true); } - if (incoming.get(7)) { + if (incoming.get(8)) { struct.rely_cstr = iprot.readBool(); struct.setRely_cstrIsSet(true); } http://git-wip-us.apache.org/repos/asf/hive/blob/ba8a99e1/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java index 3f39bd5..d49f1c4 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java @@ -445,14 +445,14 @@ import org.slf4j.LoggerFactory; case 1: // FIELD_SCHEMAS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list284 = iprot.readListBegin(); - struct.fieldSchemas = new ArrayList<FieldSchema>(_list284.size); - FieldSchema _elem285; - for (int _i286 = 0; _i286 < _list284.size; ++_i286) + org.apache.thrift.protocol.TList _list292 = iprot.readListBegin(); + struct.fieldSchemas = new ArrayList<FieldSchema>(_list292.size); + FieldSchema _elem293; + for (int _i294 = 0; _i294 < _list292.size; ++_i294) { - _elem285 = new FieldSchema(); - _elem285.read(iprot); - struct.fieldSchemas.add(_elem285); + _elem293 = new FieldSchema(); + _elem293.read(iprot); + struct.fieldSchemas.add(_elem293); } iprot.readListEnd(); } @@ -464,15 +464,15 @@ import org.slf4j.LoggerFactory; case 2: // PROPERTIES if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { { - org.apache.thrift.protocol.TMap _map287 = iprot.readMapBegin(); - struct.properties = new HashMap<String,String>(2*_map287.size); - String _key288; - String _val289; - for (int _i290 = 0; _i290 < _map287.size; ++_i290) + org.apache.thrift.protocol.TMap _map295 = iprot.readMapBegin(); + struct.properties = new HashMap<String,String>(2*_map295.size); + String _key296; + String _val297; + for (int _i298 = 0; _i298 < _map295.size; ++_i298) { - _key288 = iprot.readString(); - _val289 = iprot.readString(); - struct.properties.put(_key288, _val289); + _key296 = iprot.readString(); + _val297 = iprot.readString(); + struct.properties.put(_key296, _val297); } iprot.readMapEnd(); } @@ -498,9 +498,9 @@ import org.slf4j.LoggerFactory; oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.fieldSchemas.size())); - for (FieldSchema _iter291 : struct.fieldSchemas) + for (FieldSchema _iter299 : struct.fieldSchemas) { - _iter291.write(oprot); + _iter299.write(oprot); } oprot.writeListEnd(); } @@ -510,10 +510,10 @@ import org.slf4j.LoggerFactory; oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); { oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.properties.size())); - for (Map.Entry<String, String> _iter292 : struct.properties.entrySet()) + for (Map.Entry<String, String> _iter300 : struct.properties.entrySet()) { - oprot.writeString(_iter292.getKey()); - oprot.writeString(_iter292.getValue()); + oprot.writeString(_iter300.getKey()); + oprot.writeString(_iter300.getValue()); } oprot.writeMapEnd(); } @@ -547,19 +547,19 @@ import org.slf4j.LoggerFactory; if (struct.isSetFieldSchemas()) { { oprot.writeI32(struct.fieldSchemas.size()); - for (FieldSchema _iter293 : struct.fieldSchemas) + for (FieldSchema _iter301 : struct.fieldSchemas) { - _iter293.write(oprot); + _iter301.write(oprot); } } } if (struct.isSetProperties()) { { oprot.writeI32(struct.properties.size()); - for (Map.Entry<String, String> _iter294 : struct.properties.entrySet()) + for (Map.Entry<String, String> _iter302 : struct.properties.entrySet()) { - oprot.writeString(_iter294.getKey()); - oprot.writeString(_iter294.getValue()); + oprot.writeString(_iter302.getKey()); + oprot.writeString(_iter302.getValue()); } } } @@ -571,29 +571,29 @@ import org.slf4j.LoggerFactory; BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { { - org.apache.thrift.protocol.TList _list295 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.fieldSchemas = new ArrayList<FieldSchema>(_list295.size); - FieldSchema _elem296; - for (int _i297 = 0; _i297 < _list295.size; ++_i297) + org.apache.thrift.protocol.TList _list303 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.fieldSchemas = new ArrayList<FieldSchema>(_list303.size); + FieldSchema _elem304; + for (int _i305 = 0; _i305 < _list303.size; ++_i305) { - _elem296 = new FieldSchema(); - _elem296.read(iprot); - struct.fieldSchemas.add(_elem296); + _elem304 = new FieldSchema(); + _elem304.read(iprot); + struct.fieldSchemas.add(_elem304); } } struct.setFieldSchemasIsSet(true); } if (incoming.get(1)) { { - org.apache.thrift.protocol.TMap _map298 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); - struct.properties = new HashMap<String,String>(2*_map298.size); - String _key299; - String _val300; - for (int _i301 = 0; _i301 < _map298.size; ++_i301) + org.apache.thrift.protocol.TMap _map306 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.properties = new HashMap<String,String>(2*_map306.size); + String _key307; + String _val308; + for (int _i309 = 0; _i309 < _map306.size; ++_i309) { - _key299 = iprot.readString(); - _val300 = iprot.readString(); - struct.properties.put(_key299, _val300); + _key307 = iprot.readString(); + _val308 = iprot.readString(); + struct.properties.put(_key307, _val308); } } struct.setPropertiesIsSet(true); http://git-wip-us.apache.org/repos/asf/hive/blob/ba8a99e1/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java ---------------------------------------------------------------------- diff --git a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java index 50efdbd..da919d7 100644 --- a/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java +++ b/standalone-metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/SchemaVersion.java @@ -1119,14 +1119,14 @@ import org.slf4j.LoggerFactory; case 4: // COLS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { - org.apache.thrift.protocol.TList _list880 = iprot.readListBegin(); - struct.cols = new ArrayList<FieldSchema>(_list880.size); - FieldSchema _elem881; - for (int _i882 = 0; _i882 < _list880.size; ++_i882) + org.apache.thrift.protocol.TList _list888 = iprot.readListBegin(); + struct.cols = new ArrayList<FieldSchema>(_list888.size); + FieldSchema _elem889; + for (int _i890 = 0; _i890 < _list888.size; ++_i890) { - _elem881 = new FieldSchema(); - _elem881.read(iprot); - struct.cols.add(_elem881); + _elem889 = new FieldSchema(); + _elem889.read(iprot); + struct.cols.add(_elem889); } iprot.readListEnd(); } @@ -1212,9 +1212,9 @@ import org.slf4j.LoggerFactory; oprot.writeFieldBegin(COLS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.cols.size())); - for (FieldSchema _iter883 : struct.cols) + for (FieldSchema _iter891 : struct.cols) { - _iter883.write(oprot); + _iter891.write(oprot); } oprot.writeListEnd(); } @@ -1323,9 +1323,9 @@ import org.slf4j.LoggerFactory; if (struct.isSetCols()) { { oprot.writeI32(struct.cols.size()); - for (FieldSchema _iter884 : struct.cols) + for (FieldSchema _iter892 : struct.cols) { - _iter884.write(oprot); + _iter892.write(oprot); } } } @@ -1368,14 +1368,14 @@ import org.slf4j.LoggerFactory; } if (incoming.get(3)) { { - org.apache.thrift.protocol.TList _list885 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); - struct.cols = new ArrayList<FieldSchema>(_list885.size); - FieldSchema _elem886; - for (int _i887 = 0; _i887 < _list885.size; ++_i887) + org.apache.thrift.protocol.TList _list893 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.cols = new ArrayList<FieldSchema>(_list893.size); + FieldSchema _elem894; + for (int _i895 = 0; _i895 < _list893.size; ++_i895) { - _elem886 = new FieldSchema(); - _elem886.read(iprot); - struct.cols.add(_elem886); + _elem894 = new FieldSchema(); + _elem894.read(iprot); + struct.cols.add(_elem894); } } struct.setColsIsSet(true);
