Conversation
WalkthroughAdds Apache Iceberg I/O: new iceberg and util modules, CLI split into load/save groups, cluster-level save_table routing and iceberg-backed load/save implementations, tests, docs, and optional dependency updates for Iceberg support. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User/CLI
participant IO_CLI_Save as IO CLI (cli_save)
participant Cluster as Cluster.save_table()
participant CrateDB as CrateDB
participant Iceberg as Iceberg (to_iceberg)
User->>IO_CLI_Save: run `save table` (source=crate://schema.table, target=iceberg://...)
IO_CLI_Save->>Cluster: instantiate cluster & call save_table(target)
Cluster->>CrateDB: query & stream row chunks
CrateDB-->>Cluster: return chunk
Cluster->>Iceberg: to_iceberg(target_url, chunk)
Iceberg->>Iceberg: ensure catalog/namespace and write chunk
Iceberg-->>Cluster: ack
Cluster-->>IO_CLI_Save: return result
IO_CLI_Save-->>User: exit
sequenceDiagram
participant User as User/CLI
participant IO_CLI_Load as IO CLI (cli_load)
participant Cluster as Cluster.load_table()
participant Iceberg as Iceberg (from_iceberg)
participant CrateDB as CrateDB
User->>IO_CLI_Load: run `load table` (source=iceberg://..., target=crate://schema.table)
IO_CLI_Load->>Cluster: instantiate cluster & call load_table(source, target)
Cluster->>Iceberg: from_iceberg(source_url, target_url)
Iceberg->>Iceberg: parse URL, load catalog/table, stream Polars chunks
Iceberg->>CrateDB: insert_bulk per chunk
CrateDB-->>Iceberg: ack inserted
Iceberg-->>Cluster: completion
Cluster->>CrateDB: refresh target table
Cluster-->>IO_CLI_Load: return result
IO_CLI_Load-->>User: exit
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
About
Import from and export to Apache Iceberg tables, for interoperability purposes.
Documentation
https://cratedb-toolkit--444.org.readthedocs.build/io/iceberg/
References
Review
Please don't hesitate to review in retrospective when applicable.
Any feedback is much appreciated and well received.
/cc @karynzv, @hammerhead, @zolbatar, @grbade, @WalBeh