alamb commented on code in PR #9333:
URL: https://github.com/apache/arrow-datafusion/pull/9333#discussion_r1508153276
##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -794,6 +797,52 @@ impl SessionContext {
Ok(false)
}
+ async fn create_function(&self, stmt: CreateFunction) -> Result<DataFrame>
{
Review Comment:
👍
##########
datafusion/core/src/execution/context/mod.rs:
##########
@@ -1246,7 +1295,51 @@ impl QueryPlanner for DefaultQueryPlanner {
.await
}
}
+/// Crates and registers a function from [CreateFunction] statement
+///
+/// It is intended to handle `CREATE FUNCTION` statements
+/// and interact with [SessionState] to registers new udfs.
+///
+/// Datafusion `SQL` dialect does not support `CREATE FUNCTION`
+/// in generic dialect, so dialect should be changed to `PostgreSQL`
Review Comment:
I agree supporting create function would be good in the generic dialect. I
made this change in https://github.com/sqlparser-rs/sqlparser-rs/pull/1159 (and
I plan a sqlparser release in the next few days)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]