Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
ghx-label-3
Description
OPTIMIZE TABLE statement currently uses INSERT OVERWRITE to rewrite Iceberg tables. Therefore it inherits its limitations as well, such as the inability to rewrite tables with partition evolution.
This change aims to increase the support OPTIMIZE TABLE provides, by making it independent from INSERT statment. After the refactoring, OPTIMIZE TABLEĀ statement will be able to:
- rewrite all files in Iceberg tables according to the latest partition spec
- compact tables with partition evolution
This change also serves as a base for further improvements.
Syntax: OPTIMIZE TABLE <table_name>;