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

Handle not equal in custom keyword field #6185

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

bowenxia
Copy link
Contributor

What changed?
When operation is "!=" for a custom keyword type, use "and" clause instead of "or" clause to connect the queries.

Why?
Context: the reason why we used 2 queries and connect those with "or" is that a custom keyword field can be either a value or an array (a list).

Thus when it comes with a "!=" operation, it was not returning correct result, because the query results included unnecessary parts.

How did you test it?
unit test
manual test in Pinot

Potential risks

Release notes

Documentation Changes

Copy link
Member

@neil-xie neil-xie left a comment

Choose a reason for hiding this comment

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

LGTM

@bowenxia bowenxia enabled auto-merge (squash) July 22, 2024 23:38
Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.76%. Comparing base (ebda4b1) to head (3db436e).

Additional details and impacted files
Files Coverage Δ
common/pinot/pinotQueryValidator.go 86.87% <100.00%> (+0.14%) ⬆️

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ebda4b1...3db436e. Read the comment docs.

@bowenxia bowenxia merged commit 736d66b into master Jul 23, 2024
19 checks passed
@bowenxia bowenxia deleted the xbowen_customKeywordField_not_equal_op_debug branch July 23, 2024 01:07
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.

2 participants