GitHub user wangyum opened a pull request:

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

    [SPARK-20948][SQL] Built-in SQL Function UnaryMinus/UnaryPositive support 
string type

    ## What changes were proposed in this pull request?
    
    Built-in SQL Function UnaryMinus/UnaryPositive support string type, if it's 
string type, convert it to double type, after this PR:
    ```sql
    spark-sql> select positive('-1.11'), negative('-1.11');
    -1.11   1.11
    spark-sql> 
    ```
    
    ## How was this patch tested?
    
    unit tests

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

    $ git pull https://github.com/wangyum/spark SPARK-20948

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

    https://github.com/apache/spark/pull/18173.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 #18173
    
----
commit 5e7ed08c3c6f80d2d3ebbef0922987270a35aa4c
Author: Yuming Wang <[email protected]>
Date:   2017-06-01T08:14:45Z

    UnaryMinus/UnaryPositive function support string type.

----


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