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

    https://github.com/apache/spark/pull/22014#discussion_r208091824
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala 
---
    @@ -709,6 +709,7 @@ object ScalaReflection extends ScalaReflection {
       def attributesFor[T: TypeTag]: Seq[Attribute] = schemaFor[T] match {
         case Schema(s: StructType, _) =>
           s.toAttributes
    +    case _ => throw new RuntimeException(s"$schemaFor is not supported at 
attributesFor()")
    --- End diff --
    
    How about this:
    
    ```scala
        case other =>
          throw new UnsupportedOperationException(s"Attributes for type $other 
is not supported")
    ```


---

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

Reply via email to