Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
ghx-label-2
Description
Spawned from IMPALA-10610
Impala supports mixed file formats for Iceberg tables, which means every file can have different file format and it uses the set of existing file formats for planning purposes. Currently Impala goes through all file's metadata to aggregate this information, which can be slow if there are lots of data files.
We could optimized this by storing this aggregated information somewhere (e.g. in Iceberg - yet to be implemented - https://github.com/apache/iceberg/blob/master/core/src/main/java/org/apache/iceberg/SnapshotSummary.java)
Update:
IcebergContentFileStore supports aggregating file formats, similarly as the proposed change in iceberg, but might not be the correct approach. It represents the state of the current snapshot, but IcebergScanNode receives a possibly time travelled/pruned version of the file descriptor list.
Further optimization ideas:
- Use the aggregated info from the iceberg SnapshotSummary/IcebergContentFileStore if possible (e.g. current snapshot, no pruning)
- Exit the loop if we found all the available file formats (might be to costly if we check the condition it in every iteration)
- Parallelize the aggregation