You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/02/13 20:30:12 UTC
[jira] [Created] (DRILL-2243) Table created as cast of literal to
any decimal type either can not be read back or produces incrorrect result
Victoria Markman created DRILL-2243:
---------------------------------------
Summary: 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
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(28,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)