hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remus Rusanu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-15647) Combination of a boolean condition and null-safe comparison leads to NPE
Date Tue, 17 Jan 2017 14:03:26 GMT

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

Remus Rusanu updated HIVE-15647:
--------------------------------
    Status: Patch Available  (was: Open)

> Combination of a boolean condition and null-safe comparison leads to NPE
> ------------------------------------------------------------------------
>
>                 Key: HIVE-15647
>                 URL: https://issues.apache.org/jira/browse/HIVE-15647
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Carter Shanklin
>            Assignee: Remus Rusanu
>            Priority: Minor
>         Attachments: HIVE-15647.01.patch
>
>
> Here's a simple example with the foodmart database:
> {code}
> hive> explain select count(*) from
>     > sales_fact_1997 join store on sales_fact_1997.store_id = store.store_id
>     > where ((store.salad_bar)) and ((store_number) <=> (customer_id));
> FAILED: NullPointerException null
> {code}
> This happens on trunk and on HDP 2.5.3 / Hive 2. If you use = the NPE doesn't happen.
If you remove the boolean condition the NPE doesn't happen.
> {code}
> FAILED: NullPointerException null
> 2016-12-13T18:23:33,604 ERROR [c4b7242e-1252-4709-8adf-22f631af75e8 main] ql.Driver:
FAILED: NullPointerException null
> java.lang.NullPointerException
> 	at org.apache.hadoop.hive.ql.optimizer.ConstantPropagateProcFactory$ConstantPropagateFilterProc.process(ConstantPropagateProcFactory.java:1047)
> 	at org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher.dispatch(DefaultRuleDispatcher.java:90)
> 	at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatchAndReturn(DefaultGraphWalker.java:105)
> 	at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.dispatch(DefaultGraphWalker.java:89)
> 	at org.apache.hadoop.hive.ql.optimizer.ConstantPropagate$ConstantPropagateWalker.walk(ConstantPropagate.java:151)
> 	at org.apache.hadoop.hive.ql.lib.DefaultGraphWalker.startWalking(DefaultGraphWalker.java:120)
> 	at org.apache.hadoop.hive.ql.optimizer.ConstantPropagate.transform(ConstantPropagate.java:120)
> 	at org.apache.hadoop.hive.ql.optimizer.Optimizer.optimize(Optimizer.java:242)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:10913)
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:246)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:250)
> 	at org.apache.hadoop.hive.ql.parse.ExplainSemanticAnalyzer.analyzeInternal(ExplainSemanticAnalyzer.java:75)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:250)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:435)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:326)
> 	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1169)
> 	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1262)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1095)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1083)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:232)
> 	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:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
> {code}



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

Mime
View raw message