apache/skywalking · error · IllegalExpressionException
Unsupported bool operation.
Error message
Unsupported bool operation.
What it means
IllegalExpressionException at the bottom of BoolOp.boolOp's switch: the opType token reaching the scalar boolean AND/OR evaluator is neither MQEParser.AND nor MQEParser.OR. Grammar-level, && and || are the only boolean connectors, so a different token here means dispatch drift (a new connector token added to the grammar without a matching case here).
Source
Thrown at oap-server/mqe-rt/src/main/java/org/apache/skywalking/mqe/rt/operation/BoolOp.java:69
}
if (!checkBool(rightValue)) {
throw new IllegalExpressionException("Bool Operation: The result of the right expression is not 1 or 0.");
}
switch (opType) {
case MQEParser.AND:
if (leftValue == 1 && rightValue == 1) {
return 1;
} else {
return 0;
}
case MQEParser.OR:
if (leftValue == 1 || rightValue == 1) {
return 1;
} else {
return 0;
}
default:
throw new IllegalExpressionException("Unsupported bool operation.");
}
}
private static boolean checkExpression(ExpressionResult result) {
return result.isBoolResult();
}
private static boolean checkBool(double v) {
int i = (int) v;
return i == 0 || i == 1;
}
}
View on GitHub (pinned to 102af09b4a)
Solutions
- Ensure parser (mqe-grammar) and runtime (mqe-rt) jars come from the same OAP build
- If extending the grammar with a new boolean connector, add its case to this switch (AND/OR pattern)
- Report upstream if reproduced with a stock expression on a clean install
Defensive patterns
Strategy: try-catch
Try / catch
catch (IllegalExpressionException e) { /* grammar/runtime skew — rebuild with matching mqe-grammar and mqe-rt */ } Prevention
- Never mix parser and runtime jars from different OAP versions
- Add switch cases when adding new boolean connectors in forks
When it happens
Trigger: Internal-only: a grammar/runtime version skew where the parser emits a boolean-connective token unknown to this switch, e.g. a fork adding 'xor' or an upgraded UI/parser against an older mqe-rt jar.
Common situations: Mixed-version OAP deployments; custom grammar extensions. Standard user queries with && and || never land on the default branch.
Related errors
- Bool Operation: The result of the left expression is not 1 o
- Bool Operation: The result of the right expression is not 1
- Unsupported predicted value type: {}
- Unsupported bool operation: {}
- Unsupported aggregateLabels function.
AI-assisted analysis of apache/skywalking@102af09b4a (2026-08-14).
Data as JSON: /api/errors/b75cd464145237a6.
Report an issue: GitHub.