You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Riju Trivedi (JIRA)" <ji...@apache.org> on 2019/04/29 11:08:00 UTC

[jira] [Updated] (HIVE-21061) CTAS query fails with IllegalStateException for empty source

     [ https://issues.apache.org/jira/browse/HIVE-21061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Riju Trivedi updated HIVE-21061:
--------------------------------
    Attachment: HIVE-21061.1.patch

> CTAS query fails with IllegalStateException for empty source
> ------------------------------------------------------------
>
>                 Key: HIVE-21061
>                 URL: https://issues.apache.org/jira/browse/HIVE-21061
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 3.1.0
>            Reporter: Riju Trivedi
>            Assignee: Riju Trivedi
>            Priority: Major
>         Attachments: HIVE-21061.1.patch, HIVE-21061.patch
>
>
> Creating a table using CTAS from an empty source table with predicate condition evaluating to False
> {code}
> create table testctas1 (id int);
> create table testctas2 as select * from testctas1 where 1=2;
> {code}
> Fails with below exception:
> {code}
> Caused by: java.lang.IllegalStateException: null
>  at com.google.common.base.Preconditions.checkState(Preconditions.java:159)
>  at org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.verifyAndSetVectorPartDesc(Vectorizer.java:1312)
>  at org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.validateInputFormatAndSchemaEvolution(Vectorizer.java:1654)
>  at org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.validateAndVectorizeMapWork(Vectorizer.java:1865)
>  at org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.convertMapWork(Vectorizer.java:1109)
>  at org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer$VectorizationDispatcher.dispatch(Vectorizer.java:961)
>  at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.dispatch(TaskGraphWalker.java:111)
>  at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.walk(TaskGraphWalker.java:180)
>  at org.apache.hadoop.hive.ql.lib.TaskGraphWalker.startWalking(TaskGraphWalker.java:125)
>  at org.apache.hadoop.hive.ql.optimizer.physical.Vectorizer.resolve(Vectorizer.java:2442)
>  at org.apache.hadoop.hive.ql.parse.TezCompiler.optimizeTaskPlan(TezCompiler.java:717)
>  at org.apache.hadoop.hive.ql.parse.TaskCompiler.compile(TaskCompiler.java:258)
>  at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12443)
>  at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:358)
>  at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:285)
>  at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:664)
>  at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1863)
>  at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1810)
>  at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1805)
>  at org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
>  at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:197)
>  ... 36 more
> {code}
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)