GitHub user sunng87 closed a discussion: Recommended design for accessing 
context/session information in UDF implementation

As for now, most datafusion udfs are focusing on data. When I'm going to 
implement some functions like `database()` or `version()`, I just realized 
there is no simple way to access information of current session.

For example, in MySQL `SELECT database()` returns current selected database. If 
we implement `database` as a UDF, we will need to access current session on 
calling `ScalarFunctionImplementation`. However, the function signature only 
accepts input data.

Another use case is to access time-zone or locale settings from current session 
when implementing a date/time related function.

While the function system is under a major refactoring, you may want to add 
this feature into consideration. Thank you!

GitHub link: https://github.com/apache/datafusion/discussions/8871

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to