deniskuzZ commented on code in PR #4440:
URL: https://github.com/apache/hive/pull/4440#discussion_r1239910078


##########
ql/src/java/org/apache/hadoop/hive/ql/stats/ColStatsProcessor.java:
##########
@@ -232,6 +236,19 @@ public int persistColumnStats(Hive db, Table tbl) throws 
HiveException, MetaExce
   public void setDpPartSpecs(Collection<Partition> dpPartSpecs) {
   }
 
+  private void setOrRemoveColumnStatsAccurateProperty(Hive db, TableName 
tableName, List<String> colNames, boolean success) throws HiveException {
+    EnvironmentContext environmentContext = new EnvironmentContext();
+    environmentContext.putToProperties(StatsSetupConst.DO_NOT_UPDATE_STATS, 
StatsSetupConst.TRUE);
+    // Fetch latest table object
+    Table newTable = db.getTable(tableName.getDbTable());

Review Comment:
   > > why do you need this? don't you already have a tbl instance?
   > 
   > The tbl instance is modified by BasicStatsTask to include Basic stats 
flag, which isn't present in the tbl provided by ColStatsProcessor, hence we 
need to fetch the latest tbl object.
   
   won't it require an extra db call? could we clone the object before it gets 
modified?



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