Skip to content
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

Support parsing multiple show variables. #290

Merged
merged 2 commits into from
Feb 9, 2021
Merged

Support parsing multiple show variables. #290

merged 2 commits into from
Feb 9, 2021

Conversation

francis-du
Copy link
Contributor

Support parsing multiple show variables.

eg:

SHOW STORAGE GROUP
SHOW TIMESERIES root.ln.wf01.wt01.status

@coveralls
Copy link

coveralls commented Jan 11, 2021

Pull Request Test Coverage Report for Build 549753783

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 18 (88.89%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 90.087%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser.rs 7 9 77.78%
Files with Coverage Reduction New Missed Lines %
src/ast/mod.rs 1 72.76%
Totals Coverage Status
Change from base Build 547182345: -0.01%
Covered Lines: 5371
Relevant Lines: 5962

💛 - Coveralls

Copy link
Collaborator

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +1733 to +2057
pub fn parse_identifiers(&mut self) -> Result<Vec<Ident>, ParserError> {
let mut idents = vec![];
loop {
match self.next_token() {
Token::Word(w) => idents.push(w.to_ident()),
Token::EOF => break,
_ => {}
}
}
Ok(idents)
}
Copy link

Choose a reason for hiding this comment

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

Is SHOW (without any variable) valid SQL? This code would return Ok(vec![]) for the SQL code SHOW, correct?

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

@andygrove
Copy link
Collaborator

@francis-du could you rebase please

@francis-du
Copy link
Contributor Author

@francis-du could you rebase please

Sure

@Dandandan
Copy link
Collaborator

@francis-du I think you didn't rebase/push the rebase yet?

@francis-du
Copy link
Contributor Author

@francis-du I think you didn't rebase/push the rebase yet?

Done.

@Dandandan Dandandan merged commit 07342d5 into sqlparser-rs:main Feb 9, 2021
@Dandandan
Copy link
Collaborator

Thanks @francis-du 👍

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.

None yet

5 participants