You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Fokko Driesprong (Jira)" <ji...@apache.org> on 2019/11/23 20:22:00 UTC

[jira] [Updated] (SPARK-30004) Allow UserDefinedType to be merged into a standard DateType

     [ https://issues.apache.org/jira/browse/SPARK-30004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fokko Driesprong updated SPARK-30004:
-------------------------------------
    Component/s:     (was: Spark Core)
                 SQL

> 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: SQL
>    Affects Versions: 2.4.4
>            Reporter: Fokko Driesprong
>            Priority: Major
>             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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org