Update SQL AST in accordance with the SQL spec
The SqlAst should represent the SQL grammar as defined in the spec. As such there are a few changes we should make.
-
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.
-
No column expressions
Right now we have
Column::UnnamedExpr(Expr), but we decided in the spec to only support column names, qualified and unqualified. -
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.