-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Open
Copy link
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
The create function statement can't express input or output types that need metadata to express them (e.g., UUID). After #17986 , there is a more clear path towards actually representing those types and there is some code in the SQL planner that drops metadata to support the CreateFunction statement.
datafusion/datafusion/expr/src/logical_plan/ddl.rs
Lines 473 to 483 in 774b6fe
| #[derive(Clone, PartialEq, Eq, Hash, Debug)] | |
| pub struct CreateFunction { | |
| pub or_replace: bool, | |
| pub temporary: bool, | |
| pub name: String, | |
| pub args: Option<Vec<OperateFunctionArg>>, | |
| pub return_type: Option<DataType>, | |
| pub params: CreateFunctionBody, | |
| /// Dummy schema | |
| pub schema: DFSchemaRef, | |
| } |
Describe the solution you'd like
The DataType members could be replaced with something that can also support metadata or an extension type.
Describe alternatives you've considered
No response
Additional context
More places where an extension type can't be represented in a logical plan/statement:
- Issue for updating Cast: LogicalPlan Casts can't express a cast to an extension type #18060
- Issue for updating Placeholder: Logical plan placeholders can't contain metadata #17862
- Issue for updating ScalarVariable: Logical expression ScalarVariable cannot represent an extension type or metadata #18230
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request