hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vineet Garg (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-19990) Query with interval literal in join condition fails
Date Tue, 03 Jul 2018 17:52:00 GMT

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

Vineet Garg updated HIVE-19990:
-------------------------------
    Attachment: HIVE-19990.3.patch

> Query with interval literal in join condition fails
> ---------------------------------------------------
>
>                 Key: HIVE-19990
>                 URL: https://issues.apache.org/jira/browse/HIVE-19990
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning
>            Reporter: Vineet Garg
>            Assignee: Vineet Garg
>            Priority: Major
>         Attachments: HIVE-19990.1.patch, HIVE-19990.2.patch, HIVE-19990.3.patch
>
>
> *Reproducer*
> {code:sql}
> > create table date_dim_d1(
> 	d_week_seq                int,
> 	d_date                    string);
> > SELECT 
>        d1.d_week_seq
> FROM   
>        date_dim_d1 d1 
>        JOIN date_dim_d1 d3 
> WHERE  
>        Cast(d3.d_date AS date) > Cast(d1.d_date AS date) + INTERVAL '5' day ;
> {code}
> *Exception*
> {code}
> org.apache.hadoop.hive.ql.parse.SemanticException: '5 00:00:00.000000000' encountered
with 0 children
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.parseJoinCondPopulateAlias(SemanticAnalyzer.java:2780)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.parseJoinCondPopulateAlias(SemanticAnalyzer.java:2775)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.parseJoinCondition(SemanticAnalyzer.java:3060)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.parseJoinCondition(SemanticAnalyzer.java:2959)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genJoinTree(SemanticAnalyzer.java:9633)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:11380)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:11285)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genOPTree(SemanticAnalyzer.java:12071)
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.genOPTree(CalcitePlanner.java:593)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:12150)
> 	at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:330)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:288)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:658)
> 	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1829)
> 	at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1776)
> 	at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:1771)
> 	at org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
> 	at org.apache.hadoop.hive.ql.reexec.ReExecDriver.run(ReExecDriver.java:214)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:239)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:188)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:402)
> 	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:832)
> 	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:770)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:694)
> 	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:239)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:153)
> {code}



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

Mime
View raw message