morningman commented on code in PR #21481:
URL: https://github.com/apache/doris/pull/21481#discussion_r1251786056
##########
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:
We should unify the method of `HiveMetaStoreClientHelper.getIcebergTable`
and `IcebergExternalCatalog.getIcebergTable()`
##########
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:
And it is strange and if this is a hive table, call the method
`getHiveColumnStats()`, which is a private method of this class. But if this is
an iceberg table, call the static method `StatisticsUtil.getIcebergColumnStats`.
Why this 2 methods not in same level.
--
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]