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 2020/01/11 14:00:58 UTC

[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3568: [CARBONDATA-3658] Prune and Cache only Matched partitioned segments for filter on Partitioned table

Indhumathi27 commented on a change in pull request #3568: [CARBONDATA-3658] Prune and Cache only Matched partitioned segments for filter on Partitioned table
URL: https://github.com/apache/carbondata/pull/3568#discussion_r365522833
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
 ##########
 @@ -136,9 +136,22 @@ public DataMapBuilder createBuilder(Segment segment, String shardName,
           getTableBlockIndexUniqueIdentifiers(segment);
 
       for (TableBlockIndexUniqueIdentifier tableBlockIndexUniqueIdentifier : identifiers) {
-        tableBlockIndexUniqueIdentifierWrappers.add(
-            new TableBlockIndexUniqueIdentifierWrapper(tableBlockIndexUniqueIdentifier,
-                this.getCarbonTable()));
+        if (null != partitionsToPrune && !partitionsToPrune.isEmpty()) {
+          // add only tableBlockUniqueIdentifier that matches the partition
+          for (PartitionSpec partitionSpec : partitionsToPrune) {
+            if (partitionSpec.getLocation().toString()
+                .equalsIgnoreCase(tableBlockIndexUniqueIdentifier.getIndexFilePath())) {
 
 Review comment:
   Actually, `tableBlockIndexUniqueIdentifier.getIndexFilePath()` is the index file parent path. I will add comments for the same

----------------------------------------------------------------
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