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

Limit the scope of uniqueness of constraint name to table

    XMLWordPrintableJSON

Details

    Description

      Currently, constraint names are globally unique across all databases (assumption is that this may have done by design). Nevertheless, though behavior seems to be implementation specific, it would be interesting to limit the scope to uniqueness per table.
      To change the scope to one table, we would need to add the PARENT_TABLE_ID in the KEY_CONSTRAINTS table to the PRIMARY KEY of that table. Some minor changes to the error messages would be needed too, since otherwise it would be difficult to identify the correct violation in queries that span across multiple databases. Additionally, the SQL scripts will need to be updated to update the PRIMARY KEY.

      Attachments

        1. HIVE-22728.04.patch
          43 kB
          Miklos Gergely
        2. HIVE-22728.02.patch
          47 kB
          Miklos Gergely
        3. HIVE-22728.01.patch
          45 kB
          Miklos Gergely

        Issue Links

          Activity

            People

              mgergely Miklos Gergely
              jcamacho Jesús Camacho Rodríguez
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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