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

Victoria Markman commented on DRILL-3578:
-----------------------------------------

This particular case is fixed in 1.4.0

{code}
#Tue Dec 08 03:32:09 UTC 2015
git.commit.id.abbrev=b906811
git.commit.user.email=amit.ha...@gmail.com
git.commit.message.full=DRILL-4165 Add a precondition for size of merge join 
record batch.\n
git.commit.id=b9068117177c3b47025f52c00f67938e0c3e4732
{code}

{code}
[Fri Oct 02 09:31:31 root@~ ] # sqlline
apache drill 1.2.0 
"just drill it"
0: jdbc:drill:schema=dfs> select * from dfs.`test/type_test`;
+------+-------+--------------+---------+
| num  | word  |     dtg      | dollar  |
+------+-------+--------------+---------+
| 1    | One   | [B@28b12ebd  | 1.0     |
| 2    | Two   | [B@8738f2a   | 2.0     |
+------+-------+--------------+---------+
2 rows selected (2.815 seconds)
{code}

{code}
0: jdbc:drill:schema=dfs> select num, word, 
CONVERT_FROM(dtg,'TIMESTAMP_IMPALA') from dfs.`test/type_test`;
+------+-------+------------------------+
| num  | word  |         EXPR$2         |
+------+-------+------------------------+
| 1    | One   | 2015-01-01 00:01:00.0  |
| 2    | Two   | 2015-01-02 00:02:00.0  |
+------+-------+------------------------+
2 rows selected (0.741 seconds)
{code}

It's unfortunate that we called parameter to CONVERT_FROM 'TIMESTAMP_IMPALA' 
... Here customer is querying Hive table. Wish I thought about it before ... 
'TIMESTAMP_EXTERNAL' or both TIMESTAMP_HIVE or TIMESTAMP_IMPALA which are the 
same would have been better choice probably.

> UnsupportedOperationException: Unable to get value vector class for minor 
> type [FIXEDBINARY] and mode [OPTIONAL]
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-3578
>                 URL: https://issues.apache.org/jira/browse/DRILL-3578
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>    Affects Versions: 1.1.0
>            Reporter: Hao Zhu
>            Assignee: Parth Chandra
>            Priority: Critical
>             Fix For: 1.3.0
>
>
> The issue is Drill fails to read "timestamp" type in parquet file generated 
> by Hive.
> How to reproduce:
> 1. Create a external Hive CSV table in hive 1.0:
> {code}
> create external table type_test_csv
> (
>   id1 int,
>   id2 string,
>   id3 timestamp,
>   id4 double
> )
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY ','
> STORED AS TEXTFILE
> LOCATION '/xxx/testcsv';
> {code}
> 2. Put sample data for above external table:
> {code}
> 1,One,2015-01-01 00:01:00,1.0
> 2,Two,2015-01-02 00:02:00,2.0
> {code}
> 3. Create a parquet hive table:
> {code}
> create external table type_test
> (
>   id1 int,
>   id2 string,
>   id3 timestamp,
>   id4 double
> )
> STORED AS PARQUET
> LOCATION '/xxx/type_test';
> INSERT OVERWRITE TABLE type_test
>   SELECT * FROM type_test_csv;
> {code}
> 4. Then querying the parquet file directly through filesystem storage plugin:
> {code}
> > select * from dfs.`xxx/type_test`;
> Error: SYSTEM ERROR: UnsupportedOperationException: Unable to get value 
> vector class for minor type [FIXEDBINARY] and mode [OPTIONAL]
> Fragment 0:0
> [Error Id: fccfe8b2-6427-46e5-8bfd-cac639e526e8 on h3.poc.com:31010] 
> (state=,code=0)
> {code}
> 5. If the sample data is only 1 row:
> {code}
> 1,One,2015-01-01 00:01:00,1.0
> {code}
> Then the error message would become:
> {code}
> > select * from dfs.`xxx/type_test`;
> Error: SYSTEM ERROR: UnsupportedOperationException: Unsupported type:INT96
> [Error Id: b52b5d46-63a8-4be6-a11d-999a1b46c7c2 on h3.poc.com:31010] 
> (state=,code=0)
> {code}
> Using Hive storage plugin works fine. This issue only applies to filesystem 
> storage plugin.



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

Reply via email to