Github user sryza commented on a diff in the pull request:
https://github.com/apache/spark/pull/2919#discussion_r19373097
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/types/dataTypes.scala
---
@@ -492,3 +494,24 @@ case class MapType(
("valueType" -> valueType.jsonValue) ~
("valueContainsNull" -> valueContainsNull)
}
+
+/**
+ * ::DeveloperApi::
+ * The data type for User Defined Types.
+ */
+@DeveloperApi
+abstract class UserDefinedType[UserType] extends DataType with
Serializable {
+
+ /** Underlying storage type for this UDT used by SparkSQL */
+ def sqlType: DataType
+
+ /** Convert the user type to a Row object */
+ // TODO: Can we make this take obj: UserType? The issue is in
ScalaReflection.convertToCatalyst,
+ // where we need to convert Any to UserType.
--- End diff --
Can this include some additional doc on when this conversion overhead will
be incurred? Is it kosher to return references to the same underlying
structures or does everything need to be copied?
---
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]