maheshk114 commented on a change in pull request #2266:
URL: https://github.com/apache/hive/pull/2266#discussion_r642415898



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
##########
@@ -7040,6 +7040,40 @@ private boolean updatePartitonColStatsInternal(Table 
tbl, ColumnStatistics colSt
     return parameters != null;
   }
 
+  private boolean updatePartitionColStatsInBatch(Table tbl, Map<String, 
ColumnStatistics> statsMap,
+                                                 String validWriteIds, long 
writeId)
+          throws MetaException, InvalidObjectException, NoSuchObjectException, 
InvalidInputException {
+
+    if (statsMap.size() == 0) {
+      return false;
+    }
+
+    String catalogName = tbl.getCatName();
+    String dbName = tbl.getDbName();
+    String tableName = tbl.getTableName();
+
+    startFunction("updatePartitionColStatsInBatch", ":  db=" + dbName  + " 
table=" + tableName);
+
+    Map<String, ColumnStatistics> newStatsMap = new HashMap<>();
+    for (Map.Entry entry : statsMap.entrySet()) {
+      ColumnStatistics colStats = (ColumnStatistics) entry.getValue();
+      normalizeColStatsInput(colStats);
+      assert 
catalogName.equalsIgnoreCase(colStats.getStatsDesc().getCatName());
+      assert dbName.equalsIgnoreCase(colStats.getStatsDesc().getDbName());
+      assert 
tableName.equalsIgnoreCase(colStats.getStatsDesc().getTableName());
+      newStatsMap.put((String) entry.getKey(), colStats);
+    }
+
+    boolean ret = false;
+    try {
+      ret = getTxnHandler().updatePartitionColumnStatistics(newStatsMap, this,

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:
[email protected]



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

Reply via email to