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

User friendly error message when MV rewriting fails

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • CBO
    • None

    Description

      If materialized view rewriting fails because an unsupported SQL clause or operator is used we got an error message like this:

      FAILED: SemanticException Cannot enable automatic rewriting for materialized view. Unsupported RelNode type HiveSortExchange encountered in the query plan
      

      This refers to the HiveSortExchange operator. This is introduced to CBO plan if the statement has sort by clause which may not clear for the user.

      create materialized view cmv_mat_view as select a, b, c from cmv_basetable sort by a;
      

      Attachments

        1. HIVE-23130.2.patch
          5 kB
          Krisztian Kasa
        2. HIVE-23130.1.patch
          4 kB
          Krisztian Kasa
        3. HIVE-23130.1.patch
          4 kB
          Krisztian Kasa

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              kkasa Krisztian Kasa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: