GitHub user ryanbald opened a pull request:

    https://github.com/apache/spark/pull/19033

    [SPARK-21811][SQL]Inconsistency when finding the widest common type of a 
combination of DateType, StringType, and NumericType

    ## What changes were proposed in this pull request?
    
    When finding the widest common type of a sequence of data types where the 
beginning of the sequence consists solely of DateType/Timestamp and Numeric 
types and the following data type in the sequence is a StringType, the widest 
common type becomes StringType (which was not the case prior, as an 
AnalysisException was raised).
    
    ## How was this patch tested?
    
    Added one test of Coalesce type coercion with the specific sequence of data 
types mentioned above and added onto a test of Union type coercion with a 
similar sequence of data types.
    
    _Please state that the contribution is your original work and that you 
license the work to the project under the project’s open source license._

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ryanbald/spark type-coercion-bug

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/19033.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #19033
    
----
commit 9cdd9a653f909c766fde3b6c6b6f47f0684b1825
Author: Ryan Bald <[email protected]>
Date:   2017-08-24T05:43:14Z

    when a combination of Date/Timestamp, Numeric, and String types are in a 
sequence of data types, the widest type is String

----


---
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]

Reply via email to