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 {
5757 }
5858 codegenSubtrees.toSeq.foreach { subtree =>
5959 val code = subtree.doCodeGen()._2
60- try {
60+ val (_, maxMethodCodeSize) = try {
6161 // Just check the generated code can be properly compiled
6262 CodeGenerator .compile(code)
6363 } catch {
@@ -72,6 +72,10 @@ abstract class BenchmarkQueryTest extends QueryTest with SharedSparkSession {
7272 """ .stripMargin
7373 throw new Exception (msg, e)
7474 }
75+
76+ assert(maxMethodCodeSize <= CodeGenerator .DEFAULT_JVM_HUGE_METHOD_LIMIT ,
77+ s " Found too long generated codes in the WholeStageCodegenExec subtree (id= ${subtree.id}) " +
78+ s " and JIT optimization might not work: \n ${subtree.treeString}" )
7579 }
7680 }
7781}
You can’t perform that action at this time.
0 commit comments