Skip to content

Allow SQL TypePlanner to plan SQL types as extension types #20675

@paleolimbot

Description

@paleolimbot

Is your feature request related to a problem or challenge?

In #17986 one of the updates we made was to change the SQL utility convert_data_type(&self, sql_type: &SQLDataType) -> Result<DataType> to return a FieldRef; however, extension TypePlanners can't take advantage of this to plan SQLDataTypes to Arrow extension types (and there are a number of built-in SQLDataTypes that have existing extension types, such as UUID).

If we update the type planner to incorporate these types we can start to open up the utility of the SQL parser for systems that need wider type support (e.g., my favourite one...geometry!).

Describe the solution you'd like

We can add a member to TypePlanner that returns a field (falling back on the existing member for backward compatibility).

Describe alternatives you've considered

No response

Additional context

No response

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