spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dongjoon Hyun (Jira)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-30004) Allow UserDefinedType to be merged into a standard DateType
Date Mon, 16 Mar 2020 22:53:04 GMT

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

Dongjoon Hyun updated SPARK-30004:
----------------------------------
    Affects Version/s:     (was: 3.0.0)
                       3.1.0

> 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: 3.1.0
>            Reporter: Fokko Driesprong
>            Priority: Major
>
> 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


Mime
View raw message