ngsg commented on code in PR #5560:
URL: https://github.com/apache/hive/pull/5560#discussion_r1860569147


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/partition/add/AbstractAddPartitionAnalyzer.java:
##########
@@ -120,8 +120,9 @@ private AlterTableAddPartitionDesc.PartitionDesc 
createPartitionDesc(Table table
     Map<String, String> params = null;
     if (conf.getBoolVar(HiveConf.ConfVars.HIVE_STATS_AUTOGATHER) && location 
== null) {
       params = new HashMap<String, String>();
-      StatsSetupConst.setStatsStateForCreateTable(params,
-          MetaStoreUtils.getColumnNames(table.getCols()), 
StatsSetupConst.TRUE);
+      List<String> colNames = 
conf.getBoolVar(HiveConf.ConfVars.HIVE_STATS_COL_AUTOGATHER) ?
+          MetaStoreUtils.getColumnNames(table.getCols()) : null;
+      StatsSetupConst.setStatsStateForCreateTable(params,colNames, 
StatsSetupConst.TRUE);

Review Comment:
   NIT, the same space issue here.



##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -2820,8 +2820,7 @@ private Partition loadPartitionInternal(Path loadPath, 
Table tbl, Map<String, St
       if (oldPart == null) {
         newTPart.getTPartition().setParameters(new HashMap<String,String>());
         if 
(this.getConf().getBoolVar(HiveConf.ConfVars.HIVE_STATS_AUTOGATHER)) {
-          StatsSetupConst.setStatsStateForCreateTable(newTPart.getParameters(),
-              MetaStoreUtils.getColumnNames(tbl.getCols()), 
StatsSetupConst.TRUE);
+          
StatsSetupConst.setStatsStateForCreateTable(newTPart.getParameters(),null, 
StatsSetupConst.TRUE);

Review Comment:
   NIT, the same space issue here, too.



-- 
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: gitbox-unsubscr...@hive.apache.org

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

Reply via email to