kasakrisz commented on code in PR #6322:
URL: https://github.com/apache/hive/pull/6322#discussion_r2822161232


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/MaterializedViewMap.java:
##########
@@ -69,24 +68,18 @@ public void putIfAbsent(Table materializedViewTable, 
HiveRelOptMaterialization m
             materializedViewTable.getDbName(), 
materializedViewTable.getTableName());
   }
 
-  private ConcurrentMap<String, HiveRelOptMaterialization> ensureDbMap(Table 
materializedViewTable) {
-    // We are going to create the map for each view in the given database
-    ConcurrentMap<String, HiveRelOptMaterialization> dbMap =
-            new ConcurrentHashMap<String, HiveRelOptMaterialization>();
-    // If we are caching the MV, we include it in the cache
-    final ConcurrentMap<String, HiveRelOptMaterialization> prevDbMap = 
materializedViews.putIfAbsent(
-            materializedViewTable.getDbName(), dbMap);
-    if (prevDbMap != null) {
-      dbMap = prevDbMap;
-    }
-    return dbMap;
+  private String genKey(Table materializedViewTable) {
+    return genKey(materializedViewTable.getDbName(), 
materializedViewTable.getTableName());

Review Comment:
   I kept the `genKey` method to indicate that a map key is generated but the 
new method is using `TableName.toString()`



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to