Skip to content
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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

matthewmturner
Copy link
Collaborator

No description provided.

Copy link
Collaborator Author

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.

Comment on lines +119 to +131
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(())
}

Copy link
Collaborator Author

@matthewmturner matthewmturner Dec 3, 2024

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?;
Copy link
Collaborator Author

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.

@matthewmturner matthewmturner changed the title Start adding iceberg Add iceberg feature Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant