drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deneche A. Hakim (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-2243) Table created as cast of literal to any decimal type either can not be read back or produces incrorrect result
Date Thu, 26 Mar 2015 22:34:57 GMT

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

Deneche A. Hakim resolved DRILL-2243.
-------------------------------------
    Resolution: Duplicate

DRILL-2253 should fix the issue for Decimal8/Decimal18
DRILL-2220 will fix the issue for Decimal28/Decimal38

> Table created as cast of literal to any decimal type either can not be read back or produces
incrorrect result
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-2243
>                 URL: https://issues.apache.org/jira/browse/DRILL-2243
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Parquet
>    Affects Versions: 0.8.0
>            Reporter: Victoria Markman
>            Assignee: Deneche A. Hakim
>            Priority: Critical
>             Fix For: 0.9.0
>
>
> This bug looks suspiciously similar to drill-2220, but assert is different + wrong result.
> Decimal9 : failure to read from the table
> {code}
> 0: jdbc:drill:schema=dfs> select cast('1.2' as decimal(8,2)) from `test.json`;
> +------------+
> |   EXPR$0   |
> +------------+
> | 1.20       |
> | 1.20       |
> | 1.20       |
> | 1.20       |
> | 1.20       |
> | 1.20       |
> +------------+
> 6 rows selected (0.081 seconds)
> 0: jdbc:drill:schema=dfs> create table temp(c1) as select cast('1.2' as decimal(8,2))
from `test.json`;
> +------------+---------------------------+
> |  Fragment  | Number of records written |
> +------------+---------------------------+
> | 0_0        | 6                         |
> +------------+---------------------------+
> 1 row selected (0.193 seconds)
> 0: jdbc:drill:schema=dfs> select * from temp;
> Query failed: RemoteRpcException: Failure while running fragment., org.apache.drill.exec.vector.Decimal9Vector
cannot be cast to org.apache.drill.exec.vector.IntVector [ 33d801e0-a1d4-4999-9aac-e35f445018bb
on atsqa4-133.qa.lab:31010 ]
> [ 33d801e0-a1d4-4999-9aac-e35f445018bb on atsqa4-133.qa.lab:31010 ]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> Decimal18 : failure to read from the table
> {code}
> 0: jdbc:drill:schema=dfs> select cast('1.2' as decimal(18,2)) from `test.json`;
> +------------+
> |   EXPR$0   |
> +------------+
> | 1.20       |
> | 1.20       |
> | 1.20       |
> | 1.20       |
> | 1.20       |
> | 1.20       |
> +------------+
> 6 rows selected (0.064 seconds)
> 0: jdbc:drill:schema=dfs> create table temp1(c1) as select cast('1.2' as decimal(18,2))
from `test.json`;
> +------------+---------------------------+
> |  Fragment  | Number of records written |
> +------------+---------------------------+
> | 0_0        | 6                         |
> +------------+---------------------------+
> 1 row selected (0.257 seconds)
> 0: jdbc:drill:schema=dfs> select * from temp1;
> Query failed: RemoteRpcException: Failure while running fragment., org.apache.drill.exec.vector.Decimal18Vector
cannot be cast to org.apache.drill.exec.vector.BigIntVector [ 5a23c757-9723-43cc-874b-18aaf62640a4
on atsqa4-133.qa.lab:31010 ]
> [ 5a23c757-9723-43cc-874b-18aaf62640a4 on atsqa4-133.qa.lab:31010 ]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> Decimal28 : wrong result
> {code}
> 0: jdbc:drill:schema=dfs> create table temp2(c1) as select cast('1.2' as decimal(28,2))
from `test.json`;
> +------------+---------------------------+
> |  Fragment  | Number of records written |
> +------------+---------------------------+
> | 0_0        | 6                         |
> +------------+---------------------------+
> 1 row selected (0.194 seconds)
> 0: jdbc:drill:schema=dfs> select * from temp2;
> +------------+
> |     c1     |
> +------------+
> | 12000000.00 |
> | 12000000.00 |
> | 12000000.00 |
> | 12000000.00 |
> | 12000000.00 |
> | 12000000.00 |
> +------------+
> 6 rows selected (0.057 seconds)
> {code}
> Decimal38: wrong result
> {code}
> 0: jdbc:drill:schema=dfs> create table temp4(c1) as select cast('1.2' as decimal(38,2))
from `test.json`;
> +------------+---------------------------+
> |  Fragment  | Number of records written |
> +------------+---------------------------+
> | 0_0        | 6                         |
> +------------+---------------------------+
> 1 row selected (0.214 seconds)
> 0: jdbc:drill:schema=dfs> select * from temp4;
> +------------+
> |     c1     |
> +------------+
> | 12000000.00 |
> | 12000000.00 |
> | 12000000.00 |
> | 12000000.00 |
> | 12000000.00 |
> | 12000000.00 |
> +------------+
> 6 rows selected (0.048 seconds)
> {code}



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

Mime
View raw message