This is an automated email from the ASF dual-hosted git repository. stigahuang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 594912f636497779ff4007c73bed77ac5429944d Author: Riza Suminto <riza.sumi...@cloudera.com> AuthorDate: Wed Jun 18 11:11:03 2025 -0700 IMPALA-13649: (addendum) lower the multiple in TestExprDepthLimit TestExprDepthLimit still hit stack overflow when at 8x deeper than Expr.EXPR_DEPTH_LIMIT (1000). This patch lower the multiple further to 2x so that the expression tree does not hit stack overflow during creation. Testing: Pass FE_TEST with JDK17. Change-Id: If77a64435091459fa8a7d7bb5218a8eb0895802c Reviewed-on: http://gerrit.cloudera.org:8080/23047 Reviewed-by: Joe McDonnell <joemcdonn...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> --- fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java b/fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java index bb77dcc7e..d1844442a 100644 --- a/fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java +++ b/fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java @@ -3055,8 +3055,8 @@ public class AnalyzeExprsTest extends AnalyzerTest { String.format("Exceeded the maximum depth of an expression tree (%s).", Expr.EXPR_DEPTH_LIMIT)); - // Test 8x the safe depth (already at 1x, append 7x). - for (int i = 0; i < Expr.EXPR_DEPTH_LIMIT * 7; ++i) { + // Test 1x the safe depth (already at 1x, append 1x). + for (int i = 0; i < Expr.EXPR_DEPTH_LIMIT; ++i) { exprStr.append(repeatSuffix); } AnalysisError(exprStr.toString(), @@ -3076,9 +3076,9 @@ public class AnalyzeExprsTest extends AnalyzerTest { Expr.EXPR_DEPTH_LIMIT + 1), String.format("Exceeded the maximum depth of an expression tree (%s).", Expr.EXPR_DEPTH_LIMIT)); - // Test 8x the safe depth. + // Test 2x the safe depth. AnalysisError("select " + getNestedFuncExpr(openFunc, baseArg, closeFunc, - Expr.EXPR_DEPTH_LIMIT * 8), + Expr.EXPR_DEPTH_LIMIT * 2), String.format("Exceeded the maximum depth of an expression tree (%s).", Expr.EXPR_DEPTH_LIMIT)); }