taoran92 opened a new pull request, #10879: URL: https://github.com/apache/paimon/pull/10879
### Purpose Closes #10878. Synchronizing a MySQL `BLOB` can silently corrupt binary data because plain Debezium `bytes` values are decoded into a Java string before the sink converts that string back to bytes. For example, the 70-byte PNG in the issue becomes 92 bytes even with UTF-8 as the default charset. Keep plain binary values as Base64 in intermediate CDC records and carry explicit per-field encoding metadata from both the Debezium JSON and MySQL parsers. Decode marked fields when converting sink rows and projecting keys, checking the decoded byte length for binary target types. Preserve existing text conversions and computed-column behavior, while keeping BIT, DECIMAL and geometry logical types on their existing conversion paths. ### Tests - Added JSON/MySQL parser-to-row, key projection and local append-table write/read coverage for null, empty, text and arbitrary binary values, including all 256 byte values. - Added coverage for marked versus ordinary string fields, binary length validation, existing text target columns, case conversion, and Java/Flink Kryo serialization round trips. - Ran 66 targeted CDC tests with `-Pflink1`: no failures, errors or skipped tests. Checkstyle and Spotless checks passed. - Replayed the captured snapshot and binlog events through both parsers, then wrote and read a local primary-key table: the parent commit returns 92-byte invalid images; this change preserves the original 70 bytes and the PNGs decode successfully. This replay uses local table APIs, without starting a live MySQL/Flink cluster. -- 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]
