apache / apache/iceberg-rust

Support Transform-based sorting in ReplaceSortOrderAction

Open
#1,443 3 comments 1 reaction 0 assignees View on GitHub
enhancement not-stale
Dominant language
Rust
Stars
1.4k
Forks
567
Avg merge
2d 2h
Merged PRs (30d)
93

Description

### Is your feature request related to a problem or challenge?

In Iceberg-java, users are allowed to pass in a `Term` that can do `Transform`-based sorting with specific transform functions like `Bucket`, `Truncate`, etc.: https://github.com/apache/iceberg/blob/6504fd809199cbc88ef890cc2f5b42a2cf00e102/core/src/main/java/org/apache/iceberg/BaseReplaceSortOrder.java#L70

Existing iceberg-rs only supports replacing sorting order using `Transform::Identity`/ column name directly. This support can be further extended.

Some related iceberg-rs structs:
- https://github.com/apache/iceberg-rust/blob/9f85f80711aa02fb2de1da051fa9e93e7cfec27f/crates/iceberg/src/expr/term.rs#L33
- https://github.com/apache/iceberg-rust/blob/cfe2a980b27cda744fab8e78b4550b167b4d4d45/crates/iceberg/src/spec/transform.rs#L51

### Describe the solution you'd like

_No response_

### Willingness to contribute

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at ReplaceSortOrderAction and compare its current term handling with crates/iceberg/src/expr/term.rs and crates/iceberg/src/spec/transform.rs. Use the linked Iceberg Java BaseReplaceSortOrder.java implementation as a behavioral reference. Done means ReplaceSortOrderAction accepts transform-based terms such as Bucket and Truncate, not only identity or direct column names.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data-engineering, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.