Skip to content

Support SELECT ALL #76

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
May 29, 2019
Merged

Support SELECT ALL #76

merged 1 commit into from
May 29, 2019

Conversation

benesch
Copy link
Contributor

@benesch benesch commented May 22, 2019

No description provided.

@benesch benesch mentioned this pull request May 22, 2019
@coveralls
Copy link

coveralls commented May 22, 2019

Pull Request Test Coverage Report for Build 200

  • 11 of 12 (91.67%) changed or added relevant lines in 2 files are covered.
  • 7 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.4%) to 89.49%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/sqlparser_common.rs 8 9 88.89%
Files with Coverage Reduction New Missed Lines %
src/test_utils.rs 2 89.06%
src/sqlparser.rs 5 88.72%
Totals Coverage Status
Change from base Build 183: 0.4%
Covered Lines: 2878
Relevant Lines: 3216

💛 - Coveralls

@nickolay
Copy link
Contributor

nickolay commented May 26, 2019

This is about <set quantifier> ::= DISTINCT | ALL in <query specification> ::= SELECT [ <set quantifier> ] <select list> ..., where ALL is the same as lack of an explicit set quantifier.

Given that parsing text->AST currently loses information unimportant to the query semantics, perhaps we shouldn't add the all flag to the AST? Did you need it for some reason?

(edit- if we do remove it from the AST, the test could be simplified to a simple one_statement_parses_to() call)

Co-authored-by: Nikhil Benesch <[email protected]>
@benesch
Copy link
Contributor Author

benesch commented May 26, 2019

Given that parsing text->AST currently loses information unimportant to the query semantics, perhaps we shouldn't add the all flag to the AST? Did you need it for some reason?

No particular reason! I think we just hadn't fully adopted the "it's ok if queries don't roundtrip exactly, as long as they roundtrip to something equivalent" rule. I've updated the PR to drop the explicit all flag and simplified the test accordingly.

Thanks for the review!

@nickolay nickolay merged commit 86a2fbd into apache:master May 29, 2019
@benesch benesch deleted the select-all branch June 21, 2019 22:34
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.

4 participants