jackylee-ch opened a new pull request, #10371:
URL: https://github.com/apache/paimon/pull/10371

   ### Purpose
   
   `CanalFieldParser` and `AliyunFieldParser` decode a MySQL `enum` value by 
indexing
   `options[elementIndex - 1]`. MySQL stores index `0` for an empty or invalid 
enum value
   (e.g. a value inserted outside the declared members under a non-strict SQL 
mode), so a row
   carrying it made the index `-1` and threw `ArrayIndexOutOfBoundsException`, 
failing the
   whole canal / aliyun-DTS sync job.
   
   This maps a non-positive index to the empty string — MySQL's own 
representation of that
   value — before indexing. Valid 1-based indices are unchanged.
   
   ### Tests
   
   `CanalFieldParserTest` / `AliyunFieldParserTest` assert index `0` yields the 
empty string
   and that valid indices still resolve to their members; both threw
   `ArrayIndexOutOfBoundsException` before the change.
   
   ### API and Format
   
   No change.
   
   ### Documentation
   
   No change.
   


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