You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jinfeng Ni (JIRA)" <ji...@apache.org> on 2015/02/14 03:44:11 UTC

[jira] [Created] (DRILL-2250) Parquet reader hit ExecutionSetupException when reading decimal columns created using CTAS from another parquet files

Jinfeng Ni created DRILL-2250:
---------------------------------

             Summary: Parquet reader hit ExecutionSetupException when reading decimal columns created using CTAS from another parquet files
                 Key: DRILL-2250
                 URL: https://issues.apache.org/jira/browse/DRILL-2250
             Project: Apache Drill
          Issue Type: Bug
          Components: Storage - Parquet, Storage - Writer
            Reporter: Jinfeng Ni
            Assignee: Steven Phillips


Not sure if this is related to DRILL-2249, since the error seems to be different.

On today's master commit:

select commit_id from sys.version;
+------------+
| commit_id  |
+------------+
| 4ed0a8d68ec5ef344fb54ff7c9d857f7f3f153aa |
+------------+

If I create a parquet file containing decimal types, using the following CTAS
{code}
create table my_dec_table as select cast(l_quantity as decimal(10,2)) dec1, cast(l_discount as decimal(10,2)) dec2, cast(l_tax as decimal(10,2)) as dec3 from cp.`tpch/lineitem.parquet` ;

+------------+---------------------------+
|  Fragment  | Number of records written |
+------------+---------------------------+
| 0_0        | 60175                     |
+------------+---------------------------+
1 row selected (1.71 seconds)

{code}

Then, if I want to query this new parquet file with :
{code}
select * from my_dec_table;

RemoteRpcException: Failure while running fragment., org.apache.drill.exec.vector.Decimal18Vector cannot be cast to org.apache.drill.exec.vector.BigIntVector [ de164ae4-2d2b-4257-bafb-3ca5165678f9 on 10.250.0.8:31010 ]
[ de164ae4-2d2b-4257-bafb-3ca5165678f9 on 10.250.0.8:31010 ]

select dec1, dec2, dec3 from my_dec_table;

Query failed: RemoteRpcException: Failure while running fragment., org.apache.drill.exec.vector.Decimal18Vector cannot be cast to org.apache.drill.exec.vector.BigIntVector [ 0f5b41c3-1ab3-43b4-9742-cea622d3f476 on 10.250.0.8:31010 ]
[ 0f5b41c3-1ab3-43b4-9742-cea622d3f476 on 10.250.0.8:31010 ]

{code}

parquet-tools shows the following schema information for the generated parquet file:

{code}
message root {
  required int64 dec1 (DECIMAL(10,2));
  required int64 dec2 (DECIMAL(10,2));
  required int64 dec3 (DECIMAL(10,2));
}
{code}





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