Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/15620#discussion_r91829129
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CodeGenerationSuite.scala
---
@@ -97,6 +97,27 @@ class CodeGenerationSuite extends SparkFunSuite with
ExpressionEvalHelper {
assert(actual(0) == cases)
}
+ test("SPARK-18091: split large if expressions into blocks due to JVM
code size limit") {
+ val inStr = "StringForTesting"
+ val row = create_row(inStr)
+ val inputStrAttr = 'a.string.at(0)
+
+ var strExpr: Expression = inputStrAttr
+ for (_ <- 1 to 13) {
+ strExpr = If(EqualTo(Decode(Encode(strExpr, "utf-8"), "utf-8"),
inputStrAttr),
--- End diff --
cc @srowen I think this is the root cause. This test is an overkill,
although this PR fixed the code size limitation problem, this test may still
hit constants pool size limitation, which is a known limiation and has not been
fixed yet. It seems that maven and sbt have different JVM settings when run
test, so the problem only exists at maven side.
I'm going to submit a PR to simplify this test a bit.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]