-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add iceberg
feature
#256
base: main
Are you sure you want to change the base?
Add iceberg
feature
#256
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate that i had to make this constructor async. I think I will take a different approach and add a new async method like register_extensions
that does this.
pub async fn register_extensions(&mut self) -> Result<()> { | ||
let ctx = &mut self.session_ctx; | ||
let config = &self.config; | ||
let extensions = enabled_extensions(); | ||
// Apply any additional setup to the session context (e.g. registering | ||
// functions) | ||
for extension in &extensions { | ||
extension.register_on_ctx(config, ctx)?; | ||
} | ||
|
||
Ok(()) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New method for registering extensions
) -> datafusion_common::Result<DftSessionStateBuilder> { | ||
Ok(builder.with_table_factory("ICEBERG", Arc::new(IcebergTableProviderFactory {}))); | ||
|
||
let catalog_provider = IcebergCatalogProvider::try_new(catalog).await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This await
is what required the async changes for registering extensions.
No description provided.