Skip to content

SQL:2016 #125

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

Closed
davidfetter opened this issue Jun 30, 2019 · 5 comments
Closed

SQL:2016 #125

davidfetter opened this issue Jun 30, 2019 · 5 comments

Comments

@davidfetter
Copy link

There's a new version of the standard, so it'd be great to catch up with it.

@nickolay
Copy link
Contributor

nickolay commented Jul 2, 2019

Hey, thanks for taking an interest in the project!

I guess (@andygrove might correct me) the reason the stated goal of this project is to be compatible with ANSI SQL 2011 is because that's the latest version of the standard with its grammar available online in HTML format.

I don't think we've implemented all of SQL-92 yet (though thanks to @benesch we're getting close), and there's lots of work to catch up with SQL 2011, so it's a bit too early for SQL 2016!

If you'd like to contribute implementations, testcases, or links to the grammar for some of the 44 new features, that would be in scope for this project, I think. Otherwise, I'm in favor of closing this issue as I believe it's not actionable due to its large scope. Andy, Nikhil, what do you think?

@benesch
Copy link
Contributor

benesch commented Jul 2, 2019

Agreed. The SQL standard is massive, and plenty of it isn't even supported by any actual databases. The only sane way to make progress is to prioritize the specific features that folks are interested in.

I'd be in favor of updating the wording in the README a bit, though. Perhaps something like:

The goal of this project is to build a SQL lexer and parser capable of parsing SQL that conforms with the ANSI/ISO SQL standard while also making it easy to support custom dialects so that this crate can be used as a foundation for vendor-specific parsers.

SQL was first standardized in 1987, and revisions of the standard have been published regularly since. Most revisions have added significant new features to the language, and as a result no database claims to support the full breadth of features. This parser currently supports most of the SQL-92 syntax, plus some syntax from newer versions that have been explicitly requested, along with some MSSQL- and PostgreSQL-specific syntax. Whenever possible, the online SQL:2011 grammar is used to guide what syntax to accept.

Let me whip up a PR!

@benesch
Copy link
Contributor

benesch commented Jul 3, 2019

FWIW, I've submitted a PR to get the SQL:2016 grammar online: JakeWheat/sql-overview#2. Unfortunately @JakeWheat hasn't been active lately, but hopefully it'll get deployed eventually.

@benesch
Copy link
Contributor

benesch commented Jul 6, 2019

Thanks to @JakeWheat, we've now got the grammar online! https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html

@benesch
Copy link
Contributor

benesch commented Oct 10, 2019

Closing this out because, as @nickolay mentioned, I don't think it's actionable, and the policy is now more fully spelled out in the README. Please feel free to open PRs/issues for any SQL:2016 features that you need.

@benesch benesch closed this as completed Oct 10, 2019
nickolay added a commit to nickolay/sqlparser-rs that referenced this issue May 27, 2020
This was discussed in apache#125, but we forgot to update the README at the time.
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

No branches or pull requests

3 participants