Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
We have supported iceberg statistics recently. e.g. HIVE-24928 and HIVE-27158. And we can use iceberg stats to optimize some queries like HIVE-27347.
However, in current hive codebase, we prohibit using EXTERNAL table stats and this change was introduced by HIVE-11266. And HIVE-19329 also disabled some optimizations for EXTERNAL table whether it is iceberg or not. Therefore, The EXTERNAL type iceberg table can not use stats to optimize query.
In HIVE-24928, we have added method HiveStorageHandler::canProvideBasicStatistics() to indicate iceberg can have the ability to provide stats. That is to say, Although Iceberg table is regard as EXTERNAL table in Hive, it can provide details statistics.
Therefore, here i suggest we should check both table type and boolean result of HiveStorageHandler::canProvideBasicStatistics() to determine if the table can use stats.
Attachments
Issue Links
- relates to
-
HIVE-19329 Disallow some optimizations/behaviors for external tables
- Open
-
HIVE-11266 count(*) wrong result based on table statistics for external tables
- Closed
-
HIVE-24928 In case of non-native tables use basic statistics from HiveStorageHandler
- Closed
- links to