apache/seatunnel · error · IllegalArgumentException

Unsupported expression value type

Error message

Unsupported expression value type: ${expression}

What it means

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.

Solutions

  1. Express the literal in a supported form (plain integer/string/date/time/timestamp).
  2. Avoid negative or decimal literals; rewrite comparisons or verify the JSqlParser version's expression classes.
  3. Extend getJSQLParserDataTypeValue with DoubleValue/SignedExpression handling if those literals must be supported.

Example fix

// before: fall-through throw in getJSQLParserDataTypeValue | // after: add branch: if (expression instanceof DoubleValue) return ((DoubleValue) expression).getValue();
Defensive patterns

Strategy: validation

Validate before calling

Set<Class<?>> OK = Set.of(LongValue.class, StringValue.class, DateValue.class, TimeValue.class, TimestampValue.class); boolean literalSupported = OK.stream().anyMatch(c -> c.isInstance(expr));

Type guard

boolean isSupportedLiteral(Expression e) { return e instanceof LongValue || e instanceof StringValue || e instanceof DateValue || e instanceof TimeValue || e instanceof TimestampValue; }

Try / catch

try { pred = converter.convertSqlWhereToPaimonPredicate(where, rowType); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith("Unsupported expression value type")) { /* rewrite or drop the literal */ } throw e; }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/fd297428f7b46fa7. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/source/converter/SqlToPaimonPredicateConverter.java:421

        throw new IllegalArgumentException(
                String.format("The column named [%s] is not exists", columnName));
    }

    private static Object getJSQLParserDataTypeValue(Expression expression) {
        if (expression instanceof LongValue) {
            return ((LongValue) expression).getValue();
        } else if (expression instanceof StringValue || expression instanceof HexValue) {
            return BinaryString.fromString(((StringValue) expression).getValue());
        } else if (expression instanceof DoubleValue) {
            return ((DoubleValue) expression).getValue();
        } else if (expression instanceof DateValue) {
            return ((DateValue) expression).getValue();
        } else if (expression instanceof TimeValue) {
            return ((TimeValue) expression).getValue();
        } else if (expression instanceof TimestampValue) {
            return ((TimestampValue) expression).getValue();
        }
        throw new IllegalArgumentException("Unsupported expression value type: " + expression);
    }

    private static int getColumnIndex(PredicateBuilder builder, Column column) {
        int index = builder.indexOf(column.getColumnName().replace("`", ""));
        if (index == -1) {
            throw new IllegalArgumentException(
                    String.format("The column named [%s] is not exists", column.getColumnName()));
        }
        return index;
    }
}

View on GitHub (pinned to cf67b549a7)