Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/22468#discussion_r238515544
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CodeGeneratorWithInterpretedFallbackSuite.scala
---
@@ -106,4 +106,19 @@ class CodeGeneratorWithInterpretedFallbackSuite
extends SparkFunSuite with PlanT
assert(proj(input).toSeq(StructType.fromDDL("c0 int, c1 int")) ===
expected)
}
}
+
+ test("SPARK-25374 Correctly handles NoOp in SafeProjection") {
+ val exprs = Seq(Add(BoundReference(0, IntegerType, nullable = true),
Literal.create(1)), NoOp)
+ val input = InternalRow.fromSeq(1 :: 1 :: Nil)
+ val expected = 2 :: null :: Nil
+ withSQLConf(SQLConf.CODEGEN_FACTORY_MODE.key -> codegenOnly) {
--- End diff --
nvm, this is the code style in this test suite
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]