Skip to content

PromQL: support for top-level binary arithmetic operators#140541

Merged
felixbarny merged 11 commits intoelastic:mainfrom
felixbarny:promql-binary-ops
Jan 14, 2026
Merged

PromQL: support for top-level binary arithmetic operators#140541
felixbarny merged 11 commits intoelastic:mainfrom
felixbarny:promql-binary-ops

Conversation

@felixbarny
Copy link
Copy Markdown
Member

Examples of queries that are supported now:

  • network.bytes_in * 8
  • network.eth0.rx + network.eth0.tx
  • max(network.total_bytes_in) * 8
  • network.total_bytes_in{cluster!="prod"} / network.total_bytes_in{cluster!="staging"}

Follow-up from #140135

Examples of queries that are supported now:
* `network.bytes_in * 8`
* `network.eth0.rx + network.eth0.tx`
* `max(network.total_bytes_in) * 8`
* `network.total_bytes_in{cluster!="prod"} / network.total_bytes_in{cluster!="staging"}`

Follow-up from elastic#140135
@felixbarny felixbarny requested a review from sidosera January 13, 2026 07:42
@felixbarny felixbarny self-assigned this Jan 13, 2026
@felixbarny felixbarny added >non-issue :StorageEngine/ES|QL Timeseries / metrics / PromQL / logsdb capabilities in ES|QL labels Jan 13, 2026
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine elasticsearchmachine added Team:StorageEngine v9.4.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Jan 13, 2026
@felixbarny felixbarny linked an issue Jan 13, 2026 that may be closed by this pull request

division_within_series_grouping_promql
required_capability: promql_pre_tech_preview_v13
PROMQL index=k8s step=1h div=(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we also have test where step is different from range vector duration?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, I'll create a follow up change

@felixbarny felixbarny merged commit 50f032c into elastic:main Jan 14, 2026
35 checks passed
spinscale pushed a commit to spinscale/elasticsearch that referenced this pull request Jan 21, 2026
Examples of queries that are supported now:
* `network.bytes_in * 8`
* `network.eth0.rx + network.eth0.tx`
* `max(network.total_bytes_in) * 8`
* `network.total_bytes_in{cluster!="prod"} / network.total_bytes_in{cluster!="staging"}`

Follow-up from elastic#140135
@felixbarny felixbarny changed the title PromQL: support for top-level binary operators PromQL: support for top-level binary arithmetic operators Feb 18, 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.

PromQL: support top-level binary arithmetic queries

4 participants