{"record":{"id":"fd297428f7b46fa7","repo":"apache/seatunnel","slug":"unsupported-expression-value-type-expression","errorCode":null,"errorMessage":"Unsupported expression value type: ${expression}","messagePattern":"Unsupported expression value type: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/source/converter/SqlToPaimonPredicateConverter.java","lineNumber":421,"sourceCode":"        throw new IllegalArgumentException(\n                String.format(\"The column named [%s] is not exists\", columnName));\n    }\n\n    private static Object getJSQLParserDataTypeValue(Expression expression) {\n        if (expression instanceof LongValue) {\n            return ((LongValue) expression).getValue();\n        } else if (expression instanceof StringValue || expression instanceof HexValue) {\n            return BinaryString.fromString(((StringValue) expression).getValue());\n        } else if (expression instanceof DoubleValue) {\n            return ((DoubleValue) expression).getValue();\n        } else if (expression instanceof DateValue) {\n            return ((DateValue) expression).getValue();\n        } else if (expression instanceof TimeValue) {\n            return ((TimeValue) expression).getValue();\n        } else if (expression instanceof TimestampValue) {\n            return ((TimestampValue) expression).getValue();\n        }\n        throw new IllegalArgumentException(\"Unsupported expression value type: \" + expression);\n    }\n\n    private static int getColumnIndex(PredicateBuilder builder, Column column) {\n        int index = builder.indexOf(column.getColumnName().replace(\"`\", \"\"));\n        if (index == -1) {\n            throw new IllegalArgumentException(\n                    String.format(\"The column named [%s] is not exists\", column.getColumnName()));\n        }\n        return index;\n    }\n}\n","sourceCodeStart":403,"sourceCodeEnd":433,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/source/converter/SqlToPaimonPredicateConverter.java#L403-L433","documentation":"getJSQLParserDataTypeValue extracts Java values from JSqlParser literal expressions (LongValue, StringValue, DateValue, TimeValue, TimestampValue). Any other literal expression falls through to this throw because the converter supports only those five literal kinds.","triggerScenarios":"A WHERE clause contains a literal type outside the supported set, commonly a decimal literal like `price IN (1.5, 2.5)` (DoubleValue) or a negated number (SignedExpression), depending on the JSqlParser version.","commonSituations":"Decimal column filters; JSqlParser upgrades changing the literal class hierarchy so doubles or signed numbers are no longer LongValue; hex/bit literals copied from other dialects.","solutions":["Express the literal in a supported form (plain integer/string/date/time/timestamp).","Avoid negative or decimal literals; rewrite comparisons or verify the JSqlParser version's expression classes.","Extend getJSQLParserDataTypeValue with DoubleValue/SignedExpression handling if those literals must be supported."],"exampleFix":"// before: fall-through throw in getJSQLParserDataTypeValue | // after: add branch: if (expression instanceof DoubleValue) return ((DoubleValue) expression).getValue();","handlingStrategy":"validation","validationCode":"Set<Class<?>> OK = Set.of(LongValue.class, StringValue.class, DateValue.class, TimeValue.class, TimestampValue.class); boolean literalSupported = OK.stream().anyMatch(c -> c.isInstance(expr));","typeGuard":"boolean isSupportedLiteral(Expression e) { return e instanceof LongValue || e instanceof StringValue || e instanceof DateValue || e instanceof TimeValue || e instanceof TimestampValue; }","tryCatchPattern":"try { pred = converter.convertSqlWhereToPaimonPredicate(where, rowType); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith(\"Unsupported expression value type\")) { /* rewrite or drop the literal */ } throw e; }","preventionTips":["Use only integer, string, date, time, and timestamp literals in pushdown filters.","Avoid decimal/negative/hex literals or add DoubleValue/SignedExpression support.","Pin and test against the JSqlParser version in use."],"tags":["paimon","sql","literal","type-conversion"],"backgroundTag":"unsupported-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}