Indhumathi27 commented on a change in pull request #3707:
URL: https://github.com/apache/carbondata/pull/3707#discussion_r415578213
##########
File path: core/src/main/java/org/apache/carbondata/core/index/TableIndex.java
##########
@@ -177,18 +181,29 @@ public CarbonTable getTable() {
}
private List<ExtendedBlocklet> pruneWithoutFilter(List<Segment> segments,
- List<PartitionSpec> partitions, List<ExtendedBlocklet> blocklets) throws
IOException {
+ Set<Path> partitionLocations, List<ExtendedBlocklet> blocklets) throws
IOException {
for (Segment segment : segments) {
- List<Blocklet> allBlocklets =
blockletDetailsFetcher.getAllBlocklets(segment, partitions);
+ List<Blocklet> allBlocklets =
+ blockletDetailsFetcher.getAllBlocklets(segment, partitionLocations);
blocklets.addAll(
addSegmentId(blockletDetailsFetcher.getExtendedBlocklets(allBlocklets, segment),
segment));
}
return blocklets;
}
+ private Set<Path> getPartitionLocations(List<PartitionSpec> partitionSpecs) {
+ Set<Path> partitionsLocations = new HashSet<>();
+ if (null != partitionSpecs) {
+ for (PartitionSpec partitionSpec : partitionSpecs) {
+ partitionsLocations.add(partitionSpec.getLocation());
+ }
+ }
+ return partitionsLocations;
+ }
+
private List<ExtendedBlocklet> pruneWithFilter(List<Segment> segments,
IndexFilter filter,
- List<PartitionSpec> partitions, List<ExtendedBlocklet> blocklets,
+ Set<Path> partitionLocations, List<ExtendedBlocklet> blocklets,
Review comment:
Only Partition Location is used from PartiitonSpec. whole PartiitonSpec
object is not needed
----------------------------------------------------------------
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]