fix(es7): the ES 7 client sends a view's per-group calculation in a transform pivot - #411
Merged
Merged
Conversation
…ransform pivot Core #409 added BucketScriptTransformAggregation to the transform pivot model; the ES 7 REST client had no case for it, so a materialized view with a SELECT calculation failed to deploy on ES 7 with "Unsupported aggregation", thrown client-side although ES 7.17 accepts the pivot. The client now adds it as a bucket_script pipeline aggregation, and refuses clearly a calculation that would read unbound script parameters. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
fupelaqu
marked this pull request as ready for review
October 4, 2026 06:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The ES 7 client can send a materialized view's per-group calculation in a transform pivot.
BucketScriptTransformAggregation(e.g.SELECT MAX(a) - MIN(b) AS din a view) to the transform pivot model. The ES 7 REST client's pivot match had no case for it, so on ES 7 every view with a SELECT calculation failed to deploy: "Unsupported aggregation", thrown client-side. ES 7.17 itself accepts the pivot.bucket_scriptpipeline aggregation.TransformAggregationsubtype now has an ES 7 case (Max, Min, Sum, Avg, Count, Cardinality, TopHits, BucketScript).Measured
RestHighLevelClientTransformPivotSpec: 2/2. Without the fix: 0/2.bucket_selectorreading it, deploy and run.d= 9.0 for the fully populated group and −2.0 for the partial one, and is absent when an operand is NULL.sql1788,core1148, ES 7 module 19. Lint is clean.Not run locally, left to CI: ES 6.8 (no views) and ES 9.0 (JSON path).
Why now
It unblocks the extensions follow-up of #409 (views read every aggregate their HAVING names, plus the calculation channel), whose ES 7 leg needs this case. Merge and publish this first.
🤖 Generated with Claude Code