Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-27409

Iceberg: table with EXTERNAL type can not use statistics to optimize the query

    XMLWordPrintableJSON

Details

    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

          Activity

            People

              zhangbutao Butao Zhang
              zhangbutao Butao Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: