Percentiles aggregation validation checks for range#51871
Percentiles aggregation validation checks for range#51871hendrikmuhs merged 6 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
|
Pinging @elastic/ml-core (:ml/Transform) |
|
run elasticsearch-ci/bwc |
41fe6b8 to
442fb22
Compare
server/src/test/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java
Outdated
Show resolved
Hide resolved
| throw new IllegalArgumentException("percent must be in [0,100], got [" + percent + "]: [" + name + "]"); | ||
| } | ||
|
|
||
| if(percent == previousPercent) { |
There was a problem hiding this comment.
I think this should have an extra space after if and before (.
I imagine it can happen, mostly in the case where folks build the percentiles with a tool. What does it look like when there are dups? I certainly would feel more comfortable making the change in 8.0 only. |
It depends on the json parser to accept this, it seems common behavior to silently remove the double entry and take the last value. This issue exists now for a long time without no one noticed or at least not finding it problematic. I therefore agree we can wait for 8.0 to fix it.
I can split the PR:
|
|
I removed the duplication check. I will create a separate PR for this, 8.0 only. |
disallow to specify percentile out of range [0,100]. This also fixes a problem in transform by failing validation if an invalid percentile configuration is used.
Disallow specifying the same percentile multiple times in percentiles aggregation Related: #51871
disallow to specify percentile out of range [0,100]. This also fixes a problem in transform by failing validation if an invalid percentile configuration is used.
Note: The duplication check is a breaking change if you are picky (question is, if it can be found in the wild).-> duplication moved out to PR: TBDFor release notes: Please list it under aggs (percentiles in transforms is a new feature for 7.7.0)
relates to #51808