Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/21405#discussion_r200245418
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeBlockSuite.scala
---
@@ -133,4 +133,55 @@ class CodeBlockSuite extends SparkFunSuite {
|}""".stripMargin
assert(aliasedCode.toString == expected.toString)
}
+
+ test ("transform expr in nested blocks") {
+ val expr = JavaCode.expression("1 + 1", IntegerType)
+ val isNull = JavaCode.isNullVariable("expr1_isNull")
--- End diff --
not related to this PR, shall we remove `isNullVariable` and always use
`expression(..., BooleanType)`? Or we can add a bunch of `intExpression(...)`,
`booleanExpression(...)` etc.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]