Skip to content

Recommended design for accessing context/session information in UDF implementation #8871

Answered by alamb
sunng87 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @sunng87 -- I think the built in now() function does something similar -- specifically it needs to know the session start time from the session context.

In particular it gets access to https://docs.rs/datafusion/latest/datafusion/execution/context/struct.ExecutionProps.html

I wonder if you could use the var_providers mechanism or maybe we need to plumb the ExecutionProps into UDFs somehow

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sunng87
Comment options

Answer selected by sunng87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants