Github user viirya commented on a diff in the pull request:
    --- Diff: 
    @@ -97,6 +97,38 @@ 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 row = 
create_row("afafFAFFsqcategory2dadDADcategory8sasasadscategory24", 0)
    --- End diff --
    An example looks like the following test case. I've tested it. It failed in 
current master branch due to the 64kb issue.
        test("split large if expression") {
          val conditionExpr = (1 to 1000).map { _ =>
            And(GreaterThan(new Rand(), Literal(0.5)), LessThan(new Rand(), 
          val expressions = Seq(If(conditionExpr, Literal(true), 
          val plan = GenerateUnsafeProjection.generate(expressions, true)
          // Rand needs initialization.
          val actual = plan(new 
          val expected = Seq(false)
          if (!checkResult(actual, expected)) {
            fail(s"Incorrect Evaluation: expressions: $expressions, actual: 
$actual, expected: $expected")

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to