Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2290#discussion_r187768530
--- Diff:
core/src/main/java/org/apache/carbondata/core/datamap/dev/expr/AndDataMapExprWrapper.java
---
@@ -59,6 +60,21 @@ public AndDataMapExprWrapper(DataMapExprWrapper left,
DataMapExprWrapper right,
return andBlocklets;
}
+ @Override
+ public List<ExtendedBlocklet> prune(DataMapDistributable distributable,
+ List<PartitionSpec>
partitionsToPrune)
+ throws IOException {
+ List<ExtendedBlocklet> leftPrune = left.prune(distributable,
partitionsToPrune);
+ List<ExtendedBlocklet> rightPrune = right.prune(distributable,
partitionsToPrune);
+ List<ExtendedBlocklet> andBlocklets = new ArrayList<>();
+ for (ExtendedBlocklet blocklet : leftPrune) {
+ if (rightPrune.contains(blocklet)) {
--- End diff --
Have you ever validate the correctness of this? The `equals` and `hashCode`
method in `ExtendedBlocklet` only make use of its member `segmentId`. I'm not
sure whether it is correct.
---