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

   ### Purpose
   
   `CanalFieldParser` and `AliyunFieldParser` decode a MySQL `SET` value from 
its
   bitmap representation with `Integer.parseInt(value)`. A MySQL `SET` column 
may
   declare up to **64** members, so selecting a member at bit 31 or higher 
yields a
   bitmap value greater than `Integer.MAX_VALUE`. `Integer.parseInt` then threw
   `NumberFormatException`, failing the whole canal / aliyun-DTS sync job for an
   otherwise valid row.
   
   This parses the bitmap as a `long` and widens `getSetValuesByIndex` to 
match. The
   decoding loop already operated in long terms (`indexes != 0L`, `indexes % 
2L`,
   `indexes >>> 1`), and the method's own comment already states the value is
   "a bit string conversion from the long" — the parse was the only place still
   narrowed to `int`. Values within the int range decode exactly as before.
   
   ### Tests
   
   `CanalFieldParserSetTest` / `AliyunFieldParserSetTest` decode a 40-member 
`SET`:
   a high bit (2^32) and a low+high combination both resolve to the correct 
members,
   and a small in-range value is unchanged. The high-bit cases throw
   `NumberFormatException` 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