Repository navigation
ES|QL PromQL: implicit type coercion for counter/gauge - #149985
Conversation
|
@felixbarny please enable the option "Allow edits and access to secrets by maintainers" on your PR. For more information, see the documentation. |
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
90a5a63 to
2ea462e
Compare
0aa43c2 to
7de4659
Compare
2ea462e to
2c32582
Compare
0679183 to
6be8154
Compare
51ee70a to
d6c57c3
Compare
903d490 to
6be8154
Compare
d6c57c3 to
7c86fa6
Compare
aa2a367 to
5e9bc0a
Compare
7c86fa6 to
4822230
Compare
5e9bc0a to
0e2ddb4
Compare
4822230 to
a3f1c2c
Compare
3cc771c to
286b4c6
Compare
|
@stratoula fyi. this means that promql allows running |
|
Hi @felixbarny, I've created a changelog YAML for you. |
🔍 Preview links for changed docs⏳ Building and deploying preview... View progress This comment will be updated with preview links when the build is complete. |
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
PromQL accepts any numeric range vector, but ES|QL distinguishes counter from gauge types. During translation, counter-required functions wrap plain numerics with to_counter(), and gauge-only functions wrap counter metrics with to_gauge(). A single PROMQL_IMPLICIT_TYPE_COERCION capability gates the behaviour. Tests cover rate/increase/irate and avg_over_time on counter, gauge, and plain numeric inputs.
Fix compile error after counter/gauge validation moved to translation.
Expected results were copied from ES|QL bucket tests; update them to match PromQL step timestamp alignment.
cc5be60 to
d40913c
Compare
No we dont have such a strong validation. We are relying on the definitions you are sending us and it is a bit vague so we are ok |
|
Hi @felixbarny, I've updated the changelog YAML for you. |
* upstream/main: In file watching tests, add 2s to guarantee a timestamp change (elastic#149937) Add query filter to more query types (elastic#150127) [DOCS] Fix setting error and edit reindex-indices.md (elastic#150139) Rename ResumeBulkByScrollRequest to ResumeBulkByPaginatedSearchRequest (elastic#150210) Fail search shards in resharding disruption tests (elastic#150124) Tests: Fix ShardSearchPhaseAPMMetricsTests (elastic#150200) ES|QL PromQL: implicit type coercion for counter/gauge (elastic#149985) Fix OTelMetricsBufferingIT: explicitly produce multiple delta batches (elastic#150136) [Test] Fix testActionStats off-by-one on powers of two (elastic#150218) Escape BUILDKITE_PARALLEL_JOB in batch dispatch (elastic#150223) Handle patterns that require resource on every project (elastic#149980) Mute org.elasticsearch.xpack.inference.external.http.sender.RequestExecutorServiceTests testChangingCapacity_DoesNotRejectsOverflowTasks_BecauseOfQueueFull elastic#150226 Add timestamp accumulator for cache quota tracking (elastic#149890)
During PromQL translation, counter-required functions wrap plain numerics with
to_counter(), and gauge-only functions wrap counter metrics withto_gauge().A single
PROMQL_IMPLICIT_TYPE_COERCIONcapability gates the behaviour. Tests cover rate/increase/irate and avg_over_time on counter, gauge, and plain numeric inputs.Note
Depends on #149713 (
TO_GAUGE/::gauge) being merged first.closes #140035