suryaprasanna opened a new pull request, #18120: URL: https://github.com/apache/hudi/pull/18120
### Describe the issue this Pull Request addresses The `TestProtoConversionUtil` class had two failing test methods: - `allFieldsSet_wellKnownTypesAndTimestampsAsRecords` - `allFieldsSet_defaultOptions` The tests were failing because they used simple casting `(long)` to convert unsigned integers to long values. This doesn't properly handle unsigned conversion when the int value is negative in its signed representation (i.e., when the high bit is set). ### Summary and Changelog Fixed test failures by using `Integer.toUnsignedLong()` instead of casting for unsigned integer conversion, matching the behavior in `ProtoConversionUtil.java:446`. **Changes:** - Line 329: Changed `(long) primitiveUnsignedInt` to `Integer.toUnsignedLong(primitiveUnsignedInt)` - Line 304: Changed `(long) wrappedUnsignedInt` to `Integer.toUnsignedLong(wrappedUnsignedInt)` for wrapped records - Line 315: Changed `(long) wrappedUnsignedInt` to `Integer.toUnsignedLong(wrappedUnsignedInt)` for default options All 9 tests in TestProtoConversionUtil now pass. ### Impact No public API or user-facing changes. This is a test-only fix. ### Risk Level **none** ### Documentation Update none ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable -- 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]
