Skip to content

CreateFunction statement can't represent input or output types that require metadata #18235

@paleolimbot

Description

@paleolimbot

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.

#[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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions