Skip to content

Support parsing multiple show variables. - #290

Merged
Dandandan merged 2 commits into
apache:mainfrom
francis-du:show_statment
Feb 9, 2021
Merged

Dandandan merged 2 commits into
apache:mainfrom
francis-du:show_statment

Conversation

@francis-du

Copy link
Copy Markdown
Contributor

Support parsing multiple show variables.

eg:

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

@coveralls

coveralls commented Jan 11, 2021 •

Copy link
Copy Markdown

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

@andygrove andygrove left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread src/parser.rs
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Member

@francis-du could you rebase please

@francis-du

Copy link
Copy Markdown
Contributor Author

@francis-du could you rebase please

Sure

@Dandandan

Copy link
Copy Markdown
Contributor

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

@francis-du

Copy link
Copy Markdown
Contributor Author

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

Done.

@Dandandan
Dandandan merged commit 07342d5 into apache:main Feb 9, 2021
@Dandandan

Copy link
Copy Markdown
Contributor

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.

5 participants