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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Kudu_Impala
    • Fix Version/s: Impala 2.8.0
    • Component/s: Catalog
    • Labels:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: