You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/06/17 05:56:28 UTC
[GitHub] [spark] viirya commented on a change in pull request #24846:
[SPARK-28012][SQL] Hive UDF supports literal struct type
viirya commented on a change in pull request #24846: [SPARK-28012][SQL] Hive UDF supports literal struct type
URL: https://github.com/apache/spark/pull/24846#discussion_r294144110
##########
File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveInspectors.scala
##########
@@ -847,6 +847,8 @@ private[hive] trait HiveInspectors {
ObjectInspectorFactory.getStandardConstantMapObjectInspector(keyOI, valueOI, jmap)
}
+ case Literal(_, dt: StructType) =>
+ toInspector(dt)
Review comment:
The fix looks correct.
However, to use `toInspector` here is to invoke `toInspector(dataType: DataType)` for nested fields. For the fields, not constant object inspector is used anymore.
Can we follow array and map literals logics, to use constant object inspector for nested 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org