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

fix: support in in json search #6689

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: support in in json search #6689

wants to merge 1 commit into from

Conversation

nityanandagohain
Copy link
Member

@nityanandagohain nityanandagohain commented Dec 20, 2024

Fixes #6441


Important

Add support for 'IN' and 'NOT_IN' operators in JSON search filters in jsonFilterEnrich() and update tests.

  • Behavior:
    • Support for 'IN' and 'NOT_IN' operators in JSON search filters added in jsonFilterEnrich() in enrich_query.go.
    • Determines data type of first element in array for 'IN' and 'NOT_IN' operators.
  • Tests:
    • Added test cases for 'IN' and 'NOT_IN' operators in enrich_query_test.go and json_filter_test.go.
    • Updated TestJsonEnrich and TestGetJSONFilter to include new scenarios.

This description was created by Ellipsis for e4092f8. It will automatically update as commits are pushed.

@github-actions github-actions bot added the bug Something isn't working label Dec 20, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to e4092f8 in 38 seconds

More details
  • Looked at 110 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. pkg/query-service/app/logs/v4/json_filter_test.go:197
  • Draft comment:
    The test case for the 'IN' operator in JSON filters is a valid addition and resolves the issue mentioned in the PR.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The PR introduces a new test case for the 'IN' operator in JSON filters, which is a valid addition to resolve the issue mentioned.

Workflow ID: wflow_R7kisGXHKllOPxOb


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@srikanthccv
Copy link
Member

Should you cast all the values to the type of the first element? Does it break otherwise if there are different types in the list (assume from API)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logs Explorer: JSON search for IN operator is not working
2 participants