You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Adesh Kumar Rao (Jira)" <ji...@apache.org> on 2020/06/03 11:33:00 UTC

[jira] [Resolved] (HIVE-23550) GetSplits does not retries queries for CacliteSemanticException

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

Adesh Kumar Rao resolved HIVE-23550.
------------------------------------
    Fix Version/s:     (was: 4.0.0)
       Resolution: Invalid

HIVE-21641 changed the usage of CalciteAnalyzer from just CalciteAnalyzer.genLogicalPlan to fully analyzing (CalciteAnalyzer.analyze) the query. That includes the retry logic for calcite semantic exceptions too.

 

Closing this.

> GetSplits does not retries queries for CacliteSemanticException
> ---------------------------------------------------------------
>
>                 Key: HIVE-23550
>                 URL: https://issues.apache.org/jira/browse/HIVE-23550
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 3.1.0
>            Reporter: Adesh Kumar Rao
>            Assignee: Adesh Kumar Rao
>            Priority: Major
>
> Reproducible case:
> {noformat}
> create table t1 (c1 int, c2 int, c3 int);
> select get_splits("select c2, count(distinct c3) from t1 group by c2 having count(distinct c3) > 1",0);{noformat}
>  
> Error:
> {noformat}
> Error: java.io.IOException: org.apache.hadoop.hive.ql.optimizer.calcite.CalciteSemanticException: Distinct without an aggregation. (state=,code=0)
> {noformat}
> This happens because calcite does not understand the query "select c2, count(distinct c3) from t1 group by c2 having count(distinct c3) > 1" and throws calciteSemanticException
>  
> If this query is run directly via beeline, hiveserver2 catches this exception and re-analyzes the query by turning off the cbo.
>  
> This retrying mechanism is missing in GetSplits UDF.
>  



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