Skip to content

Commit b95aaa2

Browse files
committed
Fix
1 parent d599807 commit b95aaa2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sql/core/src/test/scala/org/apache/spark/sql/BenchmarkQueryTest.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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"too long generated codes found in the WholeStageCodegenExec subtree (id=${subtree.id}) " +
78+
s"and JIT optimization might not work:\n${subtree.treeString}")
7579
}
7680
}
7781
}

0 commit comments

Comments
 (0)