[GitHub] [carbondata] shivamasn commented on a change in pull request #3369: [CARBONDATA-3508] Support CG datamap pruning fallback while querying

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] shivamasn commented on a change in pull request #3369: [CARBONDATA-3508] Support CG datamap pruning fallback while querying

GitBox
shivamasn 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_r320102719
 
 

 ##########
 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:
   We need to include both the cases in try-catch..I have handled it..Please review.

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services