public SchemaEvolutionEntry deepCopy() { return new SchemaEvolutionEntry(this); }
public Object getFieldValue(_Fields field) { switch (field) { case TIME_STAMP: return getTime_stamp(); case ADDED: return getAdded(); case REMOVED: return getRemoved(); case TABLE_NAME: return getTableName(); } throw new IllegalStateException(); }
case TIME_STAMP: if (value == null) { unsetTime_stamp(); } else { setTime_stamp((Long)value); unsetAdded(); } else { setAdded((List<ColumnSchema>)value); unsetRemoved(); } else { setRemoved((List<ColumnSchema>)value); unsetTableName(); } else { setTableName((String)value);
/** 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 TIME_STAMP: return isSetTime_stamp(); case ADDED: return isSetAdded(); case REMOVED: return isSetRemoved(); case TABLE_NAME: return isSetTableName(); } throw new IllegalStateException(); }
@Override public org.apache.carbondata.format.SchemaEvolutionEntry fromWrapperToExternalSchemaEvolutionEntry(SchemaEvolutionEntry wrapperSchemaEvolutionEntry) { org.apache.carbondata.format.SchemaEvolutionEntry thriftSchemaEvolutionEntry = new org.apache.carbondata.format.SchemaEvolutionEntry( wrapperSchemaEvolutionEntry.getTimeStamp()); if (null != wrapperSchemaEvolutionEntry.getAdded()) { List<org.apache.carbondata.format.ColumnSchema> thriftAddedColumns = new ArrayList<org.apache.carbondata.format.ColumnSchema>(); for (ColumnSchema wrapperColumnSchema : wrapperSchemaEvolutionEntry.getAdded()) { thriftAddedColumns.add(fromWrapperToExternalColumnSchema(wrapperColumnSchema)); } thriftSchemaEvolutionEntry.setAdded(thriftAddedColumns); } if (null != wrapperSchemaEvolutionEntry.getRemoved()) { List<org.apache.carbondata.format.ColumnSchema> thriftRemovedColumns = new ArrayList<org.apache.carbondata.format.ColumnSchema>(); for (ColumnSchema wrapperColumnSchema : wrapperSchemaEvolutionEntry.getRemoved()) { thriftRemovedColumns.add(fromWrapperToExternalColumnSchema(wrapperColumnSchema)); } thriftSchemaEvolutionEntry.setRemoved(thriftRemovedColumns); } return thriftSchemaEvolutionEntry; }
@Override public SchemaEvolutionEntry fromExternalToWrapperSchemaEvolutionEntry( org.apache.carbondata.format.SchemaEvolutionEntry externalSchemaEvolutionEntry) { SchemaEvolutionEntry wrapperSchemaEvolutionEntry = new SchemaEvolutionEntry(); wrapperSchemaEvolutionEntry.setTimeStamp(externalSchemaEvolutionEntry.getTime_stamp()); List<ColumnSchema> wrapperAddedColumns = new ArrayList<ColumnSchema>(); if (null != externalSchemaEvolutionEntry.getAdded()) { for (org.apache.carbondata.format.ColumnSchema externalColumnSchema : externalSchemaEvolutionEntry.getAdded()) { wrapperAddedColumns.add(fromExternalToWrapperColumnSchema(externalColumnSchema)); } } List<ColumnSchema> wrapperRemovedColumns = new ArrayList<ColumnSchema>(); if (null != externalSchemaEvolutionEntry.getRemoved()) { for (org.apache.carbondata.format.ColumnSchema externalColumnSchema : externalSchemaEvolutionEntry.getRemoved()) { wrapperRemovedColumns.add(fromExternalToWrapperColumnSchema(externalColumnSchema)); } } wrapperSchemaEvolutionEntry.setAdded(wrapperAddedColumns); wrapperSchemaEvolutionEntry.setRemoved(wrapperRemovedColumns); return wrapperSchemaEvolutionEntry; }
boolean this_present_added = true && this.isSetAdded(); boolean that_present_added = true && that.isSetAdded(); if (this_present_added || that_present_added) { if (!(this_present_added && that_present_added)) boolean this_present_removed = true && this.isSetRemoved(); boolean that_present_removed = true && that.isSetRemoved(); if (this_present_removed || that_present_removed) { if (!(this_present_removed && that_present_removed)) boolean this_present_tableName = true && this.isSetTableName(); boolean that_present_tableName = true && that.isSetTableName(); if (this_present_tableName || that_present_tableName) { if (!(this_present_tableName && that_present_tableName))
@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); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, SchemaEvolutionEntry struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeFieldEnd(); if (struct.added != null) { if (struct.isSetAdded()) { oprot.writeFieldBegin(ADDED_FIELD_DESC); if (struct.isSetRemoved()) { oprot.writeFieldBegin(REMOVED_FIELD_DESC); if (struct.isSetTableName()) { oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); oprot.writeString(struct.tableName);
@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; }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof SchemaEvolutionEntry) return this.equals((SchemaEvolutionEntry)that); return false; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_time_stamp = true; list.add(present_time_stamp); if (present_time_stamp) list.add(time_stamp); boolean present_added = true && (isSetAdded()); list.add(present_added); if (present_added) list.add(added); boolean present_removed = true && (isSetRemoved()); list.add(present_removed); if (present_removed) list.add(removed); boolean present_tableName = true && (isSetTableName()); list.add(present_tableName); if (present_tableName) list.add(tableName); return list.hashCode(); }
for (int _i44 = 0; _i44 < _list42.size; ++_i44) _elem43 = new SchemaEvolutionEntry(); _elem43.read(iprot); struct.schema_evolution_history.add(_elem43);
lastComparison = Boolean.valueOf(isSetTime_stamp()).compareTo(other.isSetTime_stamp()); if (lastComparison != 0) { return lastComparison; if (isSetTime_stamp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time_stamp, other.time_stamp); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetAdded()).compareTo(other.isSetAdded()); if (lastComparison != 0) { return lastComparison; if (isSetAdded()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.added, other.added); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetRemoved()).compareTo(other.isSetRemoved()); if (lastComparison != 0) { return lastComparison; if (isSetRemoved()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.removed, other.removed); if (lastComparison != 0) { lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); if (lastComparison != 0) { return lastComparison; if (isSetTableName()) {
/** * Performs a deep copy on <i>other</i>. */ public SchemaEvolutionEntry(SchemaEvolutionEntry other) { __isset_bitfield = other.__isset_bitfield; this.time_stamp = other.time_stamp; if (other.isSetAdded()) { List<ColumnSchema> __this__added = new ArrayList<ColumnSchema>(other.added.size()); for (ColumnSchema other_element : other.added) { __this__added.add(new ColumnSchema(other_element)); } this.added = __this__added; } if (other.isSetRemoved()) { List<ColumnSchema> __this__removed = new ArrayList<ColumnSchema>(other.removed.size()); for (ColumnSchema other_element : other.removed) { __this__removed.add(new ColumnSchema(other_element)); } this.removed = __this__removed; } if (other.isSetTableName()) { this.tableName = other.tableName; } }
/** * 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; } }
sb.append(this.time_stamp); first = false; if (isSetAdded()) { if (!first) sb.append(", "); sb.append("added:"); if (isSetRemoved()) { if (!first) sb.append(", "); sb.append("removed:"); if (isSetTableName()) { if (!first) sb.append(", "); sb.append("tableName:");
tableInfo.getFactTable().getTableName()); org.apache.carbondata.format.SchemaEvolutionEntry schemaEvolutionEntry = new org.apache.carbondata.format.SchemaEvolutionEntry(tableInfo.getLastUpdatedTime()); thriftTableInfo.getFact_table().getSchema_evolution().getSchema_evolution_history() .add(schemaEvolutionEntry);
oprot.writeI64(struct.time_stamp); BitSet optionals = new BitSet(); if (struct.isSetAdded()) { optionals.set(0); if (struct.isSetRemoved()) { optionals.set(1); if (struct.isSetTableName()) { optionals.set(2); if (struct.isSetAdded()) { if (struct.isSetRemoved()) { if (struct.isSetTableName()) { oprot.writeString(struct.tableName);