hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-22015) [CachedStore] Cache table constraints in CachedStore
Date Fri, 10 Jul 2020 12:39:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-22015?focusedWorklogId=457138&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-457138
]

ASF GitHub Bot logged work on HIVE-22015:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Jul/20 12:38
            Start Date: 10/Jul/20 12:38
    Worklog Time Spent: 10m 
      Work Description: adesh-rao commented on a change in pull request #1109:
URL: https://github.com/apache/hive/pull/1109#discussion_r452816256



##########
File path: standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java
##########
@@ -1754,6 +1760,16 @@ public void testForeignKeys() {
     Assert.assertEquals(cachedKeys.get(0).getFkcolumn_name(), "col2");
     Assert.assertEquals(cachedKeys.get(0).getCatName(), DEFAULT_CATALOG_NAME);
 
+    cachedKeys = sharedCache.listCachedForeignKeys(
+            DEFAULT_CATALOG_NAME, tbl.getDbName(), tbl.getTableName(), tbl1.getDbName(),
tbl1.getTableName());
+
+    Assert.assertEquals(cachedKeys.size(), 1);
+    Assert.assertEquals(cachedKeys.get(0).getFk_name(), "fk2");
+    Assert.assertEquals(cachedKeys.get(0).getFktable_db(), "db");
+    Assert.assertEquals(cachedKeys.get(0).getFktable_name(), tbl.getTableName());
+    Assert.assertEquals(cachedKeys.get(0).getFkcolumn_name(), "col1");

Review comment:
       done.




----------------------------------------------------------------
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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 457138)
    Time Spent: 4.5h  (was: 4h 20m)

> [CachedStore] Cache table constraints in CachedStore
> ----------------------------------------------------
>
>                 Key: HIVE-22015
>                 URL: https://issues.apache.org/jira/browse/HIVE-22015
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: Daniel Dai
>            Assignee: Adesh Kumar Rao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> Currently table constraints are not cached. Hive will pull all constraints from tables
involved in query, which results multiple db reads (including get_primary_keys, get_foreign_keys,
get_unique_constraints, etc). The effort to cache this is small as it's just another table
component.



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

Mime
View raw message