Skip to content

Executor has no label_replace/label_join: plans with PromqlRelabel cannot be installed #1310

Open

Description

@zzylol

Example

This query plans but cannot be installed:

{"query_workload": {"language": "promql", "repeating_queries": [{
  "query": "avg by (job) (label_replace(quantile_over_time(0.9, data[5m]), \"x\", \"$1\", \"instance\", \"(.*)\"))",
  "demand": {"fixed_interval_at": {"interval": 60000, "evaluation_phase": 0}},
  "requirements": {"accuracy": {"max_error": 0.05, "failure_probability": 0.3,
                                "accuracy_scope": "whole_result", "accuracy_metric": "relative"}},
  "predictability": {"predictable": {"known_at": null}}}]},
 "data_workload": {"arrival": {"ingesting": {"rows_per_second": 48.0}},
  "sources": {"data": {"series_count": 12, "metric_type": "gauge", "sample_interval": 1000,
                       "column_signs": {"value": "non_negative"}}}}}

The table shows results from planning and installing through the review harness, using the aws-fargate-us-east-1 cost inputs.

Planner Deployment Plan (cost/s) Install
main (4a37273cb) raw data kept exact: Scan → TimeRange → Aggregate[quantile] → PromqlRelabel → Aggregate[avg] (7.02e-12) QueryRunNotExecutable: invalid DAG: node 3: invalid DAG: value operation has no native implementation (node 3 is the PromqlRelabel)
main no raw data NoValidCandidate —
#1309 raw data kept DDSketch readout → PromqlRelabel → avg (6.35e-12) same error, at the PromqlRelabel node
#1309 no raw data DDSketch tumbling-window chain → PromqlRelabel → avg (4.56e-10) same error, at node 6, the PromqlRelabel

Expected: the plan installs and returns the per-job mean of the 0.9-quantiles. The x label is a copy of instance, so the values are the same as without label_replace.

main already fails this way for the exact plan. #1309 gives relabels an error contract, so the sketch plans now reach the same error.

Why it happens

  • The PromQL frontend lowers label_replace(v, dst, replacement, src, regex) and label_join(v, dst, sep, src…) to NonASAPOp::PromqlRelabel { dst, value, child }. Here value is a FunctionCall named label_replace or label_join over the source label columns and literals (crates/frontend-promql/src/promql.rs, walk_label).
  • The executor's bind_operation binds Project, Filter, Sort, Limit and Aggregate only. Every other operator, PromqlRelabel included, falls through to _ => Err(invalid("value operation has no native implementation")) (physical_planner/mod.rs:1181).
  • grep PromqlRelabel crates/executor/src finds no match.

Proposal

Bind PromqlRelabel as a per-row operator that copies every column and writes dst:

Scope and acceptance

Status and related work

Activity

  1. added
    bugSomething isn't working
    promqlPromQL front-end lowering (L1→L2)
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpromqlPromQL front-end lowering (L1→L2)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions