Search in sources :

Example 31 with Encoding

use of org.apache.carbondata.core.metadata.encoder.Encoding in project carbondata by apache.

the class SegmentPropertiesTest method getDimensionColumn6.

private ColumnSchema getDimensionColumn6() {
    ColumnSchema dimColumn = new ColumnSchema();
    dimColumn.setColumnar(true);
    dimColumn.setColumnName("IMEI5");
    dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
    dimColumn.setDataType(DataType.ARRAY);
    dimColumn.setDimensionColumn(true);
    List<Encoding> encodeList = new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
    encodeList.add(Encoding.DICTIONARY);
    dimColumn.setEncodingList(encodeList);
    dimColumn.setNumberOfChild(1);
    return dimColumn;
}
Also used : ArrayList(java.util.ArrayList) ColumnSchema(org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema) Encoding(org.apache.carbondata.core.metadata.encoder.Encoding)

Example 32 with Encoding

use of org.apache.carbondata.core.metadata.encoder.Encoding in project carbondata by apache.

the class SegmentPropertiesTestUtil method getDimensionColumn4.

public static ColumnSchema getDimensionColumn4() {
    ColumnSchema dimColumn = new ColumnSchema();
    dimColumn.setColumnar(false);
    dimColumn.setColumnName("IMEI3");
    dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
    dimColumn.setDataType(DataType.STRING);
    dimColumn.setDimensionColumn(true);
    List<Encoding> encodeList = new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
    encodeList.add(Encoding.DICTIONARY);
    dimColumn.setEncodingList(encodeList);
    dimColumn.setNumberOfChild(0);
    dimColumn.setColumnGroup(0);
    return dimColumn;
}
Also used : ArrayList(java.util.ArrayList) ColumnSchema(org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema) Encoding(org.apache.carbondata.core.metadata.encoder.Encoding)

Example 33 with Encoding

use of org.apache.carbondata.core.metadata.encoder.Encoding in project carbondata by apache.

the class SegmentPropertiesTestUtil method getDimensionColumn11.

public static ColumnSchema getDimensionColumn11() {
    ColumnSchema dimColumn = new ColumnSchema();
    dimColumn.setColumnar(false);
    dimColumn.setColumnName("IMEI11");
    dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
    dimColumn.setDataType(DataType.STRING);
    dimColumn.setDimensionColumn(true);
    List<Encoding> encodeList = new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
    encodeList.add(Encoding.DICTIONARY);
    dimColumn.setEncodingList(encodeList);
    dimColumn.setNumberOfChild(0);
    dimColumn.setColumnGroup(1);
    return dimColumn;
}
Also used : ArrayList(java.util.ArrayList) ColumnSchema(org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema) Encoding(org.apache.carbondata.core.metadata.encoder.Encoding)

Example 34 with Encoding

use of org.apache.carbondata.core.metadata.encoder.Encoding in project carbondata by apache.

the class SegmentPropertiesTestUtil method getDimensionColumn5.

public static ColumnSchema getDimensionColumn5() {
    ColumnSchema dimColumn = new ColumnSchema();
    dimColumn.setColumnar(true);
    dimColumn.setColumnName("IMEI4");
    dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
    dimColumn.setDataType(DataType.STRING);
    dimColumn.setDimensionColumn(true);
    List<Encoding> encodeList = new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
    dimColumn.setEncodingList(encodeList);
    dimColumn.setNumberOfChild(0);
    return dimColumn;
}
Also used : ArrayList(java.util.ArrayList) ColumnSchema(org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema) Encoding(org.apache.carbondata.core.metadata.encoder.Encoding)

Example 35 with Encoding

use of org.apache.carbondata.core.metadata.encoder.Encoding in project carbondata by apache.

the class SegmentPropertiesTestUtil method getDimensionColumn3.

public static ColumnSchema getDimensionColumn3() {
    ColumnSchema dimColumn = new ColumnSchema();
    dimColumn.setColumnar(false);
    dimColumn.setColumnName("IMEI2");
    dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
    dimColumn.setDataType(DataType.STRING);
    dimColumn.setDimensionColumn(true);
    List<Encoding> encodeList = new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
    encodeList.add(Encoding.DICTIONARY);
    dimColumn.setEncodingList(encodeList);
    dimColumn.setColumnGroup(0);
    dimColumn.setNumberOfChild(0);
    return dimColumn;
}
Also used : ArrayList(java.util.ArrayList) ColumnSchema(org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema) Encoding(org.apache.carbondata.core.metadata.encoder.Encoding)

Aggregations

Encoding (org.apache.carbondata.core.metadata.encoder.Encoding)58 ColumnSchema (org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema)56 ArrayList (java.util.ArrayList)45 Test (org.junit.Test)24 MockUp (mockit.MockUp)19 SchemaEvolution (org.apache.carbondata.core.metadata.schema.SchemaEvolution)5 HashMap (java.util.HashMap)4 SchemaEvolutionEntry (org.apache.carbondata.core.metadata.schema.SchemaEvolutionEntry)4 TableSchema (org.apache.carbondata.core.metadata.schema.table.TableSchema)4 Map (java.util.Map)3 TableInfo (org.apache.carbondata.core.metadata.schema.table.TableInfo)3 CarbonDimension (org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension)3 QueryDimension (org.apache.carbondata.core.scan.model.QueryDimension)3 AbstractDictionaryCacheTest (org.apache.carbondata.core.cache.dictionary.AbstractDictionaryCacheTest)2 IndexKey (org.apache.carbondata.core.datastore.IndexKey)2 SegmentProperties (org.apache.carbondata.core.datastore.block.SegmentProperties)2 FileFactory (org.apache.carbondata.core.datastore.impl.FileFactory)2 ValueEncoderMeta (org.apache.carbondata.core.metadata.ValueEncoderMeta)2 DataChunk (org.apache.carbondata.core.metadata.blocklet.datachunk.DataChunk)2 SchemaConverter (org.apache.carbondata.core.metadata.converter.SchemaConverter)2