[
https://issues.apache.org/jira/browse/DRILL-4552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447938#comment-16447938
]
Volodymyr Vysotskyi commented on DRILL-4552:
--------------------------------------------
In DRILL-6094 made several improvements connected with decimal data types and
with those changes, decimal literals without a cast to decimal are treated as
double literals when {{planner.enable_decimal_data_type}} is off.
In the case, when cast to decimal is used and
{{planner.enable_decimal_data_type}} is off the error is thrown.
I think this is the correct behaviour to throw an error in this case, since a
user may expect that decimal is used, but double value will be used.
> During inference, treat decimal literals as Double when
> planner.enable_decimal_data_type is off
> -----------------------------------------------------------------------------------------------
>
> Key: DRILL-4552
> URL: https://issues.apache.org/jira/browse/DRILL-4552
> Project: Apache Drill
> Issue Type: Improvement
> Components: Query Planning & Optimization
> Reporter: Sean Hsuan-Yi Chu
> Assignee: Sean Hsuan-Yi Chu
> Priority: Major
>
> In SQL standard, decimal literals (e.g., 1.2, 2.5, etc) are Decimal type. In
> Drill, when `planner.enable_decimal_data_type` is off, they are treated as
> Double.
> However, the current inference mechanism is "not to do any inference if the
> operand is Decimal type". (To be more exact, treat them as ANY type and defer
> to the execution to make the decision.)
> The mechanism can be improved by treating decimal literals as Double when
> `planner.enable_decimal_data_type` is off.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)