elasticsearch
elasticsearch copied to clipboard
ESQL: fix csv-spec tests expecting a floating result
Description
Some tests expecting a floating point result can fail on equality matching. We should either include in the query a rounding call for them all, or fix the infra to do a range check instead of an exact one.
Pinging @elastic/es-analytical-engine (Team:Analytics)
Examples: https://gradle-enterprise.elastic.co/s/yke3pbfiqsvfo/console-log?page=5 https://gradle-enterprise.elastic.co/s/yjustunaoqnss/console-log?anchor=4650&page=5
This problem also occurs with queries that create geo POINTs as output; didn't fail us any tests yet, but at least incurs some noise in PRs that touch geo optimizations, like here.
IMHO it's hard to define a single rounding criterion that can be applied to all the spec tests, in some cases we really want to test that the result is really accurate. As a first step we could at least reduce the noise by manually rounding the most problematic cases
Another similar one: https://gradle-enterprise.elastic.co/s/sagzdexxdymfw/tests/task/:qa:stateful:x-pack:plugin:esql:qa:server:single-node:javaRestTest/details/org.elasticsearch.xpack.esql.qa.single_node.EsqlSpecIT/test%20%7Bstats.DocsStatsSumNestedExpression%23%5Bskip:-8.12.99%2Creason:supported%20in%208.13%2B%5D%20ASYNC%7D?top-execution=1
Another one like that: https://gradle-enterprise.elastic.co/s/ciqv2teawnuhy/tests/task/:qa:stateful:x-pack:plugin:esql:qa:server:multi-node:javaRestTest/details/org.elasticsearch.xpack.esql.qa.multi_node.EsqlSpecIT/test%20%7Bk8s-metrics.TwoRatesWithBucket%20ASYNC%7D?top-execution=1
Should be closed by https://github.com/elastic/elasticsearch/pull/110238
Fixed in #110238