You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Aditya Kishore (JIRA)" <ji...@apache.org> on 2014/04/01 11:58:14 UTC

[jira] [Created] (DRILL-474) Long.MIN_VALUE is not parsed as BIGINT but as a Double

Aditya Kishore created DRILL-474:
------------------------------------

             Summary: Long.MIN_VALUE is not parsed as BIGINT but as a Double
                 Key: DRILL-474
                 URL: https://issues.apache.org/jira/browse/DRILL-474
             Project: Apache Drill
          Issue Type: Bug
            Reporter: Aditya Kishore
            Assignee: Aditya Kishore


A negative number in an expression is not parsed as a negative number rather a function call negative(abs_value_literal).

This invokes {{org.apache.drill.common.expression.ValueExpressions.getNumericExpression(String, ExpressionPosition)}} on the absolute literal value which uses {{Long.parseLong(s)}} to convert the parsed literal to a long value. However, {{9223372036854775808}} is a tad over the maximum +ve value that can be stored in a long. This let the number parsed as Double in the fallback code.



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