[
https://issues.apache.org/jira/browse/HIVE-18685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16836949#comment-16836949
]
Aditya Shah commented on HIVE-18685:
------------------------------------
[~alangates] I wanted to verify the backward compatibility of the new schema.
As you mentioned we have associated each database with a catalog and therefore,
a new default catalog "hive" was created. But, at the same time shouldn't the
default value of "CTLG_NAME" in "DBS" be set as "hive", Because when using
preCatalog versions of hive and trying to create a database the foreign key
constraint caused the command to fail with the following error:
{code:java}
org.apache.hadoop.hive.ql.metadata.HiveException:
MetaException(message:Exception thrown flushing changes to datastore)
....
java.sql.BatchUpdateException: Cannot add or update a child row: a foreign key
constraint fails ("metastore_1238"."DBS", CONSTRAINT "CTLG_FK1" FOREIGN KEY
("CTLG_NAME") REFERENCES "CTLGS" ("NAME"))
{code}
> Add catalogs to Hive
> --------------------
>
> Key: HIVE-18685
> URL: https://issues.apache.org/jira/browse/HIVE-18685
> Project: Hive
> Issue Type: New Feature
> Components: Metastore, Parser, Security, SQL
> Affects Versions: 3.0.0
> Reporter: Alan Gates
> Assignee: Alan Gates
> Priority: Major
> Attachments: HMS Catalog Design Doc.pdf
>
>
> SQL supports two levels of namespaces, called in the spec catalogs and
> schemas (with schema being equivalent to Hive's database). I propose to add
> the upper level of catalog. The attached design doc covers the use cases,
> requirements, and brief discussion of how it will be implemented in a
> backwards compatible way.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)