GitHub user petermaxlee opened a pull request:

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

    [SPARK-16714][SQL] map, struct function should accept decimals with 
different precision/scale

    ## What changes were proposed in this pull request?
    This patch changes the type coercion rule for map and struct functions so 
they can accept decimals of different precision/scale. This is not a regression 
from Spark 1.x, but it is a much bigger problem in Spark 2.0 because floating 
point literals are parsed as decimals.
    
    ## How was this patch tested?
    Created a new end-to-end test suite SQLTypeCoercionSuite. In the future we 
can move all other type checking tests here. I first tried adding a test in 
SQLQuerySuite but the suite was clearly already too large.


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

    $ git pull https://github.com/petermaxlee/spark SPARK-16714

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

    https://github.com/apache/spark/pull/14389.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 #14389
    
----
commit 9774605c6be7bc5f41267c37f66567a498ea9156
Author: petermaxlee <petermax...@gmail.com>
Date:   2016-07-28T07:34:39Z

    [SPARK-16714][SQL] map, struct function should accept decimals with 
different precision/scale

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to