You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2019/08/30 01:04:51 UTC

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

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_r319325700
 
 

 ##########
 File path: hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonInputFormat.java
 ##########
 @@ -573,19 +573,27 @@ 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<>();
         // 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) {
+            LOG.error("CG datamap pruning failed.", e);
+          }
         } else {
           cgPrunedBlocklets = cgDataMapExprWrapper.prune(segmentIds, partitionsToPrune);
         }
-        // since index datamap prune in segment scope,
-        // the result need to intersect with previous pruned result
-        prunedBlocklets =
-            intersectFilteredBlocklets(carbonTable, prunedBlocklets, cgPrunedBlocklets);
+        // If cgPrunedBlocklets == 0, it means that CG datamap pruning failed,
 
 Review comment:
   an empty collection could also mean all blocklet are filtered and no data hit

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services