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

Venki Korukanti commented on DRILL-1301:
----------------------------------------

Hive table is created in Hive 0.13, but Hive storage plugin in Drill is only 
supports Hive 0.12 tables. Either of the following can work:

1. Use Hive 0.12 which needs decimal type in table definition to be changed to 
just DECIMAL with no precision and scale
2. Apply DRILL-1347 patch which upgrades Hive storage plugin to Hive 0.13.

> Fail to query from hive tables that have decimal columns
> --------------------------------------------------------
>
>                 Key: DRILL-1301
>                 URL: https://issues.apache.org/jira/browse/DRILL-1301
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Hive
>    Affects Versions: 0.5.0
>            Reporter: Krystal
>            Assignee: Aditya Kishore
>            Priority: Blocker
>             Fix For: 0.6.0
>
>
> git.commit.id.abbrev=687b9b0
> I have a table in hive with the following schema:
> hive> describe voter_test;
> OK
> voter_id              int                                         
> name                  varchar(30)                                 
> age                   tinyint                                     
> registration          string                                      
> contributions         decimal(6,2)                                
> voterzone             smallint                                    
> create_time           timestamp  
> When I run any select against this table from drill, it fails with parsing 
> error:
> 0: jdbc:drill:schema=hive> select * from voter_test limit 5;
> Query failed: Failure while parsing sql. Error: ',', ':', or ';' expected at 
> position 7 from 'decimal(6,2)' [0:decimal, 7:(, 8:6, 9:,, 10:2, 11:)] 
> [2a97a3ae-b9cd-409b-bab6-359febb023b3]
> Error: exception while executing query: Failure while trying to get next 
> result batch. (state=,code=0)
> I went back to hive and created another table using float instead of decimal 
> for the contributions field and the queries against this table run 
> successfully.
> hive> describe voter_test1;
> OK
> voter_id              int                                         
> name                  varchar(30)                                 
> age                   tinyint                                     
> registration          string                                      
> contributions         float                                       
> voterzone             smallint                                    
> create_time           timestamp                                



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

Reply via email to