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

Creating a materialized view with no tables should be handled more gracefully

    XMLWordPrintableJSON

Details

    Description

      Currently, materialized views without a table reference are not supported. However, instead of printing a clear message about it, when a materialized view is created without a table reference, we fail with an unclear message.

      > create materialized view mv_test1 as select 5;
      (...)
      ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Add request failed :
      INSERT INTO MV_TABLES_USED (MV_CREATION_METADATA_ID,TBL_ID) VALUES (?,?) )
      INFO : Completed executing command(queryId=hive_20190916203511_b609cccf-f5e3-45dd-abfd-6e869d94e39a); Time taken: 10.469 seconds
      Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaExcep
      tion(message:Add request failed : INSERT INTO MV_TABLES_USED (MV_CREATION_METADATA_ID,TBL_ID) VALUES (?,?) ) (state=08S01,code=1)
      

      Attachments

        1. HIVE-22209.2.patch
          2 kB
          Steve Carlin
        2. HIVE-22209.1.patch
          2 kB
          Steve Carlin
        3. HIVE-22209.patch
          2 kB
          Steve Carlin

        Issue Links

          Activity

            People

              scarlin Steve Carlin
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m