File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
sql/core/src/test/scala/org/apache/spark/sql Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ abstract class BenchmarkQueryTest extends QueryTest with SharedSparkSession {
57
57
}
58
58
codegenSubtrees.toSeq.foreach { subtree =>
59
59
val code = subtree.doCodeGen()._2
60
- try {
60
+ val (_, maxMethodCodeSize) = try {
61
61
// Just check the generated code can be properly compiled
62
62
CodeGenerator .compile(code)
63
63
} catch {
@@ -72,6 +72,10 @@ abstract class BenchmarkQueryTest extends QueryTest with SharedSparkSession {
72
72
""" .stripMargin
73
73
throw new Exception (msg, e)
74
74
}
75
+
76
+ assert(maxMethodCodeSize <= CodeGenerator .DEFAULT_JVM_HUGE_METHOD_LIMIT ,
77
+ s " too long generated codes found in the WholeStageCodegenExec subtree (id= ${subtree.id}) " +
78
+ s " and JIT optimization might not work: \n ${subtree.treeString}" )
75
79
}
76
80
}
77
81
}
You can’t perform that action at this time.
0 commit comments