{"record":{"id":"40d0e15343ceb224","repo":"apache/seatunnel","slug":"common-unsupported-operation-40d0e1","errorCode":"COMMON_UNSUPPORTED_OPERATION","errorMessage":"Unsupported rowKind: ","messagePattern":"Unsupported rowKind: ","errorType":"error_code","errorClass":"JdbcConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/executor/BufferReducedBatchStatementExecutor.java","lineNumber":125,"sourceCode":"    }\n\n    @Override\n    public void clearBatch() throws SQLException {\n        buffer.clear();\n        upsertExecutor.clearBatch();\n        deleteExecutor.clearBatch();\n    }\n\n    private boolean changeFlag(RowKind rowKind) {\n        switch (rowKind) {\n            case INSERT:\n            case UPDATE_AFTER:\n                return true;\n            case DELETE:\n            case UPDATE_BEFORE:\n                return false;\n            default:\n                throw new JdbcConnectorException(\n                        CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,\n                        \"Unsupported rowKind: \" + rowKind);\n        }\n    }\n}\n","sourceCodeStart":107,"sourceCodeEnd":131,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/executor/BufferReducedBatchStatementExecutor.java#L107-L131","documentation":"BufferReducedBatchStatementExecutor.changeFlag() decides whether a row kind triggers a buffer flush/insert (INSERT, UPDATE_AFTER=true) or a delete/before-image (DELETE, UPDATE_BEFORE=false). Any other RowKind (e.g. INSERT absent here or custom kinds) reaches default and throws JdbcConnectorException with UNSUPPORTED_OPERATION.","triggerScenarios":"The executor processes a SeaTunnelRow whose RowKind is not one of INSERT/DELETE/UPDATE_BEFORE/UPDATE_AFTER handled by the switch — typically rows arriving as UPDATE kind variants or CDC row kinds the JDBC buffer-reduced executor doesn't recognize in this code path.","commonSituations":"CDC pipelines with row kinds not expected by the sink config; source connector emitting non-standard RowKind values; enabling buffered JDBC writing with an unsupported CDC event stream.","solutions":["Check which RowKind is reaching the sink and ensure the source emits standard INSERT/UPDATE_AFTER/DELETE/UPDATE_BEFORE kinds","Configure the sink to support the CDC mode being used (e.g. enable auto-upsert / correct delete handling options)","Filter or convert unsupported RowKinds upstream (e.g. via a transform mapping them to supported kinds)","Upgrade the connector if a newer version handles the missing RowKind"],"exampleFix":"// before\ndefault:\n    throw new JdbcConnectorException(UNSUPPORTED_OPERATION, \"Unsupported rowKind: \" + rowKind);\n// after\ncase INSERT:\n    return true; // handled upstream if previously missing\ndefault:\n    throw new JdbcConnectorException(UNSUPPORTED_OPERATION, \"Unsupported rowKind: \" + rowKind);","handlingStrategy":"try-catch","validationCode":"switch (row.getRowKind()) {\n    case INSERT: case UPDATE_AFTER: case DELETE: case UPDATE_BEFORE: break;\n    default: throw new IllegalArgumentException(\"RowKind not supported by JDBC sink: \" + row.getRowKind());\n}","typeGuard":"boolean isSupportedRowKind(SeaTunnelRow r) {\n    switch (r.getRowKind()) {\n        case INSERT: case UPDATE_AFTER: case DELETE: case UPDATE_BEFORE: return true;\n        default: return false;\n    }\n}","tryCatchPattern":"try {\n    executor.addToBatch(row);\n} catch (JdbcConnectorException e) {\n    if (CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION.equals(e.getErrorCode())\n        && e.getMessage().startsWith(\"Unsupported rowKind\")) {\n        log.warn(\"Skipping row with unsupported kind {}\", row.getRowKind());\n    } else throw e;\n}","preventionTips":["Configure the CDC source to emit only INSERT/UPDATE_BEFORE/UPDATE_AFTER/DELETE","Map row kinds in a transform before the JDBC sink when using non-standard sources","Enable the sink's CDC/upsert options matching the source's changelog semantics"],"tags":["jdbc","cdc","rowkind","unsupported"],"backgroundTag":"unsupported-operation","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}