cccs-jc commented on issue #8902:
URL: https://github.com/apache/iceberg/issues/8902#issuecomment-1780032370
I did manage to reproduce the issue. So we'll see how it goes.
```java
@Test
public void testReadStreamWithSnapshotTypeReplaceIgnoresReplace() throws
Exception {
// fill table with some data
List<List<SimpleRecord>> expected = TEST_DATA_MULTIPLE_SNAPSHOTS;
appendDataAsMultipleSnapshots(expected);
// this should create a snapshot with type Replace.
table.rewriteManifests().clusterBy(f -> 1).commit();
RewriteFiles rewrite = table.newRewrite();
Iterable<Snapshot> it = table.snapshots();
for (Snapshot snapshot : it) {
Iterable<DataFile> datafiles = snapshot.addedDataFiles(table.io());
for (DataFile datafile : datafiles) {
rewrite.addFile(datafile);
rewrite.deleteFile(datafile);
}
}
rewrite.commit();
// check pre-condition
Assert.assertEquals(DataOperations.REPLACE,
table.currentSnapshot().operation());
// StreamingQuery query = startStream();
// List<SimpleRecord> actual = rowsAvailable(query);
//
Assertions.assertThat(actual).containsExactlyInAnyOrderElementsOf(Iterables.concat(expected));
Assert.assertEquals(
5,
microBatchCount(
ImmutableMap.of(SparkReadOptions.STREAMING_MAX_FILES_PER_MICRO_BATCH, "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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]