Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[OPIK-486] Add NOT_EQUAL operator for filtering #816

Merged

Conversation

BorisTkachenko
Copy link
Contributor

@BorisTkachenko BorisTkachenko commented Dec 4, 2024

Details

Add NOT_EQUAL operator for filtering

Resolves: #551

Testing

Added corresponding integration tests

@BorisTkachenko BorisTkachenko self-assigned this Dec 4, 2024
@BorisTkachenko BorisTkachenko requested a review from a team as a code owner December 4, 2024 16:00
@BorisTkachenko BorisTkachenko force-pushed the boryst/OPIK-486-add-not-equal-operator-for-filtering branch from 2a2ef56 to 2e654ac Compare December 4, 2024 20:35
Copy link
Collaborator

@andrescrz andrescrz left a comment

Choose a reason for hiding this comment

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

A suggestion for tests, but not a blocker. You can add it in a follow-up PR.

@@ -12,6 +12,7 @@ public enum Operator {
STARTS_WITH("starts_with"),
ENDS_WITH("ends_with"),
EQUAL("="),
NOT_EQUAL("!="),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just make sure FrontEnd is happy with this syntax != for the query param. From my side, it looks good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +1113 to +1115
@ParameterizedTest
@MethodSource("equalAndNotEqualFilters")
void getByProjectName__whenFilterTotalEstimatedCostEqual_NotEqual__thenReturnSpansFiltered(Operator operator,
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's similar tests for equals in traces object (and maybe some other). It'd be nice to add a test for all where this applies, not only spans.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add in a later PR, we also have filters in Traces and Datasets.

@BorisTkachenko BorisTkachenko merged commit 98c360c into main Dec 5, 2024
7 checks passed
@BorisTkachenko BorisTkachenko deleted the boryst/OPIK-486-add-not-equal-operator-for-filtering branch December 5, 2024 09:39
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR]: Add "not-equal" operator for Filtering
2 participants