bersprockets commented on code in PR #36883:
URL: https://github.com/apache/spark/pull/36883#discussion_r898586898


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/generators.scala:
##########
@@ -444,7 +444,8 @@ case class Inline(child: Expression) extends 
UnaryExpression with CollectionGene
   }
 
   override def elementSchema: StructType = child.dataType match {
-    case ArrayType(st: StructType, _) => st
+    case ArrayType(st: StructType, false) => st
+    case ArrayType(st: StructType, true) => st.asNullable

Review Comment:
   Yes, with Hive 2.3.9:
   ```
   Beeline version 2.3.9 by Apache Hive
   0: jdbc:hive2://localhost:10000> select inline(array(named_struct('a', 1, 
'b', 2), null));
   +-------+-------+
   |   a   |   b   |
   +-------+-------+
   | 1     | 2     |
   | NULL  | NULL  |
   +-------+-------+
   2 rows selected (1.355 seconds)
   0: jdbc:hive2://localhost:10000> 
   ```



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