Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16886#discussion_r100545658
  
    --- 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 --
    
    It is quite likely that a user/developer will make a mistake for either a 
list or a map. I think these errors are more informative than the generic 
error, so I would like to retain them for the sake of user experience.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to