While loading a table from a query that returns empty data results in null 
pointer exception 
---------------------------------------------------------------------------------------------

                 Key: HIVE-230
                 URL: https://issues.apache.org/jira/browse/HIVE-230
             Project: Hadoop Hive
          Issue Type: Bug
          Components: Query Processor
            Reporter: Prasad Chakka
            Assignee: Prasad Chakka


If the select query returns zero rows then the insert will fail with null 
pointer exception
INSERT OVERWRITE TABLE test_pc SELECT a.userid, a.ip FROM test_pc2 a WHERE 
(userid=595058415);

2009-01-13 10:16:21,396 ERROR exec.MoveTask (SessionState.java:printError(254)) 
- Failed with exception null
java.lang.NullPointerException
        at org.apache.hadoop.hive.ql.exec.MoveTask.execute(MoveTask.java:127)
        at org.apache.hadoop.hive.ql.Driver.run(Driver.java:212)
        at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:174)
        at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:207)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:305)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:166)
        at org.apache.hadoop.mapred.JobShell.run(JobShell.java:194)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.mapred.JobShell.main(JobShell.java:220)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to