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:
[email protected]
With regards,
Apache Git Services