{"record":{"id":"52d2437bbae5a9ee","repo":"apache/seatunnel","slug":"unsupported-condition","errorCode":null,"errorMessage":"Unsupported condition: ","messagePattern":"Unsupported condition: ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/utils/ExpressionUtils.java","lineNumber":250,"sourceCode":"            Column column = (Column) booleanExpression.getLeftExpression();\n            if (booleanExpression.isNot()) {\n                return Expressions.notEqual(column.getColumnName(), booleanExpression.isTrue());\n            }\n            return Expressions.equal(column.getColumnName(), booleanExpression.isTrue());\n        }\n        if (condition instanceof LikeExpression) {\n            LikeExpression expr = (LikeExpression) condition;\n            String columnName = ((Column) expr.getLeftExpression()).getColumnName();\n            String value = ((StringValue) expr.getRightExpression()).getValue();\n            LikeExpression.KeyWord keyWord = expr.getLikeKeyWord();\n            if (keyWord == LikeExpression.KeyWord.LIKE) {\n                return Expressions.startsWith(columnName, value);\n            } else {\n                throw new UnsupportedOperationException(\"Unsupported like keyword: \" + keyWord);\n            }\n        }\n\n        throw new UnsupportedOperationException(\n                \"Unsupported condition: \" + condition.getClass().getName());\n    }\n\n    @SneakyThrows\n    private static Object convertValueExpression(\n            net.sf.jsqlparser.expression.Expression valueExpression,\n            Types.NestedField icebergColumn) {\n        switch (icebergColumn.type().typeId()) {\n            case DECIMAL:\n                return new BigDecimal(valueExpression.toString());\n            case DATE:\n                if (valueExpression instanceof StringValue) {\n                    LocalDate date =\n                            LocalDate.parse(\n                                    ((StringValue) valueExpression).getValue(), ISO_LOCAL_DATE);\n                    return DateTimeUtil.daysFromDate(date);\n                }\n            case TIME:","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/utils/ExpressionUtils.java#L232-L268","documentation":"SeaTunnel's Iceberg connector converts a SQL WHERE clause (parsed with JSqlParser) into an Iceberg Expression via ExpressionUtils.convert. When the condition expression's class is not one of the supported comparison types (EqualsTo, GreaterThan, LikeExpression variants, etc.), convert throws UnsupportedOperationException with the Java class name of the condition. This is a deliberate limitation of the predicate push-down translator, not a data error.","triggerScenarios":"Calling parseWhereClauseToIcebergExpression or convertDeleteSQL with a WHERE clause containing an unsupported condition type, e.g. IS NULL / IS NOT NULL, IN expressions, BETWEEN, a function call, or a subquery — anything whose JSqlParser class is not matched by the if/else chain in convert.","commonSituations":"Users configure an Iceberg source query with 'WHERE col IN (1,2)' or 'WHERE col BETWEEN a AND b'; developers extend filter support but pass unhandled AST nodes like Parenthesis into ExpressionUtils.convert.","solutions":["Rewrite the WHERE clause to use only supported operators (=, <>, >, >=, <, <=, LIKE with supported keywords) and re-run the job","Push down only supported predicates and apply the remaining filtering downstream, e.g. move IN/BETWEEN logic into a SeaTunnel SQL transform","Add a new branch in ExpressionUtils.convert handling the reported condition class (the class name in the message tells you exactly which node is missing)","Use a SeaTunnel SQL transform instead of source-level predicate push-down for the unsupported expression"],"exampleFix":"// before\nString query = \"SELECT * FROM db.t WHERE id IN (1,2)\";\n// after (supported predicate)\nString query = \"SELECT * FROM db.t WHERE id = 1\"; // or OR id = 2","handlingStrategy":"try-catch","validationCode":"// Validate condition classes before conversion\nnet.sf.jsqlparser.expression.Expression where = stmt.getWhere();\nif (!(where instanceof BinaryExpression || where instanceof LikeExpression)) {\n    throw new IllegalArgumentException(\"Unsupported predicate: \" + where.getClass().getSimpleName());\n}","typeGuard":"boolean isSupported(net.sf.jsqlparser.expression.Expression e) {\n    return e instanceof EqualsTo || e instanceof NotEqualsTo || e instanceof GreaterThan\n        || e instanceof GreaterThanEquals || e instanceof MinorThan || e instanceof MinorThanEquals\n        || e instanceof LikeExpression;\n}","tryCatchPattern":"try {\n    Expression icebergExpr = ExpressionUtils.convert(whereClause);\n} catch (UnsupportedOperationException e) {\n    log.warn(\"Predicate not pushed down: {}\", e.getMessage());\n    return Expressions.alwaysTrue(); // fall back to full scan + client-side filter\n}","preventionTips":["Restrict user-supplied filter SQL to simple binary comparisons and supported LIKE patterns","Log unsupported predicates and fall back to non-pushed-down filtering instead of failing the job","Keep a test that converts every predicate grammar the connector claims to support","Read the class name in the error message to map directly to the missing JSqlParser AST node"],"tags":["iceberg","sql","unsupported-operation","predicate-pushdown"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}