caicancai commented on code in PR #4848:
URL: https://github.com/apache/calcite/pull/4848#discussion_r3025726893


##########
arrow/src/main/java/org/apache/calcite/adapter/arrow/ArrowTranslator.java:
##########
@@ -61,13 +61,30 @@ public static ArrowTranslator create(RexBuilder rexBuilder,
     return new ArrowTranslator(rexBuilder, rowType);
   }
 
-  List<String> translateMatch(RexNode condition) {
-    List<RexNode> disjunctions = RelOptUtil.disjunctions(condition);
-    if (disjunctions.size() == 1) {
-      return translateAnd(disjunctions.get(0));
-    } else {
-      throw new UnsupportedOperationException("Unsupported disjunctive 
condition " + condition);
+  /** The maximum number of nodes allowed during CNF conversion.
+   *
+   * <p>If exceeded, {@link RexUtil#toCnf(RexBuilder, int, RexNode)} returns
+   * the original expression unchanged, which may cause the subsequent
+   * translation to Gandiva predicates to fail with an
+   * {@link UnsupportedOperationException}. That exception is caught by
+   * {@link ArrowRules.ArrowFilterRule#onMatch}, which silently skips the
+   * Arrow convention and falls back to an Enumerable plan. */
+  private static final int MAX_CNF_NODE_COUNT = 256;

Review Comment:
   I currently have no requirements for configurability; however, if users 
express a need for it in the future, I can certainly provide support. Let's let 
it run for a while first.



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

Reply via email to