DanielCarter-stack commented on issue #10621: URL: https://github.com/apache/seatunnel/issues/10621#issuecomment-4088198057
<!-- code-pr-reviewer --> Thanks for reporting this issue. Based on the codebase analysis, the root cause is a **type mismatch between CDC schema inference and JSON serialization**. **Root cause:** - When using `table-pattern` for multiple tables, CDC may infer `SeaTunnelRowType` as `INT` based on the first table(s) - For certain tables/fields, Debezium returns `String` or `BigDecimal` values (e.g., when `decimal.handling.mode=string`) - The JSON serializer performs unchecked casts: `RowToJsonConverters.java:119` casts directly to `(int) value` without type safety checks **Evidence:** - `seatunnel-connectors-v2/connector-rabbitmq/src/main/java/org/apache/seatunnel/connectors/seatunnel/rabbitmq/sink/RabbitmqSinkWriter.java:35` — uses `JsonSerializationSchema` - `seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/RowToJsonConverters.java:119` — unchecked `(int) value` cast - `seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/debezium/row/SeaTunnelRowDebeziumDeserializationConverters.java:284-299` — CDC falls back to `String` parsing **To help diagnose, could you please provide:** 1. The DDL of table `saas7.s1`, especially the data type of field `adadadad`? 2. Do multiple tables match `saas7\\..*`? Do they use different data types for the same field positions? 3. What is your Debezium `decimal.handling.mode` setting? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
