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

Fix DROP TABLE to pass analysis if the table fails to load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Kudu_Impala
    • Impala 2.8.0
    • Catalog

    Description

      In general, we want to be able to drop tables even if they fail to load, since otherwise you might end up with a table in a bad state that can't be dropped.

      For example, if a Kudu table is created as a managed table in Impala, then dropped directly in Kudu (i.e. HMS still thinks it exists), then the table must be dropped with "DROP TABLE IF EXISTS". Other operations (including setting TBLPROPERTIES) will fail w/ the error that the table cannot be loaded.

      If table 'managed_kudu' is in this state, regular operations will fail because the table does not exist, but even attempting to drop the table without this workaround result in this error:

      ERROR: AnalysisException: The table does not exist: table_name: "managed_kudu"
      CAUSED BY: TableLoadingException: The table does not exist: table_name: "managed_kudu"
      

      Dropping with `IF EXISTS` does work:

      [localhost:21000] > drop table if exists managed_kudu;
      Query: drop table if exists managed_kudu
      

      Attachments

        Activity

          People

            twmarshall Thomas Tauber-Marshall
            mjacobs Matthew Jacobs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: