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

Update SQL AST in accordance with the SQL spec #1623

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

mamcx
Copy link
Contributor

@mamcx mamcx commented Aug 21, 2024

Description of Changes

The first step towards updating the parsing of SQL to match the spec for SpacetimeDB, as asked by ticket #1563.

This is the syntactic parser, without being integrated yet into the codebase, to be done later.

Expected complexity level and risk

1

Testing

Describe any testing you've done, and any testing you'd like your reviewers to do,
so that you're confident that all the changes work as expected!

  • Generate test for both valid and invalid cases, and pretty printer of the ast

@mamcx mamcx added enhancement New feature or request release-any To be landed in any release window labels Aug 21, 2024
@mamcx mamcx self-assigned this Aug 21, 2024
//! = columnExpr '=' columnExpr
//! | predicate_on AND predicate_on
//! ;
//!
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an addition to the spec, because the predicate allows expressions that will not optimize.

#[display(fmt = "Change to several queries")]
ChangeOrToManyQueries,
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could be good idea to brainstorm which suggestion could enhance the experience of errors.

}

#[derive(Error, Debug)]
pub enum SqlUnsupported {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A single place to see what we need to add later, maybe.

@mamcx mamcx added release-1.0 and removed release-any To be landed in any release window labels Aug 21, 2024
Closes #1563.

Co-authored-by: joshua-spacetime <[email protected]>
@joshua-spacetime joshua-spacetime added this pull request to the merge queue Aug 29, 2024
Merged via the queue into master with commit 8ee1de6 Aug 29, 2024
8 checks passed
@joshua-spacetime joshua-spacetime deleted the mamcx/sql-ast branch August 30, 2024 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request release-1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants