Skip to content

README: update for recent improvements #128

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

Merged
merged 1 commit into from
Jul 3, 2019
Merged

README: update for recent improvements #128

merged 1 commit into from
Jul 3, 2019

Conversation

benesch
Copy link
Contributor

@benesch benesch commented Jul 2, 2019

Remove outdated bits that claim shoddy SQL support and code
structure--we're much better on those fronts now! Also add a few
paragraphs about the current state of SQL compliance, why it's hard to
say anything detailed about SQL compliance, and what our long-term goals
are.

Motivated by #125.

@benesch benesch requested review from nickolay and andygrove July 2, 2019 19:22
@coveralls
Copy link

coveralls commented Jul 2, 2019

Pull Request Test Coverage Report for Build 404

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at ?%

Totals Coverage Status
Change from base Build 396: 0.0%
Covered Lines:
Relevant Lines: 0

💛 - Coveralls

Copy link
Contributor

@nickolay nickolay left a comment

Choose a reason for hiding this comment

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

LGTM! I had some thoughts while reading this, noted in the comments.


## Example

The current code is capable of parsing some trivial SELECT and CREATE TABLE statements.
To parse a simple `SELECT` statement:
Copy link
Contributor

Choose a reason for hiding this comment

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

I've recently tried to create a new app using this crate and I instinctively tried to copy-paste the code from README to main.rs. I think adding the required imports would be helpful:

/*
use sqlparser::dialect::GenericDialect;
use sqlparser::parser::Parser;
*/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Done.


If you are assessing whether this project will be suitable for your needs,
you'll likely need to experimentally verify whether it supports the subset of
SQL that you need. Please file issues about any unsupported queries that you
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps we should request PRs when possible, and issues - preferably with relevant bits of the grammar and/or testcases - otherwise? I feel this is more of a "we can share our efforts" project, rather than "we have some free resources to implement this for you". If that's the case, we should be upfront about this.

We could also add a link to a typical PR implementing a new syntax (once there is one after the renames in 0.4)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed on all points. I've adjusted this section a bit, but added the bulk of your recommendations to the "Contributing" section below.

README.md Outdated
## Design

This parser is implemented using the [Pratt Parser](https://tdop.github.io/) design, which is a top-down operator-precedence parser.
This parser is implemented using the [Pratt Parser] design, which is a top-down
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't read the paper carefully, but I believe the Pratt parser is what we use to parse expressions (I found https://eli.thegreenplace.net/2010/01/02/top-down-operator-precedence-parsing more useful to understand the technique), otherwise what we have is hand-coded recursive descent parser. Right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, all true. Updated accordingly.

Remove outdated bits that claim shoddy SQL support and code
structure--we're much better on those fronts now! Also add a few
paragraphs about the current state of SQL compliance, why it's hard to
say anything detailed about SQL compliance, and what our long-term goals
are.
@nickolay
Copy link
Contributor

nickolay commented Jul 3, 2019

Excellent, thank you!

@benesch benesch merged commit 8cd64e7 into master Jul 3, 2019
@benesch benesch deleted the readme branch July 3, 2019 14:30
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.

3 participants