Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-9717

Table Should be Loaded When Creating a Duplicated Table

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: Impala 2.12.0
    • Fix Version/s: None
    • Component/s: Catalog
    • Labels:
      None
    • Epic Color:
      ghx-label-13

      Description

      I tried to create a already-existing tables in impala clusters, impala reports normal `Table Already Exists` error. But when I try to drop the table, it reports weird `Table does not exist`:

      0: jdbc:hive2://bronze-impala:2> CREATE TABLE IF NOT EXISTS hawkeye_alert_test_1488005975517 (id INT, ts BIGINT);
      Table already exists
      +----------+--+
      | summary  |
      +----------+--+
      +----------+--+
      No rows selected (1.96 seconds)
      0: jdbc:hive2://bronze-impala:2> drop table hawkeye_alert_test_1488005975517;
      Error: AnalysisException: Table does not exist: default.hawkeye_alert_test_1488005975517 (state=HY000,code=0)
      

       

      It could be re-produced easily; 

       

      The root cause is that when `table already exists` happened in CatalogOpExecutor, catalog didn't setup the catalog version, instead, a version 0 is set by default in TCatalogUpdateResult

      Catalog should load and return the table information to coordinator when the table is trying to be created but found already exists;

       

        Attachments

        1. image-2020-05-02-10-38-36-216.png
          220 kB
          wuchang
        2. image-2020-05-02-10-38-03-250.png
          214 kB
          wuchang

          Activity

            People

            • Assignee:
              wuchang1989 wuchang
              Reporter:
              wuchang1989 wuchang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated: