You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "walterddr (via GitHub)" <gi...@apache.org> on 2023/05/02 14:25:35 UTC

[GitHub] [pinot] walterddr commented on a diff in pull request #10707: Fix a bug in star-tree filter operator which can incorrecly filter documents

walterddr commented on code in PR #10707:
URL: https://github.com/apache/pinot/pull/10707#discussion_r1182617154


##########
pinot-core/src/main/java/org/apache/pinot/core/startree/operator/StarTreeFilterOperator.java:
##########
@@ -203,19 +203,26 @@ private BaseFilterOperator getFilterOperator() {
   @Nullable
   private StarTreeResult traverseStarTree() {
     MutableRoaringBitmap matchingDocIds = new MutableRoaringBitmap();
-    Set<String> globalRemainingPredicateColumns = Collections.emptySet();
-    boolean globalRemainingPredicateColumnsSet = false;
+    Set<String> globalRemainingPredicateColumns = null;
 
     StarTree starTree = _starTreeV2.getStarTree();
     List<String> dimensionNames = starTree.getDimensionNames();
     StarTreeNode starTreeRootNode = starTree.getRoot();
 
+    // Track whether we have found a leaf node added to the queue. If we have found a leaf node, and traversed to the
+    // level of the leave node, we can set globalRemainingPredicateColumns if not already set because we know the leaf
+    // node won't split further on other predicate columns.
+    boolean findLeafNode = starTreeRootNode.isLeaf();

Review Comment:
   `foundLeafNode`?



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

To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org