uros-b commented on code in PR #56845:
URL: https://github.com/apache/spark/pull/56845#discussion_r3492590361


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ComplexTypeSuite.scala:
##########
@@ -750,6 +750,13 @@ class ComplexTypeSuite extends SparkFunSuite with 
ExpressionEvalHelper {
     )
   }
 
+  test("SPARK-57736: CreateNamedStruct.dataType is null-safe when a field name 
is null") {
+    val struct = CreateNamedStruct(Seq(Literal.create(null, StringType), 
Literal(1)))
+    val dt = struct.dataType
+    assert(dt.length == 1)
+    assert(dt.head.name == null)

Review Comment:
   Please update the test a bit - the current regression test asserts dt.length 
== 1 and dt.head.name == null (core behavior covered) but does not assert 
checkInputDataTypes() still returns UNEXPECTED_NULL, nor exercise a null name 
mixed with valid named fields.



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

To unsubscribe, e-mail: [email protected]

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