maedhroz commented on code in PR #2935:
URL: https://github.com/apache/cassandra/pull/2935#discussion_r1449251140


##########
src/java/org/apache/cassandra/index/sai/plan/FilterTree.java:
##########
@@ -96,22 +100,56 @@ private boolean localSatisfiedBy(DecoratedKey key, 
Unfiltered unfiltered, Row st
                 if (filter.getIndexTermType().isNonFrozenCollection())
                 {
                     Iterator<ByteBuffer> valueIterator = 
filter.getIndexTermType().valuesOf(row, now);
-                    result = op.apply(result, collectionMatch(valueIterator, 
filter));
+                    result = localOperator.apply(result, 
collectionMatch(valueIterator, filter));
                 }
                 else
                 {
                     ByteBuffer value = filter.getIndexTermType().valueOf(key, 
row, now);
-                    result = op.apply(result, singletonMatch(value, filter));
+                    result = localOperator.apply(result, singletonMatch(value, 
filter));
                 }
 
                 // If the operation is an AND then exit early if we get a 
single false
-                if (op == BooleanOperator.AND && !result)
+                if (localOperator == BooleanOperator.AND && !result)
                     return false;
+
+                // If the operation is an OR then exit early if we get a 
single true
+                if (localOperator == BooleanOperator.OR && result)
+                    return true;
             }
         }
         return result;
     }
 
+    private BooleanOperator getLocalOperator(Row regularRow, Row staticRow)
+    {
+        // This is an AND query, but the coordinator has indicated strict 
filtering might not be allowed... 
+        if (baseOperator == BooleanOperator.AND && !strict)

Review Comment:
   I think we would also not have to worry about any of this garbage if there 
were no results of any kind from the unrepaired data...I wonder how difficult 
it would be to make the FilterTree aware of that...



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to