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

Alan Gates commented on HIVE-13349:
-----------------------------------

Sorry, I should have reviewed this sooner, but your message structure seems 
fundamentally busted.  A table can only have one primary key and a primary key 
can have multiple columns.  But your SQLPrimaryKey struct only has one column, 
and then in your new create_table_with_constraints method you pass a list of 
primary keys.  This is confusing.  And redundant, since all but the column name 
in those structs will be the same.

The situation is even worse with foreign keys, since you can have more than one 
of those per table.  How are you going to distinguish which foreign key each of 
the structs belongs to?

And why did you create a new "create_table_with_constraints" method?  We should 
not be proliferating methods in the thrift interface.  Instead primary key and 
foreign key should be added as optional fields in the table struct so that the 
code can continue to use the existing create_table methods.

> Metastore Changes : API calls for retrieving primary keys and foreign keys 
> information
> --------------------------------------------------------------------------------------
>
>                 Key: HIVE-13349
>                 URL: https://issues.apache.org/jira/browse/HIVE-13349
>             Project: Hive
>          Issue Type: Sub-task
>          Components: CBO, Logical Optimizer
>            Reporter: Hari Sankar Sivarama Subramaniyan
>            Assignee: Hari Sankar Sivarama Subramaniyan
>             Fix For: 2.1.0
>
>         Attachments: 13449.2.patch, HIVE-13349.1.patch, HIVE-13349.3.patch, 
> HIVE-13349.4.patch, HIVE-13349.5.patch, HIVE-13349.6.patch, HIVE-13349.7.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to