Skip to content

udtf: provide session state ref to the call - #20

Merged
askalt merged 3 commits into
release-42.0.0from
askalt/provide-context-to-udtf
Oct 22, 2025
Merged

askalt merged 3 commits into
release-42.0.0from
askalt/provide-context-to-udtf

Conversation

@askalt

@askalt askalt commented Oct 6, 2025

Copy link
Copy Markdown

This patch adds session state arg for the [TableFunctionImpl::call] method. It is useful to implement table functions depending on other tables from the state. For example, a table functions that return current list of all views in the state.

@github-actions github-actions Bot added documentation Improvements or additions to documentation core sql labels Oct 6, 2025
@askalt
askalt requested a review from novartole October 22, 2025 07:54
@askalt

askalt commented Oct 22, 2025

Copy link
Copy Markdown
Author

I am working on tests fix.

@askalt
askalt force-pushed the askalt/provide-context-to-udtf branch from 6ab3c59 to 06d0f47 Compare October 22, 2025 10:42
@novartole

Copy link
Copy Markdown

Thank you for the patch!

Let's restore these files as they are not affected by the patch:

  • datafusion/sql/src/query.rs,
  • datafusion/sql/src/statement.rs.

The rest LGTM.

This patch adds session state arg for the [`TableFunctionImpl::call`] method.
It is useful to implement table functions depending on other tables from
the state. For example, a table functions that return current list of
all views in the state.
It is useful when there is need to create builder based
on the existing state but hide the catalog list.
@askalt
askalt force-pushed the askalt/provide-context-to-udtf branch from 06d0f47 to 53b0a78 Compare October 22, 2025 15:00
@github-actions github-actions Bot removed the sql label Oct 22, 2025
@askalt

askalt commented Oct 22, 2025

Copy link
Copy Markdown
Author

Thank you for the patch!

Let's restore these files as they are not affected by the patch:

  • datafusion/sql/src/query.rs,
  • datafusion/sql/src/statement.rs.

The rest LGTM.

Done.

@askalt
askalt merged commit cfa0e72 into release-42.0.0 Oct 22, 2025
41 of 48 checks passed
@askalt
askalt deleted the askalt/provide-context-to-udtf branch December 29, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants