Skip to content

Conversation

@frolovdev
Copy link
Contributor

Closes #472

@coveralls
Copy link

coveralls commented Jun 13, 2022

Pull Request Test Coverage Report for Build 2491105118

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 16 of 21 (76.19%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 89.813%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ast/mod.rs 2 4 50.0%
src/parser.rs 14 17 82.35%
Totals Coverage Status
Change from base Build 2488373371: -0.03%
Covered Lines: 8764
Relevant Lines: 9758

💛 - Coveralls

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thanks @frolovdev -- looks like a nice cleanup.

cc @andygrove

src/parser.rs Outdated
match self.peek_token() {
Token::Word(w) => match w.keyword {
Keyword::EXISTS => {
let negated = self.parse_keyword(Keyword::EXISTS);
Copy link
Contributor

Choose a reason for hiding this comment

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

don't we know here that negated is true? I think the code might be clearer if this were something more like

let negated = true;
self.parse_keyword(Keyword::Exists);
self.parse_exists_expr(negated)

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I will make an update in a minute

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made an update but use placeholder (let _) because of clippy checks

@frolovdev frolovdev requested a review from alamb June 13, 2022 20:51
@alamb
Copy link
Contributor

alamb commented Jun 14, 2022

Looks good -- thanks @frolovdev

@alamb alamb merged commit c884fbc into apache:main Jun 14, 2022
mobuchowski pushed a commit to mobuchowski/sqlparser-rs that referenced this pull request Aug 3, 2022
* add more consistency in ast

* refactor styling
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.

Make NOT EXISTS (subquery) and NOT IN (subquery) more consistent in the AST

3 participants