{"record":{"id":"431a676228b72dd9","repo":"apache/skywalking","slug":"series-no-labeled-with-labeled-left-and-right-ser","errorCode":null,"errorMessage":"Series No Labeled with Labeled, left and right series value size not equal.","messagePattern":"Series No Labeled with Labeled, left and right series value size not equal\\.","errorType":"exception","errorClass":"IllegalExpressionException","httpStatus":null,"severity":"error","filePath":"oap-server/mqe-rt/src/main/java/org/apache/skywalking/mqe/rt/operation/LROp.java","lineNumber":270,"sourceCode":"                }\n                double newValue = calculate.apply(valueL.getDoubleValue(), valueR.getDoubleValue(), opType);\n                mqeValuesL.getValues().get(i).setDoubleValue(newValue);\n            }\n        }\n\n        return seriesLeft;\n    }\n\n    private static ExpressionResult seriesNoLabeledWithLabeled(ExpressionResult seriesLeft,\n                                                               ExpressionResult seriesRight,\n                                                               int opType, LROp calculate) throws IllegalExpressionException {\n        if (seriesLeft.getResults().isEmpty()) {\n            throw new IllegalExpressionException(\"Series No Labeled with Labeled, no labeled result is empty.\");\n        }\n        MQEValues mqeValuesL = seriesLeft.getResults().get(0);\n        for (MQEValues mqeValuesR : seriesRight.getResults()) {\n            if (mqeValuesL.getValues().size() != mqeValuesR.getValues().size()) {\n                throw new IllegalExpressionException(\"Series No Labeled with Labeled, left and right series value size not equal.\");\n            }\n            for (int i = 0; i < mqeValuesL.getValues().size(); i++) {\n                //reserve left metric info\n                MQEValue valueL = mqeValuesL.getValues().get(i);\n                MQEValue valueR = mqeValuesR.getValues().get(i);\n                if (valueL.isEmptyValue() || valueR.isEmptyValue()) {\n                    valueL.setEmptyValue(true);\n                    continue;\n                }\n                double newValue = calculate.apply(valueL.getDoubleValue(), valueR.getDoubleValue(), opType);\n                mqeValuesR.getValues().get(i).setDoubleValue(newValue);\n            }\n        }\n\n        return seriesRight;\n    }\n\n    private static ExpressionResult seriesLabeledWithLabeled(ExpressionResult seriesLeft,","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/mqe-rt/src/main/java/org/apache/skywalking/mqe/rt/operation/LROp.java#L252-L288","documentation":"In LROp.seriesNoLabeledWithLabeled, every labeled group on the RIGHT must have the same value count as the single left series — values are paired by index within each group. Any right label group whose length differs from the left series throws this exception.","triggerScenarios":"'plainSeries op labeledSeries' where at least one right label group's point count differs from the left series' count — sparse label groups, different down-sampling, or missing buckets in specific label combinations.","commonSituations":"Comparing a base metric against per-label metrics where some labels report intermittently; label cardinality added after a relabels change pulling in a sparse label; step mismatch between the labeled metric's original query and the plain metric.","solutions":["Query the labeled operand alone and compare each label group's length with the plain series","Align step/duration; use identical down-sampling on both metrics","Restrict the relabels to label values whose series are dense","Align on timestamps client-side if server-side index pairing cannot be guaranteed"],"exampleFix":"// before\nquery: b - relabels(a, tag:(k,v_sparse))  // v_sparse group shorter than b\n// after\nquery: b - relabels(a, tag:(k,v_dense))","handlingStrategy":"validation","validationCode":"int leftSize = seriesLeft.getResults().get(0).getValues().size();\nboolean ok = seriesRight.getResults().stream()\n    .allMatch(g -> g.getValues().size() == leftSize);","typeGuard":null,"tryCatchPattern":"catch (IllegalExpressionException e) { /* iterate right label groups to find length mismatch */ }","preventionTips":["Keep labeled operands restricted to dense label values","Align step and down-sampling between plain and labeled metrics"],"tags":["mqe","query-engine","labels","alignment"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}