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

"CREATE VIEW IF NOT EXISTS" fails if view already exists

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 4.0.0-alpha-1
    • None
    • None
    • HDP 3.0

      Hive 3.1.0.3.0.0.0-1634

    • Reviewed

    Description

      After upgrading to Hive 3.1 from Hive 1.2, I can't run my queries anymore. It seems that "if not exists" is ignored in "create view".

      Example:

      1. create view if not exists test as select 1;
      2. create view if not exists test as select 1;

      The second call fails with "Table already exists: default.test". I changed this to "create or replace view" as a workaround.

      Also documented link here

      Attachments

        1. HIVE-20462.1.patch
          2 kB
          Daniel Dai

        Issue Links

          Activity

            People

              daijy Daniel Dai
              melmoth static-max
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: