@Override public void read(org.apache.thrift.protocol.TProtocol prot, BucketingInfo struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; { org.apache.thrift.protocol.TList _list95 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.table_columns = new ArrayList<ColumnSchema>(_list95.size); ColumnSchema _elem96; for (int _i97 = 0; _i97 < _list95.size; ++_i97) { _elem96 = new ColumnSchema(); _elem96.read(iprot); struct.table_columns.add(_elem96); } } struct.setTable_columnsIsSet(true); struct.number_of_buckets = iprot.readI32(); struct.setNumber_of_bucketsIsSet(true); } }
public Object getFieldValue(_Fields field) { switch (field) { case DATA_TYPE: return getData_type(); return getColumn_name(); return getColumn_id(); return isColumnar(); return getEncoders(); return isDimension(); return getColumn_group_id(); return getScale(); return getPrecision(); return getNum_child(); return getAggregate_function(); return getDefault_value(); return getColumnProperties(); return isInvisible();
new org.apache.carbondata.format.ColumnSchema( fromWrapperToExternalDataType( wrapperColumnSchema.getDataType()), encoders, wrapperColumnSchema.isDimensionColumn()); thriftColumnSchema.setColumn_group_id(-1); if (DataTypes.isDecimal(wrapperColumnSchema.getDataType())) { thriftColumnSchema.setScale(wrapperColumnSchema.getScale()); thriftColumnSchema.setPrecision(wrapperColumnSchema.getPrecision()); } else { thriftColumnSchema.setScale(-1); thriftColumnSchema.setPrecision(-1); thriftColumnSchema.setNum_child(wrapperColumnSchema.getNumberOfChild()); thriftColumnSchema.setDefault_value(wrapperColumnSchema.getDefaultValue()); thriftColumnSchema.setColumnProperties(wrapperColumnSchema.getColumnProperties()); thriftColumnSchema.setInvisible(wrapperColumnSchema.isInvisible()); thriftColumnSchema.setColumnReferenceId(wrapperColumnSchema.getColumnReferenceId()); thriftColumnSchema.setSchemaOrdinal(wrapperColumnSchema.getSchemaOrdinal()); if (wrapperColumnSchema.isSortColumn()) { Map<String, String> properties = wrapperColumnSchema.getColumnProperties(); if (null == properties) { properties = new HashMap<String, String>(); thriftColumnSchema.setColumnProperties(properties); thriftColumnSchema.setAggregate_function(wrapperColumnSchema.getAggFunction()); } else if (null != wrapperColumnSchema.getTimeSeriesFunction() && !wrapperColumnSchema .getTimeSeriesFunction().isEmpty()) {
public ColumnSchema deepCopy() { return new ColumnSchema(this); }
/** * Performs a deep copy on <i>other</i>. */ public BucketingInfo(BucketingInfo other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetTable_columns()) { List<ColumnSchema> __this__table_columns = new ArrayList<ColumnSchema>(other.table_columns.size()); for (ColumnSchema other_element : other.table_columns) { __this__table_columns.add(new ColumnSchema(other_element)); } this.table_columns = __this__table_columns; } this.number_of_buckets = other.number_of_buckets; }
public static ColumnSchema thriftColumnSchemaToWrapperColumnSchema( org.apache.carbondata.format.ColumnSchema externalColumnSchema) { ColumnSchema wrapperColumnSchema = new ColumnSchema(); wrapperColumnSchema.setColumnUniqueId(externalColumnSchema.getColumn_id()); wrapperColumnSchema.setColumnReferenceId(externalColumnSchema.getColumnReferenceId()); wrapperColumnSchema.setColumnName(externalColumnSchema.getColumn_name()); DataType dataType = thriftDataTypeToWrapperDataType(externalColumnSchema.data_type); if (DataTypes.isDecimal(dataType)) { DecimalType decimalType = (DecimalType) dataType; decimalType.setPrecision(externalColumnSchema.getPrecision()); decimalType.setScale(externalColumnSchema.getScale()); wrapperColumnSchema.setDimensionColumn(externalColumnSchema.isDimension()); List<Encoding> encoders = new ArrayList<Encoding>(); for (org.apache.carbondata.format.Encoding encoder : externalColumnSchema.getEncoders()) { encoders.add(fromExternalToWrapperEncoding(encoder)); wrapperColumnSchema.setNumberOfChild(externalColumnSchema.getNum_child()); wrapperColumnSchema.setPrecision(externalColumnSchema.getPrecision()); wrapperColumnSchema.setScale(externalColumnSchema.getScale()); wrapperColumnSchema.setDefaultValue(externalColumnSchema.getDefault_value()); wrapperColumnSchema.setSchemaOrdinal(externalColumnSchema.getSchemaOrdinal()); Map<String, String> properties = externalColumnSchema.getColumnProperties(); if (properties != null) { if (properties.get(CarbonCommonConstants.SORT_COLUMNS) != null) { wrapperColumnSchema.setFunction(externalColumnSchema.getAggregate_function()); List<org.apache.carbondata.format.ParentColumnTableRelation> parentColumnTableRelation = externalColumnSchema.getParentColumnTableRelations(); if (null != parentColumnTableRelation) {
for (int _i38 = 0; _i38 < _list36.size; ++_i38) _elem37 = new ColumnSchema(); _elem37.read(iprot); struct.added.add(_elem37); for (int _i41 = 0; _i41 < _list39.size; ++_i41) _elem40 = new ColumnSchema(); _elem40.read(iprot); struct.removed.add(_elem40);
/** * 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; } }
protected ColumnSchema thriftColumnSchemaToWrapperColumnSchema( org.apache.carbondata.format.ColumnSchema externalColumnSchema) { ColumnSchema wrapperColumnSchema = new ColumnSchema(); wrapperColumnSchema.setColumnUniqueId(externalColumnSchema.getColumn_id()); wrapperColumnSchema.setColumnName(externalColumnSchema.getColumn_name()); DataType dataType = CarbonUtil.thriftDataTypeToWrapperDataType(externalColumnSchema.data_type); if (DataTypes.isDecimal(dataType)) { DecimalType decimalType = (DecimalType) dataType; decimalType.setPrecision(externalColumnSchema.getPrecision()); decimalType.setScale(externalColumnSchema.getScale()); wrapperColumnSchema.setDimensionColumn(externalColumnSchema.isDimension()); List<Encoding> encoders = new ArrayList<Encoding>(); for (org.apache.carbondata.format.Encoding encoder : externalColumnSchema.getEncoders()) { encoders.add(fromExternalToWrapperEncoding(encoder)); wrapperColumnSchema.setNumberOfChild(externalColumnSchema.getNum_child()); wrapperColumnSchema.setPrecision(externalColumnSchema.getPrecision()); wrapperColumnSchema.setScale(externalColumnSchema.getScale()); wrapperColumnSchema.setDefaultValue(externalColumnSchema.getDefault_value()); Map<String, String> properties = externalColumnSchema.getColumnProperties(); if (properties != null) { if (properties.get(CarbonCommonConstants.SORT_COLUMNS) != null) { wrapperColumnSchema.setFunction(externalColumnSchema.getAggregate_function()); List<org.apache.carbondata.format.ParentColumnTableRelation> parentColumnTableRelation = externalColumnSchema.getParentColumnTableRelations(); if (null != parentColumnTableRelation) { wrapperColumnSchema.setParentColumnTableRelations(
for (int _i92 = 0; _i92 < _list90.size; ++_i92) _elem91 = new ColumnSchema(); _elem91.read(iprot); struct.table_columns.add(_elem91);
/** * Performs a deep copy on <i>other</i>. */ public IndexHeader(IndexHeader other) { __isset_bitfield = other.__isset_bitfield; this.version = other.version; if (other.isSetTable_columns()) { List<org.apache.carbondata.format.ColumnSchema> __this__table_columns = new ArrayList<org.apache.carbondata.format.ColumnSchema>(other.table_columns.size()); for (org.apache.carbondata.format.ColumnSchema other_element : other.table_columns) { __this__table_columns.add(new org.apache.carbondata.format.ColumnSchema(other_element)); } this.table_columns = __this__table_columns; } if (other.isSetSegment_info()) { this.segment_info = new org.apache.carbondata.format.SegmentInfo(other.segment_info); } this.bucket_id = other.bucket_id; this.schema_time_stamp = other.schema_time_stamp; }
@Override public ColumnSchema fromExternalToWrapperColumnSchema( org.apache.carbondata.format.ColumnSchema externalColumnSchema) { ColumnSchema wrapperColumnSchema = new ColumnSchema(); wrapperColumnSchema.setColumnUniqueId(externalColumnSchema.getColumn_id()); wrapperColumnSchema.setColumnName(externalColumnSchema.getColumn_name()); wrapperColumnSchema.setDataType( fromExternalToWrapperDataType( externalColumnSchema.precision, externalColumnSchema.scale)); wrapperColumnSchema.setDimensionColumn(externalColumnSchema.isDimension()); List<Encoding> encoders = new ArrayList<Encoding>(); for (org.apache.carbondata.format.Encoding encoder : externalColumnSchema.getEncoders()) { encoders.add(fromExternalToWrapperEncoding(encoder)); wrapperColumnSchema.setNumberOfChild(externalColumnSchema.getNum_child()); wrapperColumnSchema.setPrecision(externalColumnSchema.getPrecision()); wrapperColumnSchema.setScale(externalColumnSchema.getScale()); wrapperColumnSchema.setDefaultValue(externalColumnSchema.getDefault_value()); wrapperColumnSchema.setInvisible(externalColumnSchema.isInvisible()); wrapperColumnSchema.setColumnReferenceId(externalColumnSchema.getColumnReferenceId()); wrapperColumnSchema.setSchemaOrdinal(externalColumnSchema.getSchemaOrdinal()); wrapperColumnSchema.setSortColumn(false); Map<String, String> properties = externalColumnSchema.getColumnProperties(); if (properties != null) { String sortColumns = properties.get(CarbonCommonConstants.SORT_COLUMNS); wrapperColumnSchema.setFunction(externalColumnSchema.getAggregate_function()); List<org.apache.carbondata.format.ParentColumnTableRelation> parentColumnTableRelation = externalColumnSchema.getParentColumnTableRelations();
for (int _i28 = 0; _i28 < _list26.size; ++_i28) _elem27 = new ColumnSchema(); _elem27.read(iprot); struct.added.add(_elem27); for (int _i31 = 0; _i31 < _list29.size; ++_i31) _elem30 = new ColumnSchema(); _elem30.read(iprot); struct.removed.add(_elem30);
/** * Performs a deep copy on <i>other</i>. */ public FileHeader(FileHeader other) { __isset_bitfield = other.__isset_bitfield; this.version = other.version; if (other.isSetColumn_schema()) { List<org.apache.carbondata.format.ColumnSchema> __this__column_schema = new ArrayList<org.apache.carbondata.format.ColumnSchema>(other.column_schema.size()); for (org.apache.carbondata.format.ColumnSchema other_element : other.column_schema) { __this__column_schema.add(new org.apache.carbondata.format.ColumnSchema(other_element)); } this.column_schema = __this__column_schema; } this.is_footer_present = other.is_footer_present; this.time_stamp = other.time_stamp; this.is_splitable = other.is_splitable; if (other.isSetSync_marker()) { this.sync_marker = org.apache.thrift.TBaseHelper.copyBinary(other.sync_marker); } if (other.isSetCompressor_name()) { this.compressor_name = other.compressor_name; } }
for (int _i2 = 0; _i2 < _list0.size; ++_i2) _elem1 = new org.apache.carbondata.format.ColumnSchema(); _elem1.read(iprot); struct.table_columns.add(_elem1);
List<ColumnSchema> __this__partition_columns = new ArrayList<ColumnSchema>(other.partition_columns.size()); for (ColumnSchema other_element : other.partition_columns) { __this__partition_columns.add(new ColumnSchema(other_element));
for (int _i100 = 0; _i100 < _list98.size; ++_i100) _elem99 = new ColumnSchema(); _elem99.read(iprot); struct.table_columns.add(_elem99);
List<org.apache.carbondata.format.ColumnSchema> __this__table_columns = new ArrayList<org.apache.carbondata.format.ColumnSchema>(other.table_columns.size()); for (org.apache.carbondata.format.ColumnSchema other_element : other.table_columns) { __this__table_columns.add(new org.apache.carbondata.format.ColumnSchema(other_element));
for (int _i7 = 0; _i7 < _list5.size; ++_i7) _elem6 = new org.apache.carbondata.format.ColumnSchema(); _elem6.read(iprot); struct.table_columns.add(_elem6);
List<ColumnSchema> __this__table_columns = new ArrayList<ColumnSchema>(other.table_columns.size()); for (ColumnSchema other_element : other.table_columns) { __this__table_columns.add(new ColumnSchema(other_element));