{"record":{"id":"fa3866ab012cd7d7","repo":"apache/skywalking","slug":"series-no-labeled-with-labeled-no-labeled-result","errorCode":null,"errorMessage":"Series No Labeled with Labeled, no labeled result is empty.","messagePattern":"Series No Labeled with Labeled, no labeled result is empty\\.","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":265,"sourceCode":"                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                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        }","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/mqe-rt/src/main/java/org/apache/skywalking/mqe/rt/operation/LROp.java#L247-L283","documentation":"Thrown by LROp.seriesNoLabeledWithLabeled when a NON-labeled series is combined with a labeled series: the left (non-labeled) side's results must not be empty, since its single series is used as the base that gets rewritten per right label group (note the result writes into mqeValuesR but returns seriesLeft).","triggerScenarios":"MQE expression 'plainSeries op labeledSeries' (e.g. 'b - relabels(a, ...)') where the plain LEFT operand returns zero results. The check only guards seriesLeft; the labeled right side is iterated per group.","commonSituations":"The unlabeled metric has no data in the queried window while the labeled one does; operator ordering flipped during query refactoring so the empty metric ended up on the left; metric renamed or disabled leaving the left side empty.","solutions":["Run the plain left operand alone and confirm it returns a series","Ensure both metrics share the time range and step","If the empty side is expected, swap to viewAsSeq or guard the query","Verify the left metric is still being collected (agent config, MAL/OAL rules intact)"],"exampleFix":"// before\nquery: b - relabels(a, tag:(k,v))   // b empty\n// after: use a window where b has data, or\nquery: viewAsSeq(b, relabels(a, tag:(k,v)))","handlingStrategy":"validation","validationCode":"boolean ok = !seriesLeft.getResults().isEmpty(); // the non-labeled LEFT side","typeGuard":null,"tryCatchPattern":"catch (IllegalExpressionException e) { surfaceQueryError(e); }","preventionTips":["Remember the check guards the left/plain side in this branch — audit that operand first","Confirm the plain metric still ingests data"],"tags":["mqe","query-engine","labels","time-series"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}