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

add support for exists query syntax in query parser #2170

Merged
merged 4 commits into from
Sep 19, 2023

Conversation

trinity-1686a
Copy link
Contributor

tantivy side of quickwit-oss/quickwit#3714

@@ -16,6 +16,9 @@ pub enum UserInputLeaf {
field: Option<String>,
elements: Vec<String>,
},
Exists {
field: Option<String>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand the reason for the Option here.
Can you add a comment explaining the meaning of Exists { field: None } and when it can be built?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is just an intermediary state that should never make it out to the world. I've changed so it's always a String, which can temporarily be empty

@@ -300,10 +300,42 @@ fn term_group_infallible(i: &str) -> JResult<&str, UserInputAst> {
}
}

fn exists(i: &str) -> IResult<&str, UserInputLeaf> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we stop the one char variable? If it is i for input, let's at least go for inp

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 95.97% and project coverage change: +0.02% 🎉

Comparison is base (389d36f) 94.39% compared to head (37c6d2a) 94.41%.
Report is 1 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2170      +/-   ##
==========================================
+ Coverage   94.39%   94.41%   +0.02%     
==========================================
  Files         321      322       +1     
  Lines       62821    63159     +338     
==========================================
+ Hits        59299    59634     +335     
- Misses       3522     3525       +3     
Files Changed Coverage Δ
src/query/query_parser/query_parser.rs 92.42% <0.00%> (-0.40%) ⬇️
query-grammar/src/query_grammar.rs 98.02% <100.00%> (+0.06%) ⬆️
query-grammar/src/user_input_ast.rs 98.48% <100.00%> (+0.05%) ⬆️

... and 8 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@trinity-1686a trinity-1686a merged commit 0241a05 into main Sep 19, 2023
5 checks passed
@trinity-1686a trinity-1686a deleted the trinity--exists-query-syntax branch September 19, 2023 09:10
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