Skip to content

Fix parsing error when conditional statement contains array access#433

Merged
alamb merged 1 commit intoapache:mainfrom
monadbobo:fixed_where_array
Mar 12, 2022
Merged

Fix parsing error when conditional statement contains array access#433
alamb merged 1 commit intoapache:mainfrom
monadbobo:fixed_where_array

Conversation

@monadbobo
Copy link
Contributor

Fixed the bug that the access parsing is wrong when multiple query conditions contain arrays or map.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1958518329

  • 42 of 42 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 90.484%

Totals Coverage Status
Change from base Build 1953203878: 0.04%
Covered Lines: 7303
Relevant Lines: 8071

💛 - 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.

LGTM -- thank you @monadbobo

#[test]
fn parse_map_access_expr() {
let sql = r#"SELECT string_values[indexOf(string_names, 'endpoint')] FROM foos"#;
let sql = r#"SELECT string_values[indexOf(string_names, 'endpoint')] FROM foos WHERE id = 'test' AND string_value[indexOf(string_name, 'app')] <> 'foo'"#;
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@alamb alamb merged commit 497a3b0 into apache:main Mar 12, 2022
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