Skip to content

[Explore] Support PPL filters in Explore #10045

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

Open
wants to merge 5 commits into
base: query_explore
Choose a base branch
from

Conversation

joshuali925
Copy link
Member

Description

  • Support PPL filters in explore when adding from side bar or from results table
    • Filters are no longer added to filterManager in explore, because explore does not have UI to let user change filters. They will directly modify the PPL query in query editor
    • If user adds the same filter with the same value, it will not do anything
    • If user adds the negated version of an existing filter, it will update existing filter
    • Otherwise the filter is added as a where command after first pipe
  • QueryPanel now updates localQuery when redux query changes. This is required to change localQuery from outside of the component
  • Refactor filters util functions

Issues Resolved

Screenshot

PPL_Explore_Filters.mp4

Testing the changes

Changelog

  • feat: Support PPL filters in Explore

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: Joshua Li <[email protected]>
Copy link

codecov bot commented Jul 1, 2025

Codecov Report

Attention: Patch coverage is 89.74359% with 8 lines in your changes missing coverage. Please review.

Please upload report for BASE (query_explore@5ece016). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...enhancements/public/search/filters/filter_utils.ts 82.05% 0 Missing and 7 partials ⚠️
...hancements/public/search/ppl_search_interceptor.ts 92.30% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##             query_explore   #10045   +/-   ##
================================================
  Coverage                 ?   60.10%           
================================================
  Files                    ?     4079           
  Lines                    ?   104017           
  Branches                 ?    16563           
================================================
  Hits                     ?    62522           
  Misses                   ?    37355           
  Partials                 ?     4140           
Flag Coverage Δ
Linux_1 27.89% <ø> (?)
Linux_2 41.63% <ø> (?)
Windows_1 27.90% <ø> (?)
Windows_2 41.61% <ø> (?)
Windows_3 39.29% <ø> (?)
Windows_4 30.06% <89.74%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant