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

Eugene Koifman updated HIVE-18606:
----------------------------------
    Attachment: HIVE-18606.03.patch

> CTAS on empty table throws NPE from org.apache.hadoop.hive.ql.exec.MoveTask
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-18606
>                 URL: https://issues.apache.org/jira/browse/HIVE-18606
>             Project: Hive
>          Issue Type: Bug
>          Components: Transactions
>            Reporter: Eugene Koifman
>            Assignee: Eugene Koifman
>            Priority: Major
>         Attachments: HIVE-18606.01.patch, HIVE-18606.02.patch, 
> HIVE-18606.03.patch
>
>
> {noformat}
> @Test
> public void testCtasEmpty() throws Exception {
>   MetastoreConf.setBoolVar(hiveConf, 
> MetastoreConf.ConfVars.CREATE_TABLES_AS_ACID, true);
>   runStatementOnDriver("create table myctas stored as ORC as" +
>       " select a, b from " + Table.NONACIDORCTBL);
>   List<String> rs = runStatementOnDriver("select ROW__ID, a, b, 
> INPUT__FILE__NAME" +
>       " from myctas order by ROW__ID");
> }
> {noformat}
> {noformat}
> 2018-02-01T19:08:52,813 INFO  [HiveServer2-Background-Pool: Thread-463]: 
> metastore.HiveMetaStore (HiveMetaStore.java:logInfo(822)) - 114: Done 
> cleaning up thread local RawStore
> 2018-02-01T19:08:52,813 INFO  [HiveServer2-Background-Pool: Thread-463]: 
> HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(305)) - ugi=hive 
> ip=unknown-ip-addr      cmd=Done cleaning up thread local RawStore
> 2018-02-01T19:08:52,815 ERROR [HiveServer2-Background-Pool: Thread-463]: 
> exec.Task (SessionState.java:printError(1228)) - Failed with exception null
> java.lang.NullPointerException
>         at 
> org.apache.hadoop.hive.ql.metadata.Hive.moveAcidFiles(Hive.java:3816)
>         at org.apache.hadoop.hive.ql.exec.MoveTask.execute(MoveTask.java:298)
>         at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:205)
>         at 
> org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:97)
>         at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:2267)
>         at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1919)
>         at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1651)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1395)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1388)
>         at 
> org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:253)
>         at 
> org.apache.hive.service.cli.operation.SQLOperation.access$700(SQLOperation.java:92)
>         at 
> org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:345)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.security.auth.Subject.doAs(Subject.java:422)
>         at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1965)
>         at 
> org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:358)
>         at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> 2018-02-01T19:08:52,815 ERROR [HiveServer2-Background-Pool: Thread-463]: 
> ql.Driver (SessionState.java:printError(1228)) - FAILED: Execution Error, 
> return code 1 from {noformat}
>  



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

Reply via email to