Kyle Buzsaki created PHOENIX-1061:
-------------------------------------

             Summary: PhoenixSQLParser can't handle Long.MIN_VALUE 
(-9223372036854775808) as a literal.
                 Key: PHOENIX-1061
                 URL: https://issues.apache.org/jira/browse/PHOENIX-1061
             Project: Phoenix
          Issue Type: Bug
            Reporter: Kyle Buzsaki
            Priority: Minor


The PhoenixSQLParser throws a syntax error when the value -9223372036854775808 
is used as an integer literal in a select expression. This is Long.MIN_VALUE, 
so my assumption is that the parser is attempting to parse the sign and 
magnitude separately and then throwing an error that the magnitude is too large.

An easy workaround is to replace all uses of -9223372036854775808 with some 
expression that evaluates to the same value but doesn't use the literal 
directly. For example, (-9223372036854775807 + -1).

This issue does not appear to affect upsert expressions.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to