taoran92 opened a new issue, #10931:
URL: https://github.com/apache/paimon/issues/10931

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   ### Paimon version
   
   master, commit `30d91278af7435c95a1adf0062a44e8c3a05643d`.
   
   ### Compute Engine
   
   Flink 1.20.4, JDK 11, UTF-8; local CDC parser-to-row reproduction.
   
   ### Minimal reproduce step
   
   1. Parse a Debezium Avro INSERT with a plain `bytes` field containing `00 FF 
80 41` through `DebeziumAvroRecordParser`, then convert it to a VARBINARY sink 
field with `CdcRecordUtils.toGenericRow`.
   2. Repeat with a ByteBuffer containing `09 00 FF 80 41 08`, with 
`position=1` and `limit=5`.
   
   ### What doesn't meet your expectations?
   
   Both cases should preserve exactly `00 FF 80 41`. The first instead produces 
`00 EF BF BD EF BF BD 41`; the second also includes bytes outside the valid 
buffer range. Direct and read-only buffers fail when accessing the backing 
array.
   
   ### Anything else?
   
   Follow-up to #10879, which covers Debezium JSON/MySQL. The Avro path still 
uses `new String(((ByteBuffer) origin).array())`.
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!
   


-- 
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]

Reply via email to