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

GetSplits does not retries queries for CacliteSemanticException

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 3.1.0
    • Fix Version/s: None
    • Component/s: UDF
    • Labels:
      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

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              adeshrao Adesh Kumar Rao Assign to me
              Reporter:
              adeshrao Adesh Kumar Rao

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment