avineshsachan commented on issue #13928: URL: https://github.com/apache/iceberg/issues/13928#issuecomment-3231762147
Spark supports sort_order using rewrite_data_files procedure as below: Example : CALL catalog_name.system.rewrite_data_files(table => 'db.sample', strategy => 'sort', sort_order => 'id DESC NULLS LAST,name ASC NULLS FIRST'); CALL catalog_name.system.rewrite_data_files(table => 'db.sample', strategy => 'sort', sort_order => 'zorder(c1,c2)'); More detail can be referred from : https://iceberg.apache.org/docs/latest/spark-procedures/#rewrite_data_files ========================sort_order feature from FLINK======================== FLINK also supports Rewrite files action but w/o sort_order feature. Example : import org.apache.iceberg.flink.actions.Actions; TableLoader tableLoader = TableLoader.fromHadoopTable("hdfs://nn:8020/warehouse/path"); Table table = tableLoader.loadTable(); RewriteDataFilesActionResult result = Actions.forTable(table) .rewriteDataFiles() .execute(); More detail can be referred from : https://iceberg.apache.org/docs/latest/flink-actions/ One option to support sort_order feature from FLINK could be : either above Rewrite files action can be enhanced to support sort_order/zorder or new Action can also be developed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
