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

Aihua Xu updated HIVE-13855:
----------------------------
    Status: Patch Available  (was: Open)

patch-1: process no plan case rather than throwing NPE. Since such query throws 
the NPE exception but such exception is caught outside, the query will succeed. 
We already have test case cover it, so I didn't add test case. It's better not 
to throw and log such NPE for a valid case.

> select INPUT__FILE__NAME throws NPE exception
> ---------------------------------------------
>
>                 Key: HIVE-13855
>                 URL: https://issues.apache.org/jira/browse/HIVE-13855
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Aihua Xu
>            Assignee: Aihua Xu
>         Attachments: HIVE-13855.1.patch
>
>
> The following query executes successfully
> select INPUT__FILE__NAME from src limit 1;
> But the following NPE is thrown
> {noformat}
> 16/05/25 16:49:49 ERROR exec.Utilities: Failed to load plan: null: 
> java.lang.NullPointerException
> java.lang.NullPointerException
>         at 
> org.apache.hadoop.hive.ql.exec.Utilities.getBaseWork(Utilities.java:407)
>         at 
> org.apache.hadoop.hive.ql.exec.Utilities.getMapWork(Utilities.java:299)
>         at 
> org.apache.hadoop.hive.ql.io.HiveContextAwareRecordReader.doNext(HiveContextAwareRecordReader.java:315)
>         at 
> org.apache.hadoop.hive.ql.io.HiveRecordReader.doNext(HiveRecordReader.java:79)
>         at 
> org.apache.hadoop.hive.ql.exec.FetchOperator$1.doNext(FetchOperator.java:340)
>         at 
> org.apache.hadoop.hive.ql.exec.FetchOperator$1.doNext(FetchOperator.java:331)
>         at 
> org.apache.hadoop.hive.ql.io.HiveContextAwareRecordReader.next(HiveContextAwareRecordReader.java:116)
>         at 
> org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:484)
>         at 
> org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:424)
>         at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:144)
>         at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1884)
>         at 
> org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:252)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:183)
>         at 
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:399)
>         at 
> org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:776)
>         at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:714)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> {noformat}



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

Reply via email to