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

feat(datafusion): support metadata tables for Datafusion #879

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xxchan
Copy link
Contributor

@xxchan xxchan commented Jan 5, 2025

Use the newly added metadata tables #823 to support this feature in Datafusion engine to demonstrate its usage.

This may also potentially help design and stablize the interface of metadata tables in the iceberg crate.

@xxchan xxchan force-pushed the xxchan/datafusion-metadata branch from d25b534 to ecf8729 Compare January 5, 2025 17:59
[table_name.clone()]
.into_iter()
.chain(MetadataTableType::all_types().map(|metadata_table_name| {
format!("{}${}", table_name.clone(), metadata_table_name.as_str())
Copy link
Contributor Author

@xxchan xxchan Jan 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The $ syntax follows Flink https://iceberg.apache.org/docs/1.5.2/flink-queries/#inspecting-tables instead of . from Spark, because 4-level catalog.schema.table.metadata is not supported in Datafusion.

Comment on lines +344 to +348
expect![[r#"
committed_at: PrimitiveArray<Timestamp(Millisecond, Some("+00:00"))>
[
],
snapshot_id: PrimitiveArray<Int64>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the datafusion test cases don't have any data present so this is empty

@xxchan xxchan force-pushed the xxchan/datafusion-metadata branch from ecf8729 to 726b0fc Compare January 5, 2025 18:05
@xxchan
Copy link
Contributor Author

xxchan commented Jan 6, 2025

Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as a rust rookie, this generally LGTM. glad we're exposing these metadata tables using TableProviders

@xxchan xxchan force-pushed the xxchan/datafusion-metadata branch from 4886b8e to 90abb68 Compare January 8, 2025 15:07
@xxchan xxchan force-pushed the xxchan/datafusion-metadata branch from 90abb68 to 0b0af5d Compare January 8, 2025 16:00
@liurenjie1024
Copy link
Contributor

Thanks @xxchan for contributing. I'll start reviewing after we addressed #868

@liurenjie1024
Copy link
Contributor

Sorry, closed by mistake.

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.

3 participants