Search in sources :

Example 1 with BiDictionary

use of org.apache.carbondata.core.devapi.BiDictionary in project carbondata by apache.

the class TableDictionaryGenerator method size.

public Integer size(DictionaryMessage key) {
    CarbonMetadata metadata = CarbonMetadata.getInstance();
    CarbonTable carbonTable = metadata.getCarbonTable(key.getTableUniqueName());
    CarbonDimension dimension = carbonTable.getPrimitiveDimensionByName(key.getTableUniqueName(), key.getColumnName());
    DictionaryGenerator<Integer, String> generator = columnMap.get(dimension.getColumnId());
    return ((BiDictionary) generator).size();
}
Also used : CarbonTable(org.apache.carbondata.core.metadata.schema.table.CarbonTable) CarbonMetadata(org.apache.carbondata.core.metadata.CarbonMetadata) BiDictionary(org.apache.carbondata.core.devapi.BiDictionary) CarbonDimension(org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension)

Aggregations

BiDictionary (org.apache.carbondata.core.devapi.BiDictionary)1 CarbonMetadata (org.apache.carbondata.core.metadata.CarbonMetadata)1 CarbonTable (org.apache.carbondata.core.metadata.schema.table.CarbonTable)1 CarbonDimension (org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension)1