Skip to content

Conversation

Swiddis
Copy link
Collaborator

@Swiddis Swiddis commented Sep 19, 2025

Description

PR 1/3: this PR adds some parsing logic and does a bit of plumbing related to upcoming arguments. This doesn't include the actual implementation. useOther and showPerc will be the other two PRs.

Depending on how complex those are, I might also be able to hit #4278 and #4282 in the same go, since composite buckets of terms support sorting by count. I'd also want to switch to the rare_terms aggregator for rare, per the warning on the linked doc.

Exactly how to get a total for other/percentage is still somewhat open. I thought earlier that I could subtract from a cheap _count call, but I didn't notice at the time that you could also supply filters before the inputs which invalidates that method. Going to poke at the DSL a bit more & see what we end up with (worst case we end up going by all returned buckets, which hits issues if there's too many buckets).

Related Issues

N/A

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@Swiddis Swiddis added the maintenance Improves code quality, but not the product label Sep 19, 2025
Signed-off-by: Simeon Widdis <[email protected]>
Copy link
Collaborator

@RyanL1997 RyanL1997 left a comment

Choose a reason for hiding this comment

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

Hi @Swiddis , thanks for the change. Just left some comments. Also, I couldn't find any rst doc change in this PR, so will it be also included in the 2 upcoming PR you mentioned in the PR description?

@Swiddis
Copy link
Collaborator Author

Swiddis commented Sep 22, 2025

Doc changes will come when the features are actually supported -- they'll currently just raise errors so no point documenting (they'd fail doctest anyway)

- id: spotless-check
name: Spotless Post-format Check
entry: bash -c './gradlew spotlessCheck'
entry: bash -c './gradlew spotlessApply spotlessCheck && git add -u'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

small build change, makes precommit faster (check always runs after apply)

Swiddis and others added 2 commits September 22, 2025 16:45
@Swiddis Swiddis requested a review from RyanL1997 October 9, 2025 20:29
Signed-off-by: Simeon Widdis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improves code quality, but not the product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants