You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/03/08 06:07:17 UTC

[GitHub] [druid] LakshSingla commented on a change in pull request #12314: Guard against exponential increase of filters during CNF conversion

LakshSingla commented on a change in pull request #12314:
URL: https://github.com/apache/druid/pull/12314#discussion_r821346625



##########
File path: processing/src/main/java/org/apache/druid/segment/filter/cnf/HiveCnfHelper.java
##########
@@ -178,6 +179,11 @@ private static void generateAllCombinations(
           a.add(child);
           // Result must receive an actual OrFilter.
           result.add(idempotentOr(Filters.or(a)));
+          if (result.size() >= 10_000) {
+            throw new CNFFilterExplosionException(
+                "Atleast 10,000 filters created by CNF (conjunctive normal form) conversion of the filter. "

Review comment:
       nit: Can `10_000` here and in the `if` be made a final variable somewhere? Would reduce the changes we need to track when updating the limit




-- 
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@druid.apache.org

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



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