kevinjmh commented on a change in pull request #3369: [CARBONDATA-3508] Support
CG datamap pruning fallback while querying
URL: https://github.com/apache/carbondata/pull/3369#discussion_r319798505
##########
File path:
hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java
##########
@@ -573,19 +573,29 @@ private int getBlockCount(List<ExtendedBlocklet>
blocklets) {
if (cgDataMapExprWrapper != null) {
// Prune segments from already pruned blocklets
DataMapUtil.pruneSegments(segmentIds, prunedBlocklets);
- List<ExtendedBlocklet> cgPrunedBlocklets;
+ List<ExtendedBlocklet> cgPrunedBlocklets = new ArrayList<>();
+ boolean isCGPruneFallback = false;
// Again prune with CG datamap.
if (distributedCG && dataMapJob != null) {
- cgPrunedBlocklets = DataMapUtil
- .executeDataMapJob(carbonTable, filter.getResolver(),
dataMapJob, partitionsToPrune,
- segmentIds, invalidSegments, DataMapLevel.CG, true, new
ArrayList<String>());
+ try {
+ cgPrunedBlocklets = DataMapUtil
+ .executeDataMapJob(carbonTable, filter.getResolver(),
dataMapJob, partitionsToPrune,
+ segmentIds, invalidSegments, DataMapLevel.CG, true, new
ArrayList<String>());
+ } catch (Exception e) {
+ isCGPruneFallback = true;
+ LOG.error("CG datamap pruning failed.", e);
+ }
} else {
cgPrunedBlocklets = cgDataMapExprWrapper.prune(segmentIds,
partitionsToPrune);
Review comment:
why the try-catch only wrap the *distributed* CG pruning? do we need to
include this line too
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services