SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Update SQL AST in accordance with the SQL spec

Open joshua-spacetime opened this issue 1 year ago • 0 comments

The SqlAst should represent the SQL grammar as defined in the spec. As such there are a few changes we should make.

  1. No name resolution or type checking

    We should have a purely syntactic representation. Type checking and name resolution should be done after we've derived this representation.

  2. No column expressions

    Right now we have Column::UnnamedExpr(Expr), but we decided in the spec to only support column names, qualified and unqualified.

  3. Errors

    We want good internal as well as user facing error messages. error-stack looks like a way to achieve the former, ariadne the latter. Now is a good time to experiment with both.

We should probably define a new AST type first. We can replace SqlAst with the new type after we've implemented type checking and name resolution for the new type.

joshua-spacetime avatar Aug 01 '24 16:08 joshua-spacetime