Skip to content

feat(datafusion): Add $options system table#240

Open
plusplusjiajia wants to merge 3 commits intoapache:mainfrom
plusplusjiajia:fusion-options
Open

feat(datafusion): Add $options system table#240
plusplusjiajia wants to merge 3 commits intoapache:mainfrom
plusplusjiajia:fusion-options

Conversation

@plusplusjiajia
Copy link
Copy Markdown
Member

Adds support for the <table>$options Paimon system table to the DataFusion integration, mirroring Java OptionsTable.

_filters: &[Expr],
_limit: Option<usize>,
) -> DFResult<Arc<dyn ExecutionPlan>> {
// Re-read latest schema each scan so in-place schema evolution is visible (Java parity).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In-place? Rust has no cache, so you can just get schema from Table.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In-place? Rust has no cache, so you can just get schema from Table.

Thanks for catching this! Now scan() reads self.table.schema().options() directly.

/// found"). When the system name is registered but the base table is
/// missing, an explicit error is returned so users can tell the two cases
/// apart in error messages.
async fn load_system_table(
Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi Apr 13, 2026

Choose a reason for hiding this comment

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

Put these methods to system_tables/mod.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Put these methods to system_tables/mod.

Thanks for the suggestion! Moved.

async fn table(&self, name: &str) -> DFResult<Option<Arc<dyn TableProvider>>> {
let (base, system_name) = split_object_name(name);
if let Some(system_name) = system_name {
return self.load_system_table(base, system_name).await;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You can create a wrap_to_system_table method to return table.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You can create a wrap_to_system_table method to return table.

Good point!

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.

2 participants