You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Jibing-Li (via GitHub)" <gi...@apache.org> on 2023/07/05 01:51:03 UTC

[GitHub] [doris] Jibing-Li commented on a diff in pull request #21481: [Improvement](statistics, multi catalog)Support iceberg table stats collection.

Jibing-Li commented on code in PR #21481:
URL: https://github.com/apache/doris/pull/21481#discussion_r1252457877


##########
fe/fe-core/src/main/java/org/apache/doris/catalog/external/HMSExternalTable.java:
##########
@@ -456,6 +448,19 @@ private void initPartitionColumns(List<Column> schema) {
 
     @Override
     public Optional<ColumnStatistic> getColumnStatistic(String colName) {
+        makeSureInitialized();
+        switch (dlaType) {
+            case HIVE:
+                return getHiveColumnStats(colName);
+            case ICEBERG:
+                return StatisticsUtil.getIcebergColumnStats(colName, HiveMetaStoreClientHelper.getIcebergTable(this));

Review Comment:
   The reason of these two issues is we have 2 implementations for Iceberg table. One is in HMSExternalTable, the other is IcebergExternalTable. They are using different catalog in the getIcebergTable() function.
   I put getIcebergColumnStats in StatisticsUtil as a static function so that both HMSExternalTable and IcebergExternalTable could use it. But for hive table, it is only used in HMSExternalTable.
   I think to solve the problem, we should refactor the code, use a single IcebergTable to handle all different Catalogs (hms, glue, dlf...).



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org