drill-issues mailing list archives

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

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

Deneche A. Hakim commented on DRILL-2243:
-----------------------------------------

once DRILL-2262 is committed you shouldn't see failures to read from tables anymore for {{DECIMAL9}}
and {{DECIMAL18}}, but the displayed results might still be wrong.

DRILL-2300 is similar to this and also checks the "new" parquet reader.

> 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: Steven Phillips
>            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