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 Databricks struct literal #1542

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ayman-sigma
Copy link

@ayman-sigma ayman-sigma commented Nov 21, 2024

Databricks supports struct literal (struct function). Struct literal is already added for BigQuery. Databricks' syntax is very similar to the BigQuery one, except the fields definition part.
I added supports_struct_literal to Dialect trait to specify if the dialect support this literal or not

Databricks docs: https://docs.databricks.com/en/sql/language-manual/functions/struct.html

src/ast/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
src/parser/mod.rs Outdated Show resolved Hide resolved
tests/sqlparser_databricks.rs Outdated Show resolved Hide resolved
@ayman-sigma ayman-sigma force-pushed the ayman/supportAsInDbStructs branch 2 times, most recently from 5bc791a to 3a252ad Compare November 23, 2024 21:47
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @ayman-sigma!
cc @alamb

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

Successfully merging this pull request may close these issues.

2 participants