[jira] [Updated] (DRILL-4552) Treat decimal literals as Double when planner.enable_decimal_data_type is off

2016-04-27 Thread Sean Hsuan-Yi Chu (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-4552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sean Hsuan-Yi Chu updated DRILL-4552:
-
Description: 
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.

In the context of type inference, the current behavior 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.) However, 

  was:
In SQL standard, decimal literals (e.g., 1.2, 2.5, etc) are decimal types. 
However, currently, Drill always converts them to Double in DrillOptiq.

Since they will be converted as Double in execution anyway, at inference, we 
can treat them as Double to help determine the return types. 

(The current behavior is "not to do any inference if the operand is Decimal 
type").




> 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
>
> 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.
> In the context of type inference, the current behavior 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.) However, 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (DRILL-4552) Treat decimal literals as Double when planner.enable_decimal_data_type is off

2016-04-27 Thread Sean Hsuan-Yi Chu (JIRA)

 [ 
https://issues.apache.org/jira/browse/DRILL-4552?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sean Hsuan-Yi Chu updated DRILL-4552:
-
Summary: Treat decimal literals as Double when 
planner.enable_decimal_data_type is off  (was: Treat decimal literals as Double 
when type inference is taking place)

> 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
>
> In SQL standard, decimal literals (e.g., 1.2, 2.5, etc) are decimal types. 
> However, currently, Drill always converts them to Double in DrillOptiq.
> Since they will be converted as Double in execution anyway, at inference, we 
> can treat them as Double to help determine the return types. 
> (The current behavior is "not to do any inference if the operand is Decimal 
> type").



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)