Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-23550

GetSplits does not retries queries for CacliteSemanticException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 3.1.0
    • None
    • UDF
    • None

    Description

      Reproducible case:

      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);

       

      Error:

      Error: java.io.IOException: org.apache.hadoop.hive.ql.optimizer.calcite.CalciteSemanticException: Distinct without an aggregation. (state=,code=0)
      

      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.

       

      Attachments

        Activity

          People

            adeshrao Adesh Kumar Rao
            adeshrao Adesh Kumar Rao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: