apache/skywalking · error · IllegalExpressionException

Series Labeled with No Labeled, left and right series value

Error message

Series Labeled with No Labeled, left and right series value size not equal.

What it means

In LROp.seriesLabeledWithNoLabeled, each labeled group on the left must have the same number of values as the single right series, because values are paired by index. Any left label group whose length differs from the right series triggers this exception.

Source

Thrown at oap-server/mqe-rt/src/main/java/org/apache/skywalking/mqe/rt/operation/LROp.java:243

            }
            //time should be mapped
            double newValue = calculate.apply(valueL.getDoubleValue(), valueR.getDoubleValue(), opType);
            mqeValuesL.getValues().get(i).setDoubleValue(newValue);
        }

        return seriesLeft;
    }

    private static ExpressionResult seriesLabeledWithNoLabeled(ExpressionResult seriesLeft,
                                                               ExpressionResult seriesRight,
                                                               int opType, LROp calculate) throws IllegalExpressionException {
        if (seriesRight.getResults().isEmpty()) {
            throw new IllegalExpressionException("Series Labeled with No Labeled, no labeled result is empty.");
        }
        MQEValues mqeValuesR = seriesRight.getResults().get(0);
        for (MQEValues mqeValuesL : seriesLeft.getResults()) {
            if (mqeValuesL.getValues().size() != mqeValuesR.getValues().size()) {
                throw new IllegalExpressionException("Series Labeled with No Labeled, left and right series value size not equal.");
            }
            for (int i = 0; i < mqeValuesL.getValues().size(); i++) {
                //reserve left metric info
                MQEValue valueL = mqeValuesL.getValues().get(i);
                MQEValue valueR = mqeValuesR.getValues().get(i);
                if (valueL.isEmptyValue() || valueR.isEmptyValue()) {
                    valueL.setEmptyValue(true);
                    continue;
                }
                double newValue = calculate.apply(valueL.getDoubleValue(), valueR.getDoubleValue(), opType);
                mqeValuesL.getValues().get(i).setDoubleValue(newValue);
            }
        }

        return seriesLeft;
    }

    private static ExpressionResult seriesNoLabeledWithLabeled(ExpressionResult seriesLeft,

View on GitHub (pinned to 102af09b4a)

Solutions

  1. Query the labeled operand alone and check every label group has the same value count as the plain operand
  2. Align step and duration across both metrics
  3. Choose labels whose series report at the same cadence as the base metric, or aggregate away sparse labels
  4. Recompute the pairing client-side on timestamps if perfect bucket alignment is impossible

Example fix

// before
query: relabels(a, tag:(k,v1)) + b  // label v1 series has 30 points, b has 60
// after: drop the sparse label or align cadence
query: relabels(a, tag:(k,v_dense)) + b
Defensive patterns

Strategy: validation

Validate before calling

int rightSize = seriesRight.getResults().get(0).getValues().size();
boolean ok = seriesLeft.getResults().stream()
    .allMatch(g -> g.getValues().size() == rightSize);

Try / catch

catch (IllegalExpressionException e) { /* find the label group whose length differs */ }

Prevention

When it happens

Trigger: 'labeledSeries op plainSeries' where at least one left label group's point count differs from the right series' point count — e.g. one label combination reports intermittently and misses buckets, or the two metrics have different steps.

Common situations: Labeled metrics (per-service, per-endpoint) with uneven reporting across labels; comparing a labeled metric against a metric with a different down-sampling step; gaps in one label group's data while the base metric is complete.

Related errors


AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14). Data as JSON: /api/errors/a52e56b43fc2a82a. Report an issue: GitHub.