taoran92 opened a new pull request, #10973:
URL: https://github.com/apache/paimon/pull/10973
### Purpose
Closes #10972.
PostgreSQL CDC currently converts plain binary values from Base64 through a
Java string, silently replacing bytes that are invalid in the default charset.
For example, `00 FF 80 41` becomes `00 EF BF BD EF BF BD 41` on a UTF-8 JVM.
Preserve Base64 values in snapshot and WAL records and attach the existing
binary-field markers so the sink restores the original bytes. Preserve
computed-column text semantics and existing BIT/DECIMAL handling. Share
binary-field selection between the PostgreSQL and MySQL parsers.
### Tests
Add eight PostgreSQL regression tests covering arbitrary bytes, null and
empty values, snapshot/update/delete records, marker isolation, logical types,
computed columns, existing text columns, and table write/read round trips. Six
of these tests fail with the previous PostgreSQL parser; all eight pass with
this change.
The following targeted suite passes all 57 tests with the default
Checkstyle, Spotless and Enforcer checks enabled (JDK 11, Flink 1.20.4):
```shell
mvn -o -pl paimon-flink/paimon-flink-cdc -Pflink1 -DwildcardSuites=none \
-Dtest=PostgresBinaryRecordTest,PostgresRecordParserTest,PostgresTypeUtilsTest,DebeziumBinaryRecordTest,DebeziumAvroBinaryRecordTest,DebeziumSchemaUtilsTest,CdcRecordUtilsTest,ComputedColumnUtilsTest
test
```
--
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]