xuzifu666 commented on code in PR #5384:
URL: https://github.com/apache/calcite/pull/5384#discussion_r4455236740


##########
core/src/main/java/org/apache/calcite/plan/RelOptUtil.java:
##########
@@ -2593,47 +2605,59 @@ public static void decomposeConjunction(
       @Nullable RexNode rexPredicate,
       List<RexNode> rexList,
       List<RexNode> notList) {
-    if (rexPredicate == null || rexPredicate.isAlwaysTrue()) {
+    // Use an explicit stack to avoid StackOverflowError on deeply nested ANDs

Review Comment:
   General, not just ANDs, the loop handles nodes of any kind, and NOT 
delegates a deep OR operand to the also-iterative decomposeDisjunction. Comment 
updated to 'deeply nested expressions'.



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