lh0156 opened a new pull request, #23053: URL: https://github.com/apache/kafka/pull/23053
### What Fix `Struct` handling of `Schema.Type.BYTES` values represented by `ByteBuffer`. - `getBytes` now returns the logical bytes from the current position through the limit, including for direct buffers. - `Struct.equals` and `Struct.hashCode` normalize direct BYTES fields so equivalent `byte[]` and `ByteBuffer` values compare consistently. - The source `ByteBuffer` position and limit are preserved. No public API signature or wire format is changed. ### Tests - TDD RED: added sliced-buffer, direct-buffer, and equality/hash-code regression tests; all three failed on the pre-fix implementation. - TDD GREEN: all new regression tests passed after the fix. - `./gradlew :connect:api:test --tests org.apache.kafka.connect.data.StructTest --no-build-cache --console=plain` - `./gradlew :connect:api:test --no-build-cache --console=plain` - `./gradlew :connect:api:spotlessCheck :connect:api:checkstyleMain :connect:api:checkstyleTest :connect:api:spotbugsMain --no-build-cache --console=plain` - `git diff --check` Closes KAFKA-20656 -- 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]
