public Object getFieldValue(_Fields field) { switch (field) { case SCHEMA_EVOLUTION_HISTORY: return getSchema_evolution_history(); } throw new IllegalStateException(); }
public SchemaEvolution deepCopy() { return new SchemaEvolution(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof SchemaEvolution) return this.equals((SchemaEvolution)that); return false; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case SCHEMA_EVOLUTION_HISTORY: if (value == null) { unsetSchema_evolution_history(); } else { setSchema_evolution_history((List<SchemaEvolutionEntry>)value); } break; } }
case 3: // SCHEMA_EVOLUTION if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.schema_evolution = new SchemaEvolution(); struct.schema_evolution.read(iprot); struct.setSchema_evolutionIsSet(true); } else {
struct.setSchema_evolution_historyIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
public boolean equals(SchemaEvolution that) { if (that == null) return false; boolean this_present_schema_evolution_history = true && this.isSetSchema_evolution_history(); boolean that_present_schema_evolution_history = true && that.isSetSchema_evolution_history(); if (this_present_schema_evolution_history || that_present_schema_evolution_history) { if (!(this_present_schema_evolution_history && that_present_schema_evolution_history)) return false; if (!this.schema_evolution_history.equals(that.schema_evolution_history)) return false; } return true; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, 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); } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (schema_evolution_history == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'schema_evolution_history' was not present! Struct: " + toString()); } // check for sub-struct validity }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, SchemaEvolution struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.schema_evolution_history = new ArrayList<SchemaEvolutionEntry>(_list47.size); SchemaEvolutionEntry _elem48; for (int _i49 = 0; _i49 < _list47.size; ++_i49) { _elem48 = new SchemaEvolutionEntry(); _elem48.read(iprot); struct.schema_evolution_history.add(_elem48); } } struct.setSchema_evolution_historyIsSet(true); } }
struct.schema_evolution = new SchemaEvolution(); struct.schema_evolution.read(iprot); struct.setSchema_evolutionIsSet(true); BitSet incoming = iprot.readBitSet(4);
/** 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 IllegalArgumentException(); } switch (field) { case SCHEMA_EVOLUTION_HISTORY: return isSetSchema_evolution_history(); } throw new IllegalStateException(); }
@Override public SchemaEvolution fromExternalToWrapperSchemaEvolution( org.apache.carbondata.format.SchemaEvolution externalSchemaEvolution) { List<SchemaEvolutionEntry> wrapperSchemaEvolEntryList = new ArrayList<SchemaEvolutionEntry>(); for (org.apache.carbondata.format.SchemaEvolutionEntry schemaEvolutionEntry : externalSchemaEvolution.getSchema_evolution_history()) { wrapperSchemaEvolEntryList .add(fromExternalToWrapperSchemaEvolutionEntry(schemaEvolutionEntry)); } SchemaEvolution wrapperSchemaEvolution = new SchemaEvolution(); wrapperSchemaEvolution.setSchemaEvolutionEntryList(wrapperSchemaEvolEntryList); return wrapperSchemaEvolution; }
@Override public org.apache.carbondata.format.SchemaEvolution fromWrapperToExternalSchemaEvolution( SchemaEvolution wrapperSchemaEvolution) { List<org.apache.carbondata.format.SchemaEvolutionEntry> thriftSchemaEvolEntryList = new ArrayList<org.apache.carbondata.format.SchemaEvolutionEntry>(); for (SchemaEvolutionEntry schemaEvolutionEntry : wrapperSchemaEvolution .getSchemaEvolutionEntryList()) { thriftSchemaEvolEntryList .add(fromWrapperToExternalSchemaEvolutionEntry(schemaEvolutionEntry)); } return new org.apache.carbondata.format.SchemaEvolution(thriftSchemaEvolEntryList); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_schema_evolution_history = true && (isSetSchema_evolution_history()); list.add(present_schema_evolution_history); if (present_schema_evolution_history) list.add(schema_evolution_history); return list.hashCode(); }
if (!(this_present_schema_evolution && that_present_schema_evolution)) return false; if (!this.schema_evolution.equals(that.schema_evolution)) return false;
@Override public TableInfo fromExternalToWrapperTableInfo( org.apache.carbondata.format.TableInfo externalTableInfo, String dbName, String tableName, String tablePath) { TableInfo wrapperTableInfo = new TableInfo(); List<org.apache.carbondata.format.SchemaEvolutionEntry> schemaEvolutionList = externalTableInfo.getFact_table().getSchema_evolution().getSchema_evolution_history(); wrapperTableInfo.setLastUpdatedTime( schemaEvolutionList.get(schemaEvolutionList.size() - 1).getTime_stamp()); wrapperTableInfo.setDatabaseName(dbName); wrapperTableInfo.setTableUniqueName(CarbonTable.buildUniqueName(dbName, tableName)); wrapperTableInfo.setFactTable( fromExternalToWrapperTableSchema(externalTableInfo.getFact_table(), tableName)); if (null != externalTableInfo.getDataMapSchemas()) { wrapperTableInfo.setDataMapSchemaList( fromExternalToWrapperChildSchemaList(externalTableInfo.getDataMapSchemas())); } wrapperTableInfo.setTablePath(tablePath); return wrapperTableInfo; }
this.schema_evolution = new SchemaEvolution(other.schema_evolution);
/** * Performs a deep copy on <i>other</i>. */ public SchemaEvolution(SchemaEvolution other) { if (other.isSetSchema_evolution_history()) { List<SchemaEvolutionEntry> __this__schema_evolution_history = new ArrayList<SchemaEvolutionEntry>(other.schema_evolution_history.size()); for (SchemaEvolutionEntry other_element : other.schema_evolution_history) { __this__schema_evolution_history.add(new SchemaEvolutionEntry(other_element)); } this.schema_evolution_history = __this__schema_evolution_history; } }
org.apache.carbondata.format.SchemaEvolutionEntry schemaEvolutionEntry = new org.apache.carbondata.format.SchemaEvolutionEntry(tableInfo.getLastUpdatedTime()); thriftTableInfo.getFact_table().getSchema_evolution().getSchema_evolution_history() .add(schemaEvolutionEntry);