Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/16886#discussion_r100549783
--- Diff:
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveInspectors.scala ---
@@ -218,22 +220,33 @@ private[hive] trait HiveInspectors {
case c: Class[_] if c == java.lang.Float.TYPE => FloatType
case c: Class[_] if c == java.lang.Boolean.TYPE => BooleanType
- case c: Class[_] if c.isArray =>
ArrayType(javaClassToDataType(c.getComponentType))
+ case c: Class[_] if c.isArray =>
ArrayType(javaTypeToDataType(c.getComponentType))
// Hive seems to return this for struct types?
case c: Class[_] if c == classOf[java.lang.Object] => NullType
- // java list type unsupported
+ // raw java list type unsupported
case c: Class[_] if c == classOf[java.util.List[_]] =>
throw new AnalysisException(
- "List type in java is unsupported because " +
- "JVM type erasure makes spark fail to catch a component type in
List<>")
+ "Raw list type in java is unsupported because Spark cannot infer
the element type.")
--- End diff --
Nit: All the entries for error handling would be better to be placed in the
bottom
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]