GitHub user sarutak opened a pull request:

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

    [SPARK-3959][SPARK-3960][SQL] SqlParser fails to parse literal 
-9223372036854775808 (Long.MinValue). / We can apply unary minus only to 
literal.

    SqlParser fails to parse -9223372036854775808 (Long.MinValue) so we cannot 
write queries such like as follows.
    
        SELECT value FROM someTable WHERE value > -9223372036854775808
    
    Additionally, because of the wrong syntax definition, we cannot apply unary 
minus only to literal. So, we cannot write such expressions.
    
        -(value1 + value2) // Parenthesized expressions
        -column // Columns
        -MAX(column) // Functions

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

    $ git pull https://github.com/sarutak/spark spark-sql-dsl-improvement2

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

    https://github.com/apache/spark/pull/2816.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 #2816
    
----
commit 6e0b6d7361b630994219d4efea66c8c38e90531a
Author: Kousuke Saruta <[email protected]>
Date:   2014-10-15T11:06:21Z

    WIP

commit 54b12a1de6d89caeec5efe54d3a1c7e738c82e9a
Author: Kousuke Saruta <[email protected]>
Date:   2014-10-15T21:25:51Z

    Added some more tests to SQLQuerySuite

----


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