Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support DuckDB style stuct syntax #9820

Closed
alamb opened this issue Mar 27, 2024 · 0 comments · Fixed by #11214
Closed

Support DuckDB style stuct syntax #9820

alamb opened this issue Mar 27, 2024 · 0 comments · Fixed by #11214
Assignees
Labels
enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Mar 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants