nateab commented on code in PR #27510:
URL: https://github.com/apache/flink/pull/27510#discussion_r2760857863


##########
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/util/collections/binary/BytesMultiMapTestBase.java:
##########
@@ -127,6 +129,46 @@ void testBuildAndRetrieve() throws Exception {
         }
     }
 
+    /**
+     * Tests that EOFException is thrown when the map exceeds its capacity.
+     *
+     * <p>This test verifies the fix for FLINK-38539: when the record area 
offset exceeds
+     * Integer.MAX_VALUE (~2GB), the code now throws EOFException with a clear 
message instead of
+     * IndexOutOfBoundsException caused by integer overflow when casting long 
to int.
+     *
+     * <p>While this test cannot practically allocate 2GB of memory, it 
verifies the EOFException
+     * handling path works correctly when the map is filled to capacity.
+     */
+    @Test
+    void testThrowsEOFExceptionWhenFull() throws Exception {

Review Comment:
   Sure I've added 
`flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/util/collections/binary/AbstractBytesMultiMapBoundaryTest.java`
 to test this now!



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