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

    https://github.com/apache/spark/pull/22646#discussion_r223168936
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
    @@ -1098,12 +1099,19 @@ object SQLContext {
           data: Iterator[_],
           beanClass: Class[_],
           attrs: Seq[AttributeReference]): Iterator[InternalRow] = {
    +    import scala.collection.JavaConverters._
    +    import java.lang.reflect.{Type, ParameterizedType, Array => JavaArray}
    +    def interfaceParameters(t: Type, interface: Class[_]): Array[Type] = t 
match {
    +      case parType: ParameterizedType if parType.getRawType == interface =>
    +        parType.getActualTypeArguments
    +      case _ => throw new UnsupportedOperationException(s"$t is not an 
$interface")
    --- End diff --
    
    This exception message looks a bit confusing. We can say the type is not 
supported.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to