apache/spark — pull request #2949 by sarutak (2014-10-26 19:50:21+00:00)
Title: [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