zhangshenghang opened a new pull request, #11415: URL: https://github.com/apache/seatunnel/pull/11415
## What does this PR do? Fixes numeric JSON serialization when a multi-table CDC job sends heterogeneous field values to RabbitMQ. ## Why is this change needed? The JSON serializer used the catalog schema to cast every numeric field to one fixed Java type. When tables matched by a CDC pattern used different field types, a `String` or `BigDecimal` value could be cast to `Integer` or `Long`, causing the job to fail. ## How was it fixed? Preserve the runtime numeric representation when it is numeric, and serialize a non-numeric heterogeneous value as JSON text instead of failing with a class-cast exception. ## Does this PR introduce any user-facing change? Yes. Heterogeneous multi-table rows can now be serialized to JSON without an unchecked numeric cast failure. ## How was this tested? - Added a regression test for a row containing a text value and a `BigDecimal` under numeric catalog fields. - Ran `./mvnw -pl seatunnel-formats/seatunnel-format-json test`. - Ran `./mvnw spotless:apply`. - Ran `./mvnw -q -DskipTests verify`. Closes #10621. -- 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]
