Skip to content

Support sorted_by argument for rewrite_data_files procedure #26824

@hantangwangd

Description

@hantangwangd

We should support specifying sorted_by argument when calling rewrite_ data_files procedure. It's especially useful when the table itself is not defined as a sorted table, or its sorting property is somewhat insufficient. This significantly optimizes scanning performance by allowing more irrelevant data files to be filtered out.

Expected Behavior or Use Case

The specified sorting definition must be compatible with the table's own sorting property, if one exists.

Presto Component, Service, or Connector

Procedure, Iceberg

Possible Implementation

Use the same syntax that is used to specify the sorting property when creating a table.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions