use of org.apache.carbondata.core.scan.model.QueryDimension in project carbondata by apache.
the class QueryUtil method getComplexDimensionsMap.
/**
* Below method will be used to get the map of for complex dimension and its type
* which will be used to during query execution to
*
* @param queryDimensions complex dimension in query
* @param dimensionToBlockIndexMap dimension to block index in file map
* @return complex dimension and query type
*/
public static Map<Integer, GenericQueryType> getComplexDimensionsMap(List<QueryDimension> queryDimensions, Map<Integer, Integer> dimensionToBlockIndexMap, int[] eachComplexColumnValueSize, Map<String, Dictionary> columnIdToDictionaryMap, Set<CarbonDimension> filterDimensions) {
Map<Integer, GenericQueryType> complexTypeMap = new HashMap<Integer, GenericQueryType>();
for (QueryDimension dimension : queryDimensions) {
CarbonDimension actualDimension = dimension.getDimension();
if (actualDimension.getNumberOfChild() == 0) {
continue;
}
fillParentDetails(dimensionToBlockIndexMap, actualDimension, complexTypeMap, eachComplexColumnValueSize, columnIdToDictionaryMap);
}
if (null != filterDimensions) {
for (CarbonDimension filterDimension : filterDimensions) {
// do not fill nay details for implicit dimension type
if (filterDimension.hasEncoding(Encoding.IMPLICIT) || filterDimension.getNumberOfChild() == 0) {
continue;
}
fillParentDetails(dimensionToBlockIndexMap, filterDimension, complexTypeMap, eachComplexColumnValueSize, columnIdToDictionaryMap);
}
}
return complexTypeMap;
}
Aggregations