Skip to content

Refactor: Use range syntax in ES|QL exponential histogram tests#144110

Merged
JonasKunz merged 3 commits intoelastic:mainfrom
JonasKunz:cleanup-exphisto-csv-tests
Mar 16, 2026
Merged

Refactor: Use range syntax in ES|QL exponential histogram tests#144110
JonasKunz merged 3 commits intoelastic:mainfrom
JonasKunz:cleanup-exphisto-csv-tests

Conversation

@JonasKunz
Copy link
Copy Markdown
Contributor

@JonasKunz JonasKunz commented Mar 12, 2026

The ES|QL exponential histogram tests were still using the "round" trick to avoid floating point accuracy issues.
There is a more robust way of doing this, which is the 0.2..0.3 range syntax. This PR refactors the tests to use this syntax.

The change was AI generated and uses range between 0.001% and 0.002% around the desired value, using as little as possible digits. I've validated the ranges by generating a script which prints the ratio of the ranges to make sure the AI didn't cheat by providing a wider range.

@JonasKunz JonasKunz added >non-issue :StorageEngine/ES|QL Timeseries / metrics / PromQL / logsdb capabilities in ES|QL labels Mar 12, 2026
@elasticsearchmachine elasticsearchmachine added external-contributor Pull request authored by a developer outside the Elasticsearch team v9.4.0 labels Mar 12, 2026
@JonasKunz JonasKunz marked this pull request as ready for review March 12, 2026 16:50
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@JonasKunz JonasKunz merged commit 08badde into elastic:main Mar 16, 2026
36 checks passed
@JonasKunz JonasKunz deleted the cleanup-exphisto-csv-tests branch March 16, 2026 09:27
ncordon pushed a commit to ncordon/elasticsearch that referenced this pull request Mar 16, 2026
szybia added a commit to szybia/elasticsearch that referenced this pull request Mar 16, 2026
…elocations

* upstream/main: (33 commits)
  Unmute InferenceRestIT and DefaultEndPointsIT (elastic#144217)
  feat: add keep_alive to async task status (elastic#144010)
  Add explicit isNoOpUpdate() method to MapperService (elastic#144113)
  Always attach APM Agent (elastic#144120)
  Fix random_score nightly tests (elastic#144176)
  Add nested query checks for disabled sequence numbers (elastic#144185)
  Return sentinel values from Fetch when sequence numbers are disabled (elastic#144212)
  [Test] Test peer-recovery with sequence numbers pruning (elastic#144116)
  Remove `scaled-*` field assertions from mixed cluster downsampling test (elastic#144295)
  Refactor: Use range syntax in ES|QL exponential histogram tests (elastic#144110)
  Move resolve aliases to IndexAbstractionOptions (elastic#143953)
  unmute test (elastic#144299)
  Fix approximation csvtests (elastic#144233)
  fix test (elastic#144171)
  Add int4 vector scoring benchmarks (elastic#144105)
  Mute org.elasticsearch.xpack.esql.qa.single_node.GenerativeIT test elastic#143023
  Mute org.elasticsearch.test.apmintegration.MetricsApmIT testApmIntegration {withOTel=false} elastic#144282
  Native cli launcher (elastic#143712)
  Mute org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT test elastic#143023
  Mute org.elasticsearch.xpack.esql.heap_attack.HeapAttackSubqueryIT testManyRandomKeywordFieldsInSubqueryIntermediateResults elastic#144274
  ...
michalborek pushed a commit to michalborek/elasticsearch that referenced this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor Pull request authored by a developer outside the Elasticsearch team >non-issue :StorageEngine/ES|QL Timeseries / metrics / PromQL / logsdb capabilities in ES|QL Team:StorageEngine v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants