[
https://issues.apache.org/jira/browse/DRILL-6710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16592023#comment-16592023
]
Sorabh Hamirwasia edited comment on DRILL-6710 at 8/24/18 6:39 PM:
-------------------------------------------------------------------
I looked into other engines like
[impala|https://www.cloudera.com/documentation/enterprise/5-9-x/topics/impala_decimal.html#decimal]
,
[hive|file:///Users/sorabhhamirwasia/Downloads/Hive_Decimal_Precision_Scale_Support.pdf]
and presto [link1|https://prestodb.io/docs/current/language/types.html]
[link2|https://prestodb.io/docs/current/functions/decimal.html]
[link3|https://github.com/prestodb/presto/issues/9103] and looks like both
doesn't support negative scale, same is the case with
[PostGres|https://www.postgresql.org/docs/10/static/datatype-numeric.html].
Looks like oracle is the only one supporting it. I think given the majority of
adoption is towards non negative scale we should use that.
was (Author: shamirwasia):
I looked into other engines like
[impala|https://www.cloudera.com/documentation/enterprise/5-9-x/topics/impala_decimal.html#decimal]
and presto [link1|https://prestodb.io/docs/current/language/types.html]
[link2|https://prestodb.io/docs/current/functions/decimal.html]
[link3|https://github.com/prestodb/presto/issues/9103] and looks like both
doesn't support negative scale, same is the case with
[PostGres|https://www.postgresql.org/docs/10/static/datatype-numeric.html].
Looks like oracle is the only one supporting it. I think given the majority of
adoption is towards non negative scale we should use that.
> Drill C++ Client does not handle scale = 0 properly for decimal
> ---------------------------------------------------------------
>
> Key: DRILL-6710
> URL: https://issues.apache.org/jira/browse/DRILL-6710
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Relational Operators
> Affects Versions: 1.14.0
> Reporter: Robert Hou
> Assignee: Sorabh Hamirwasia
> Priority: Major
> Fix For: 1.15.0
>
>
> Query is:
> select cast('999999999999999999' as decimal(18,0)) +
> cast('9999999999999999999999999999999999999' as decimal(38,0)) from data
> limit 1
> This is the error I get when my test program calls SQLExecDirect:
> The driver reported the following diagnostics whilst running SQLExecDirect
> HY000:1:40140:[MapR][Support] (40140) Scale can't be less than zero.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)