[ 
https://issues.apache.org/jira/browse/DRILL-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14729951#comment-14729951
 ] 

Kristine Hahn commented on DRILL-3056:
--------------------------------------

[~vicky] done. See staging site: 
http://kristinehahn.github.io/drill/docs/supported-data-types/#disabling-the-decimal-type

> Numeric literal in an IN list is casted to decimal even when decimal type is 
> disabled
> -------------------------------------------------------------------------------------
>
>                 Key: DRILL-3056
>                 URL: https://issues.apache.org/jira/browse/DRILL-3056
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 1.0.0
>            Reporter: Victoria Markman
>            Assignee: Mehant Baid
>              Labels: document
>             Fix For: 1.2.0
>
>
> {code}
> 0: jdbc:drill:schema=dfs> select * from sys.options where name like 
> '%decimal%';
> +------------+------------+------------+------------+------------+------------+------------+------------+
> |    name    |    kind    |    type    |   status   |  num_val   | string_val 
> |  bool_val  | float_val  |
> +------------+------------+------------+------------+------------+------------+------------+------------+
> | planner.enable_decimal_data_type | BOOLEAN    | SYSTEM     | DEFAULT    | 
> null       | null       | false      | null       |
> +------------+------------+------------+------------+------------+------------+------------+------------+
> 1 row selected (0.212 seconds)
> {code}
> In list that contains more than 20 numeric literals.
> We are casting number with the decimal point to decimal type even though 
> decimal type is disabled:
> {code}
> 0: jdbc:drill:schema=dfs> explain plan including all attributes for select * 
> from t1 where a1 in 
> (1,2,3,4,5,6,7,8,9,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25.0);
> +------------+------------+
> |    text    |    json    |
> +------------+------------+
> | 00-00    Screen : rowType = RecordType(ANY *): rowcount = 10.0, cumulative 
> cost = {24.0 rows, 158.0 cpu, 0.0 io, 0.0 network, 35.2 memory}, id = 4921
> 00-01      Project(*=[$0]) : rowType = RecordType(ANY *): rowcount = 10.0, 
> cumulative cost = {23.0 rows, 157.0 cpu, 0.0 io, 0.0 network, 35.2 memory}, 
> id = 4920
> 00-02        Project(T7¦¦*=[$0]) : rowType = RecordType(ANY T7¦¦*): rowcount 
> = 10.0, cumulative cost = {23.0 rows, 157.0 cpu, 0.0 io, 0.0 network, 35.2 
> memory}, id = 4919
> 00-03          HashJoin(condition=[=($2, $3)], joinType=[inner]) : rowType = 
> RecordType(ANY T7¦¦*, ANY a1, ANY a10, DECIMAL(11, 1) ROW_VALUE): rowcount = 
> 10.0, cumulative cost = {23.0 rows, 157.0 cpu, 0.0 io, 0.0 network, 35.2 
> memory}, id = 4918
> 00-05            Project(T7¦¦*=[$0], a1=[$1], a10=[$1]) : rowType = 
> RecordType(ANY T7¦¦*, ANY a1, ANY a10): rowcount = 10.0, cumulative cost = 
> {10.0 rows, 20.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 4915
> 00-07              Project(T7¦¦*=[$0], a1=[$1]) : rowType = RecordType(ANY 
> T7¦¦*, ANY a1): rowcount = 10.0, cumulative cost = {10.0 rows, 20.0 cpu, 0.0 
> io, 0.0 network, 0.0 memory}, id = 4914
> 00-08                Scan(groupscan=[ParquetGroupScan 
> [entries=[ReadEntryWithPath [path=maprfs:/drill/testdata/subqueries/t1]], 
> selectionRoot=/drill/testdata/subqueries/t1, numFiles=1, columns=[`*`]]]) : 
> rowType = (DrillRecordRow[*, a1]): rowcount = 10.0, cumulative cost = {10.0 
> rows, 20.0 cpu, 0.0 io, 0.0 network, 0.0 memory}, id = 4913
> 00-04            HashAgg(group=[{0}]) : rowType = RecordType(DECIMAL(11, 1) 
> ROW_VALUE): rowcount = 1.0, cumulative cost = {2.0 rows, 9.0 cpu, 0.0 io, 0.0 
> network, 17.6 memory}, id = 4917
> 00-06              Values : rowType = RecordType(DECIMAL(11, 1) ROW_VALUE): 
> rowcount = 1.0, cumulative cost = {1.0 rows, 1.0 cpu, 0.0 io, 0.0 network, 
> 0.0 memory}, id = 4916
> {code}



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

Reply via email to