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