drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krystal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-1301) Fail to query from hive tables that have decimal columns
Date Thu, 14 Aug 2014 16:18:15 GMT

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

Krystal commented on DRILL-1301:
--------------------------------

Sever Error:

java.lang.IllegalArgumentException: Error: ',', ':', or ';' expected at position 7 from 'decimal(6,2)'
[0:decimal, 7:(, 8:6, 9:,, 10:2, 11:)]
org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils$TypeInfoParser.parseTypeInfos(TypeInfoUtils.java:312)
~[drill-hive-exec-shaded-0.5.0-incubating-SNAPSHOT.jar:0.5.0-incubating-SNAPSHOT]
org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils.getTypeInfoFromTypeString(TypeInfoUtils.java:721)
~[drill-hive-exec-shaded-0.5.0-incubating-SNAPSHOT.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.store.hive.schema.DrillHiveTable.getRowType(DrillHiveTable.java:59)
~[drill-storage-hive-core-0.5.0-incubating-SNAPSHOT.jar:0.5.0-incubating-SNAPSHOT]
net.hydromatic.optiq.prepare.OptiqCatalogReader.getTableFrom(OptiqCatalogReader.java:94) ~[optiq-core-0.9-20140730.000241-5.jar:na]
net.hydromatic.optiq.prepare.OptiqCatalogReader.getTable(OptiqCatalogReader.java:70) ~[optiq-core-0.9-20140730.000241-5.jar:na]
net.hydromatic.optiq.prepare.OptiqCatalogReader.getTable(OptiqCatalogReader.java:42) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.EmptyScope.getTableNamespace(EmptyScope.java:67) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.IdentifierNamespace.validateImpl(IdentifierNamespace.java:75) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:85) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:779) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:768) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:2599) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:2802) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:85) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:779) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:768) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.SqlSelect.validate(SqlSelect.java:208) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:742)
~[optiq-core-0.9-20140730.000241-5.jar:na]
org.eigenbase.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:458) ~[optiq-core-0.9-20140730.000241-5.jar:na]
net.hydromatic.optiq.prepare.PlannerImpl.validate(PlannerImpl.java:173) ~[optiq-core-0.9-20140730.000241-5.jar:na]
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.validateNode(DefaultSqlHandler.java:137)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:117)
~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:128) ~[drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:403) [drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:219) [drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:250) [drill-java-exec-0.5.0-incubating-SNAPSHOT-rebuffed.jar:0.5.0-incubating-SNAPSHOT]
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]


> 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
>
> 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.2#6252)

Mime
View raw message