Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2255#discussion_r186294354
--- Diff:
hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java ---
@@ -431,7 +432,9 @@ protected Expression getFilterPredicates(Configuration
configuration) {
// Get the available CG datamaps and prune further.
DataMapExprWrapper cgDataMapExprWrapper = DataMapChooser.get()
.chooseCGDataMap(getOrCreateCarbonTable(job.getConfiguration()),
resolver);
- if (cgDataMapExprWrapper != null) {
+ if (cgDataMapExprWrapper != null &&
--- End diff --
I think we can do this judgement earlier.
Currently, we
1. iterate all the datamaps,
2. then filter out the visible ones,
3. then filter out the corse/fine ones,
4. then apply the filter-expression to filter out the datamaps,
5. then judge whether the datamap is enabled...
We can migrate step5 with step2 and skip step3~4 if the datamap is disabled.
---