apache / apache/iceberg

Support dynamic timestamp args in Iceberg CALL

Open
#16,057 0 comments 0 reactions 0 assignees View on GitHub
improvement
Dominant language
Java
Stars
9.2k
Forks
3.5k
Avg merge
2d 16h
Merged PRs (30d)
129

Description

### Feature Request / Improvement

To support:
```sql
CALL DSv2HmsCatalog.system.expire_snapshots(
table => 'db.table',
older_than => CURRENT_TIMESTAMP() - INTERVAL 2 DAYS,
retain_last => 1,
except_replace_snapshot => false
);
```

### Query engine

Spark

### Willingness to contribute

- [x] I can contribute this improvement/feature independently
- [ ] I would be willing to contribute this improvement/feature with guidance from the Iceberg community
- [ ] I cannot contribute this improvement/feature at this time

Contributor guide

Open the contributing guide

Research direction

Start by running the provided Spark SQL CALL example and trace how Iceberg handles its arguments, especially the older_than expression. Done means the example accepts CURRENT_TIMESTAMP() - INTERVAL 2 DAYS and applies the resulting timestamp when expiring snapshots.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spark
Domain
data-engineering, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.