You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/04/01 12:53:15 UTC
[jira] [Commented] (DRILL-474) Long.MIN_VALUE is not parsed as
BIGINT but as a Double
[ https://issues.apache.org/jira/browse/DRILL-474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13956381#comment-13956381 ]
ASF GitHub Bot commented on DRILL-474:
--------------------------------------
GitHub user adityakishore opened a pull request:
https://github.com/apache/incubator-drill/pull/40
DRILL-474 - Long.MIN_VALUE is not parsed as BIGINT but as a Double
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/adityakishore/incubator-drill DRILL-474-Long.MIN_VALUE-is-not-parsed-as-BIGINT-but-as-a-Double
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-drill/pull/40.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 #40
----
commit 75ad35578d249830b01b4df22598b6488fd31f74
Author: Aditya Kishore <ad...@maprtech.com>
Date: 2014-04-01T09:57:23Z
DRILL-474 - Long.MIN_VALUE is not parsed as BIGINT but as a Double
----
> 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)