You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/07/03 05:47:40 UTC

[GitHub] [hive] adesh-rao commented on a change in pull request #1109: HIVE-22015: Add table constraints in CachedStore

adesh-rao commented on a change in pull request #1109:
URL: https://github.com/apache/hive/pull/1109#discussion_r449387162



##########
File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java
##########
@@ -543,10 +557,30 @@ static void prewarm(RawStore rawStore) {
                 tableColStats = rawStore.getTableColumnStatistics(catName, dbName, tblName, colNames, CacheUtils.HIVE_ENGINE);
                 Deadline.stopTimer();
               }
+              Deadline.startTimer("getPrimaryKeys");
+              primaryKeys = rawStore.getPrimaryKeys(catName, dbName, tblName);
+              Deadline.stopTimer();
+              cacheObjects.setPrimaryKeys(primaryKeys);
+
+              Deadline.startTimer("getForeignKeys");
+              foreignKeys = rawStore.getForeignKeys(catName, null, null, dbName, tblName);

Review comment:
       Then should we would need store foreign key mappings against parentDb and table for quick access (otherwise we will be scanning all the db/tables in cache)? 
   
   And this also means we will be keeping two copies, one with parent table and another with foreign table.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org