MrPowers commented on a change in pull request #31132:
URL: https://github.com/apache/spark/pull/31132#discussion_r555149666



##########
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:
       @ulysses-you - does `spark.range(1).select(typedLit(Array()))` get you 
the result you're looking for?  Per the docs, "The difference between the 
typedLit function and lit is that this function can handle parameterized scala 
types e.g.: List, Seq and Map."  `lit` isn't normally used for collections.




----------------------------------------------------------------
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]

Reply via email to