wypoon commented on code in PR #12260: URL: https://github.com/apache/iceberg/pull/12260#discussion_r1955407420
########## spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/source/TestStructuredStreamingRead3.java: ########## @@ -206,6 +220,18 @@ public void testReadStreamOnIcebergTableWithMultipleSnapshots_WithNumberOfRows_4 .isEqualTo(2); } + @TestTemplate + public void testReadStreamWithCompositeReadLimit() throws Exception { + appendDataAsMultipleSnapshots(TEST_DATA_MULTIPLE_SNAPSHOTS); + + assertThat( + microBatchCount( + ImmutableMap.of( + SparkReadOptions.STREAMING_MAX_FILES_PER_MICRO_BATCH, "1", + SparkReadOptions.STREAMING_MAX_ROWS_PER_MICRO_BATCH, "2"))) + .isEqualTo(6); Review Comment: This fails without the fix to `SparkMicroBatchStream::getDefaultReadLimit()`, as Spark then calls `SparkMicroBatchStream::latestOffset(Offset, ReadLimit)` with a `CompositeReadLimit` where one of the `ReadLimit`s is a `ReadMaxRows(1)`. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org