ashish-kumar-sharma commented on a change in pull request #1610: URL: https://github.com/apache/hive/pull/1610#discussion_r579648239
########## File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CacheUtils.java ########## @@ -144,4 +147,15 @@ public static boolean matches(String name, String pattern) { } return false; } + + public static boolean validateShouldCacheTableCanUseEventIsActiveTransaction(String catName, String dbName, + String tblName, boolean canUseEvents, RawStore rawStore) { + return !shouldCacheTable(catName, dbName, tblName) || (canUseEvents && rawStore.isActiveTransaction()); + } + + public static boolean validateShouldCacheTableCanUseEventIsActiveTransactionIsConstraintsValid(String catName, Review comment: done ########## File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java ########## @@ -2554,8 +2554,7 @@ long getPartsFound() { catName = StringUtils.normalizeIdentifier(catName); dbName = StringUtils.normalizeIdentifier(dbName); tblName = StringUtils.normalizeIdentifier(tblName); - if (!shouldCacheTable(catName, dbName, tblName) || (canUseEvents && rawStore.isActiveTransaction()) || !sharedCache - .isTableConstraintValid(catName, dbName, tblName)) { + if (validateShouldCacheTableCanUseEventIsActiveTransactionIsConstraintsValid(catName,dbName,tblName,canUseEvents,rawStore,sharedCache)) { 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org