[ 
https://issues.apache.org/jira/browse/HIVE-24848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17295569#comment-17295569
 ] 

Rajkumar Singh commented on HIVE-24848:
---------------------------------------

upon further investigating realized that it's same 
https://issues.apache.org/jira/browse/HIVE-24113 but error is in different 
flavor. closing the JIRA marking as duplicate.

> CBO failed with NPE
> -------------------
>
>                 Key: HIVE-24848
>                 URL: https://issues.apache.org/jira/browse/HIVE-24848
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 3.1.1
>            Reporter: Rajkumar Singh
>            Priority: Major
>
> CBO failed for query having a predicate based on from_unixtime udf
> select * from classification where 
> CAST(from_unixtime(unix_timestamp(cast(partition_batch_ts as 
> string),'yyyyMMddHHmmss')) AS TIMESTAMP) = '2021-02-26 02:00:00';
> {code:java}
> 2021-03-04 10:08:58,844 ERROR org.apache.hadoop.hive.ql.parse.CalcitePlanner: 
> [4d92f6e5-9a53-41fb-b53f-9003c338ab52 etp2107079200-38767]: CBO failed, 
> skipping CBO.
> java.lang.RuntimeException: 
> org.apache.hadoop.hive.ql.parse.SemanticException: 
> java.lang.NullPointerException
>         at 
> org.apache.calcite.tools.Frameworks.withPrepare(Frameworks.java:159) 
> ~[calcite-core-1.19.0.7.1.3.0-100.jar:1.19.0.7.1.3.0-100]
>         at 
> org.apache.calcite.tools.Frameworks.withPlanner(Frameworks.java:114) 
> ~[calcite-core-1.19.0.7.1.3.0-100.jar:1.19.0.7.1.3.0-100]
>         at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.logicalPlan(CalcitePlanner.java:1544)
>  ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:529)
>  ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12667)
>  ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:422)
>  ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:288)
>  ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:221) 
> ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:104) 
> ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:188) 
> ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:598) 
> ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:544) 
> ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:538) 
> ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:127)
>  ~[hive-exec-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:199)
>  ~[hive-service-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:260)
>  ~[hive-service-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hive.service.cli.operation.Operation.run(Operation.java:274) 
> ~[hive-service-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementInternal(HiveSessionImpl.java:565)
>  ~[hive-service-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at 
> org.apache.hive.service.cli.session.HiveSessionImpl.executeStatementAsync(HiveSessionImpl.java:551)
>  ~[hive-service-3.1.3000.7.1.3.0-100.jar:3.1.3000.7.1.3.0-100]
>         at sun.reflect.GeneratedMethodAccessor207.invoke(Unknown Source) 
> ~[?:?]
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  ~[?:1.8.0_282]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_282]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to