Github user eranation commented on a diff in the pull request:
https://github.com/apache/spark/pull/5235#discussion_r27351018
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
---
@@ -179,6 +179,7 @@ trait ScalaReflection {
case t if t <:< definitions.ShortTpe => Schema(ShortType, nullable =
false)
case t if t <:< definitions.ByteTpe => Schema(ByteType, nullable =
false)
case t if t <:< definitions.BooleanTpe => Schema(BooleanType,
nullable = false)
+ case other => sys.error(s"Schema for type $other is currently not
supported")
--- End diff --
This is my first pull request so thank you for your patience and feedback!
I used sys.error instead of a more explicit exception for consistency with
other similar cases (e.g. in 1.2.1 a non byte array had the same handling using
a sys.error
I think that `UnsupportedOperationException` is the most fitting exception
if you guys want to go with an explicit one. Or keep it as sys.error to keep it
consistent with other error handing in this method.
What do you prefer?
---
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]