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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java:
##########
@@ -1953,306 +1942,6 @@ private List<ColumnStatisticsObj> 
aggrStatsUseJava(String catName, String dbName
         areAllPartsFound, useDensityFunctionForNDVEstimation, ndvTuner);
   }
 
-  private List<ColumnStatisticsObj> aggrStatsUseDB(String catName, String 
dbName,

Review Comment:
   `aggrStatsUseDB` can only be used if [hive.stats.fetch.bitvector and 
metastore.stats.fetch.kll](https://github.com/apache/hive/blob/008f4d11e230f30103dc156247f97bf4d18e0b33/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java#L1467-L1470)
 are `false`. Some tests enable them via `set` command in q files or entire 
tests suits via `hive-site` but the default is false. Aggregating the stats at 
the backend db is usually faster then doing it in java so we can lose 
performance with this patch in some cases. 
   
   @ramitg254 
   1. Could you please investigate how to aggregate the results of subsequent 
`aggrStatsUseDB` calls?
   2. Seems that we have test coverage for this:  
[TestObjectStore.java.testAggrStatsUseDB](https://github.com/apache/hive/blob/008f4d11e230f30103dc156247f97bf4d18e0b33/standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java#L1009-L1032)
 Should it be removed along with `aggrStatsUseDB`?
   
   @dengzhhu653 
   > If we don't, we might hit the limitation of maximum parameters for 
PreparedStatement for some dbs.
   >
   > Let's see how the test going
   
   Do we have tests using other dbs than derby and the postgres image?
   
   



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