HyukjinKwon commented on a change in pull request #31132:
URL: https://github.com/apache/spark/pull/31132#discussion_r555075996
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/DatasetSuite.scala
##########
@@ -1982,6 +1982,13 @@ class DatasetSuite extends QueryTest
assert(timezone == "Asia/Shanghai")
}
}
+
+ test("SPARK-34072: Fix empty array failed in functions.lit()") {
+ checkAnswer(
+ spark.range(1).select(lit(Array())),
Review comment:
Can't you create an array such as:
```scala
scala> lit(Array.empty[Int])
res0: org.apache.spark.sql.Column = []
```
? Matching `java.lang.Object` to `NullType` is counterintuative.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]