Skip to content

Support DuckDB style stuct syntax #9820

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

To make it easier to use structs with DataFusion, having a nicer literal syntax is useful

Describe the solution you'd like

It would be nice to support duckdb style struct syntax:

https://duckdb.org/docs/sql/data_types/struct

SELECT {'yes': 'duck', 'maybe': 'goose', 'huh': NULL, 'no': 'heron'};

Describe alternatives you've considered

One way to support this feature would be to implement some Expr variant for the struct literal,

Additional context

@gstein is adding named_struct in this function #9743

@jayzhan211 filed apache/datafusion-sqlparser-rs#1194 for the upstream sqlparser support

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions