You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zoltan Haindrich (Jira)" <ji...@apache.org> on 2020/02/17 13:25:00 UTC

[jira] [Comment Edited] (HIVE-22728) Limit the scope of uniqueness of constraint name to table

    [ https://issues.apache.org/jira/browse/HIVE-22728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17038342#comment-17038342 ] 

Zoltan Haindrich edited comment on HIVE-22728 at 2/17/20 1:24 PM:
------------------------------------------------------------------

+1


was (Author: kgyrtkirk):
I think the patch have passed on the "upgrade test" because it only changes an index; however, to cover our bases we should also add that db index change to the migration scripts:
for ex: ./standalone-metastore/metastore-server/src/main/sql/postgres/upgrade-3.2.0-to-4.0.0.postgres.sql
+1 with those changes

> Limit the scope of uniqueness of constraint name to table
> ---------------------------------------------------------
>
>                 Key: HIVE-22728
>                 URL: https://issues.apache.org/jira/browse/HIVE-22728
>             Project: Hive
>          Issue Type: Wish
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Miklos Gergely
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22728.01.patch, HIVE-22728.02.patch, HIVE-22728.04.patch
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)