feat(iceberg): More flexible IcebergClient constructor. #540
feat(iceberg): More flexible IcebergClient constructor. #540andyyu2004 wants to merge 1 commit intosupabase:mainfrom
Conversation
9524c99 to
3542700
Compare
📝 WalkthroughWalkthroughAdded a public constructor Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@etl-destinations/src/iceberg/client.rs`:
- Around line 58-62: The public constructor IcebergClient::new lacks a doc
comment; add a Rust doc comment (///) above pub fn new describing that it
creates a new IcebergClient from a shared Catalog (Arc<dyn Catalog>), document
the parameter `catalog` and the returned IcebergClient, and mirror the style and
detail of the existing constructors new_with_rest_catalog and
new_with_supabase_catalog so the API docs are consistent.
📜 Review details
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
etl-destinations/src/iceberg/client.rs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs
📄 CodeRabbit inference engine (AGENTS.md)
**/*.rs: Usesnake_casefor files and modules
UseCamelCasefor types and traits
Usesnake_casefor functions and variables
Do not leave comments when you remove things
Document all items, public and private, using stdlib tone and precision; only use 'Panics' section when a function can panic
Link types and methods as [Type], [Type::method] in Rust documentation comments
Keep Rust documentation wording concise, correct, and punctuated; reword for clarity while preserving intent
Do not include code examples in Rust documentation; include private helpers for maintainers; apply documentation to modules, types, traits, impls, and functions
Normal comments in Rust should always finish with a period
Files:
etl-destinations/src/iceberg/client.rs
🧬 Code graph analysis (1)
etl-destinations/src/iceberg/client.rs (2)
etl-destinations/src/iceberg/core.rs (1)
new(170-184)etl-destinations/src/iceberg/catalog.rs (2)
new(37-39)new(191-199)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: depthfirst Bot
🔇 Additional comments (2)
etl-destinations/src/iceberg/client.rs (2)
80-80: LGTM!The refactoring correctly delegates to the new constructor, reducing duplication while maintaining the same behavior.
123-123: LGTM!Consistent refactoring that mirrors the change in
new_with_rest_catalog, properly delegating to the new constructor.
3542700 to
1f1a17e
Compare
What kind of change does this PR introduce?
Feature.
Additional context
The existing
IcebergClientconstructors are not flexible enough for all use cases.This changes introduces a less opinionated constructor
IcebergClient::new: fn(Arc<dyn Catalog>) -> Self.I've omitted creating an issue as it's a very small change.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.