Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
ghx-label-5
Description
Currently we only use HMS stats, even for Iceberg tables:
https://github.com/apache/impala/blob/14b9fb97b59de1749fd93b0469ff8ea6f030021d/fe/src/main/java/org/apache/impala/catalog/local/LocalTable.java#L163
https://github.com/apache/impala/blob/master/fe/src/main/java/org/apache/impala/catalog/Table.java#L413
IcebergTable and LocalIcebergTable should set 'tableStats_' based on Iceberg metadata.
For tables without delete files we should always use Iceberg stats because it will be precise whereas HMS stats can be stale.
For tables with delete files the HMS stats might be more precise as they take the deleted rows into account.