Skip to content

Add composite aggregation#6214

Open
fulmicoton-dd wants to merge 5 commits intomainfrom
composite-aggregations-rebase
Open

Add composite aggregation#6214
fulmicoton-dd wants to merge 5 commits intomainfrom
composite-aggregations-rebase

Conversation

@fulmicoton-dd
Copy link
Collaborator

Summary

  • Rebases Add composite aggregation #5957 by @rdettai-sk onto main with the latest tantivy revision (545169c0d8) which includes composite aggregation support upstream
  • Adds composite aggregation types to quickwit-query aggregation mappings
  • Fixes Send+Sync constraint in controlled_directory.rs for the updated tantivy API
  • Adds REST API test cases for composite aggregations

Test plan

  • cargo check passes
  • cargo nextest run -p quickwit-query — 139 tests pass
  • cargo nextest run -p quickwit-indexing — 165 tests pass
  • cargo nextest run -p quickwit-search — 159 tests pass
  • CI passes

🤖 Generated with Claude Code

@fulmicoton-dd fulmicoton-dd force-pushed the composite-aggregations-rebase branch from a9b38fb to 32a8e64 Compare March 23, 2026 19:23
@fulmicoton fulmicoton requested review from congx4 and rdettai-sk March 23, 2026 19:24
@fulmicoton
Copy link
Collaborator

@rdettai-sk Merging your PR in this. Claude made it in a different PR for the rebase. (I hardocded you as the author the author so you get the github stats and street cred.

(git commit --author="Remi Dettai <remi.dettai@sekoia.io>")

Rebase of #5957 by @rdettai-sk onto main, updated to use
the latest tantivy revision (545169c0d8) which includes
composite aggregation support upstream.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fulmicoton-dd fulmicoton-dd force-pushed the composite-aggregations-rebase branch from 32a8e64 to 2914a35 Compare March 23, 2026 19:43
@fulmicoton fulmicoton enabled auto-merge (squash) March 23, 2026 19:44
congx4 and others added 4 commits March 25, 2026 14:20
The updated tantivy revision (545169c0d8) produces a slightly different
floating-point result for the p85 percentile aggregation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ation

The updated tantivy revision changes HLL cardinality estimates:
- unique_names: 8.0 -> 7.0 (actual: 8 unique values)
- unique_dates: 6.0 -> 5.0 (actual: 6 unique values)
- unique_response: 5.0 unchanged

Verified locally by running quickwit and querying the aggregation endpoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cardinality (HLL) and percentile values vary across runs because data
lands in different splits, producing different approximation results.
Use $expect with range checks instead of exact value matching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Collaborator

@rdettai-sk rdettai-sk left a comment

Choose a reason for hiding this comment

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

thanks @fulmicoton!

The tests are failing because I have updated tantivy in between to have a safer pagination: just relying on json types is not enough to fully represent all possible page positions inside quickwit fastfield column types. Ideally we should not assert on the pagination key value as it is supposed to be opaque according to the ES spec, but I found it convenient to have a clear test that showcases the behavior here.

Comment on lines +441 to +443
host: "192.168.0.10"
name: "Albert"
response: 100.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
host: "192.168.0.10"
name: "Albert"
response: 100.0
host: "str:192.168.0.10"
name: "str:Albert"
response: "f64:100"

Comment on lines +470 to +472
host: "192.168.0.10"
name: "Albert"
response: 100.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
host: "192.168.0.10"
name: "Albert"
response: 100.0
host: "str:192.168.0.10"
name: "str:Albert"
response: "f64:100"

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.

4 participants