Github user ravipesala commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1984#discussion_r169628065 --- Diff: core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMap.java --- @@ -660,22 +650,23 @@ public boolean isScanRequired(FilterResolverIntf filterExp) { return blocklets; } - @Override public List<Blocklet> prune(FilterResolverIntf filterExp, List<String> partitions) { + @Override + public List<Blocklet> prune(FilterResolverIntf filterExp, List<PartitionSpec> partitions) { if (unsafeMemoryDMStore.getRowCount() == 0) { return new ArrayList<>(); } - // First get the partitions which are stored inside datamap. - List<String> storedPartitions = getPartitions(); // if it has partitioned datamap but there is no partitioned information stored, it means // partitions are dropped so return empty list. - if (isPartitionedSegment && (storedPartitions == null || storedPartitions.size() == 0)) { - return new ArrayList<>(); - } - if (storedPartitions != null && storedPartitions.size() > 0) { + if (partitions != null) { + // First get the partitions which are stored inside datamap. + String[] fileDetails = getFileDetails(); // Check the exact match of partition information inside the stored partitions. boolean found = false; - if (partitions != null && partitions.size() > 0) { - found = partitions.containsAll(storedPartitions); + Path folderPath = new Path(fileDetails[0]); + for (PartitionSpec spec : partitions) { + if (folderPath.equals(spec.getLocation())) { + found = true; --- End diff -- ok
---