{"record":{"id":"557dd9c7d5f3b254","repo":"apache/skywalking","slug":"series-no-labeled-left-or-right-result-is-empty","errorCode":null,"errorMessage":"Series No Labeled, left or right result is empty.","messagePattern":"Series No Labeled, left or right 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":211,"sourceCode":"                        singleResult.getResults()\n                                    .get(0)\n                                    .getValues()\n                                    .get(0)\n                                    .getDoubleValue(),\n                        mqeValue.getDoubleValue(), opType\n                    );\n                    mqeValue.setDoubleValue(newValue);\n                }\n            }\n        }\n        return manyResult;\n    }\n\n    private static ExpressionResult seriesNoLabeled(ExpressionResult seriesLeft,\n                                                    ExpressionResult seriesRight,\n                                                    int opType, LROp calculate) throws IllegalExpressionException {\n        if (seriesLeft.getResults().isEmpty() || seriesRight.getResults().isEmpty()) {\n            throw new IllegalExpressionException(\"Series No Labeled, left or right result is empty.\");\n        }\n        MQEValues mqeValuesL = seriesLeft.getResults().get(0);\n        MQEValues mqeValuesR = seriesRight.getResults().get(0);\n        if (mqeValuesL.getValues().size() != mqeValuesR.getValues().size()) {\n            throw new IllegalExpressionException(\"Series No Labeled, left and right series value size not equal.\");\n        }\n        for (int i = 0; i < mqeValuesL.getValues().size(); i++) {\n            //clean 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            //time should be mapped\n            double newValue = calculate.apply(valueL.getDoubleValue(), valueR.getDoubleValue(), opType);\n            mqeValuesL.getValues().get(i).setDoubleValue(newValue);\n        }","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/apache/skywalking/blob/102af09b4a56064e22050dded10e2c52e490d040/oap-server/mqe-rt/src/main/java/org/apache/skywalking/mqe/rt/operation/LROp.java#L193-L229","documentation":"Thrown by LROp.seriesNoLabeled when two non-labeled TIME_SERIES_VALUES operands are combined: if either side's results list is completely empty there is nothing to align, so the operation aborts. Only the first MQEValues of each side is used (series are expected to be single-series).","triggerScenarios":"MQE expression 'seriesA + seriesB' where seriesA or seriesB returned zero results (no data points / no series at all) in the queried time range. Reached from seriesBinaryOp when neither side isLabeledResult().","commonSituations":"One of the metrics has no data in the selected time window (e.g. service deployed recently, metrics dropped after OAP restart with empty storage); typo'd metric name that resolves to a type but returns nothing; querying a time range before the metric existed; storage (BanyanDB/ES) retention having evicted the data.","solutions":["Run each series operand alone to confirm both return data in the same time range","Align the time range and step of both metrics — same duration and step produces comparable point counts","If empty series are expected, use viewAsSeq or isPresent-based logic instead of a plain binary op","Verify the metric names exist and data is actually being ingested (check UI or raw metric query)"],"exampleFix":"// before\nquery: metric_old + metric_new   // metric_old has no data in range\n// after\nquery: viewAsSeq(metric_old, metric_new)  // or narrow the range to where both have data","handlingStrategy":"validation","validationCode":"ExpressionResult l = mqeService.eval(leftExpr), r = mqeService.eval(rightExpr);\nboolean ok = !l.getResults().isEmpty() && !r.getResults().isEmpty();","typeGuard":null,"tryCatchPattern":"catch (IllegalExpressionException e) { /* check data presence in range first */ }","preventionTips":["Confirm both series have data in the same time range before combining","Use viewAsSeq when either series may legitimately be empty"],"tags":["mqe","query-engine","time-series","binary-op"],"backgroundTag":null,"analyzedSha":"102af09b4a56064e22050dded10e2c52e490d040","analyzedAt":"2026-08-14T10:47:52.647Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}