apache/seatunnel · error · UnsupportedOperationException

Unsupported like keyword:

Error message

Unsupported like keyword: 

What it means

ExpressionUtils.convert() translates SQL LIKE-family conditions into Iceberg expressions. Only plain LIKE is supported (mapped to Expressions.startsWith); other LIKE keywords (ILIKE, NOT LIKE, RLIKE) hit the else branch and throw UnsupportedOperationException. Case-insensitive and negated matching are not translated.

Source

Thrown at seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/utils/ExpressionUtils.java:246

            return Expressions.in(column.getColumnName(), values);
        }
        if (condition instanceof IsBooleanExpression) {
            IsBooleanExpression booleanExpression = (IsBooleanExpression) condition;
            Column column = (Column) booleanExpression.getLeftExpression();
            if (booleanExpression.isNot()) {
                return Expressions.notEqual(column.getColumnName(), booleanExpression.isTrue());
            }
            return Expressions.equal(column.getColumnName(), booleanExpression.isTrue());
        }
        if (condition instanceof LikeExpression) {
            LikeExpression expr = (LikeExpression) condition;
            String columnName = ((Column) expr.getLeftExpression()).getColumnName();
            String value = ((StringValue) expr.getRightExpression()).getValue();
            LikeExpression.KeyWord keyWord = expr.getLikeKeyWord();
            if (keyWord == LikeExpression.KeyWord.LIKE) {
                return Expressions.startsWith(columnName, value);
            } else {
                throw new UnsupportedOperationException("Unsupported like keyword: " + keyWord);
            }
        }

        throw new UnsupportedOperationException(
                "Unsupported condition: " + condition.getClass().getName());
    }

    @SneakyThrows
    private static Object convertValueExpression(
            net.sf.jsqlparser.expression.Expression valueExpression,
            Types.NestedField icebergColumn) {
        switch (icebergColumn.type().typeId()) {
            case DECIMAL:
                return new BigDecimal(valueExpression.toString());
            case DATE:
                if (valueExpression instanceof StringValue) {
                    LocalDate date =
                            LocalDate.parse(

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Replace ILIKE with LIKE plus case handling (e.g. filter on UPPER(col) = UPPER('abc%')) if semantics allow, or filter client-side
  2. Express NOT LIKE differently, e.g. delete only matching rows explicitly, or use NOT-related comparison supported by the converter
  3. Pre-filter rows before issuing the delete so the connector only receives supported conditions
  4. Extend convert() to map ILIKE to an Expression with lower()/upper() and NOT LIKE via not(startsWith(...)) if you control the code

Example fix

// before
DELETE FROM tbl WHERE col NOT LIKE 'abc%'
// after
DELETE FROM tbl WHERE col LIKE 'abc%' -- negation unsupported; invert selection logic instead
Defensive patterns

Strategy: validation

Validate before calling

// Reject unsupported LIKE keywords before conversion
if (sql.matches("(?i).*(ILIKE|NOT\\s+LIKE|RLIKE).*")) throw new IllegalArgumentException("only plain LIKE is supported");

Try / catch

try { expr = convert(condition); } catch (UnsupportedOperationException e) { if (e.getMessage().startsWith("Unsupported like keyword")) { /* rewrite condition with plain LIKE or filter client-side */ } throw e; }

Prevention

When it happens

Trigger: A WHERE clause in delete-SQL or pushdown filter contains ILIKE / NOT LIKE / RLIKE instead of plain LIKE, reaching the LIKE branch of convert().

Common situations: Users writing case-insensitive pattern filters (ILIKE) in delete SQL; negated pattern deletes (NOT LIKE); migrating Postgres-style queries (RLIKE) into iceberg delete statements.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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