Fokko Driesprong created SPARK-30004:
----------------------------------------
Summary: Allow UserDefinedType to be merged into a standard
DateType
Key: SPARK-30004
URL: https://issues.apache.org/jira/browse/SPARK-30004
Project: Spark
Issue Type: Improvement
Components: Spark Core
Affects Versions: 2.4.4
Reporter: Fokko Driesprong
Fix For: 2.4.5
I've registered a custom type, namely XMLGregorianCalendar which is being used
by Scalaxb. A XML databinding tool, for generating case classes based on a XSD.
I want to convert the XMLGregorianCalendar to a regular TimestampType. This
works, but when I update the table (using Delta), I get an error:
Failed to merge fields 'START_DATE_MAINTENANCE_FLPL' and
'START_DATE_MAINTENANCE_FLPL'.
Failed to merge incompatible data types TimestampType and
org.apache.spark.sql.types.CustomXMLGregorianCalendarType@5ff12345;;
There are two ways of fixing this:
* Adding a rule which compares the sqlType.
* Change the compare function, so it will check the rhs to the lhs, so I can
override the equals function on the UserDefinedType
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]