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

Remove "IDXS" Table from Metastore Schema

Log workAgile BoardRank to TopRank to BottomAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      In Hive 3 the rarely used "INDEXES" was removed from the DDL

      https://issues.apache.org/jira/browse/HIVE-18448

       

      There are a few issues here:

      1. The Standalone-Metastore schema for Hive 3+ all include the "IDXS" table, which has no function.
      2. The upgrade schemas from 2.x -> 3.x do not do any cleanup of the IDXS table
        • If a user used the "INDEXES" feature in 2.x and then upgrades their metastore to 3.x+ they cannot drop any table that has an index on it due to "IDXS_FK1" constraint since the TBLS entry is referenced in the IDXS table
        • Since INDEX is no longer in the DDL they cannot run any command from Hive to drop the index.
        • Users can manually connect to the metastore and either drop the IDXS table or the foreign key constraint

       

      Since indexes provide no benefits in Hive 3+ it should be fine to drop them completely in the schema upgrade scripts. At the very least the 2.x -> 3.x+ scripts should drop the fk constraint.

        Attachments

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              hunterl Hunter Logan Assign to me
              Reporter:
              hunterl Hunter Logan

              Dates

              • Created:
                Updated:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 0.5h
              0.5h

                Issue deployment