Apache Iceberg version
1.2.1 (latest release)
Query engine
None
Please describe the bug 🐞
Use the TABLE_SCAN_THEN_INCREMENTAL strategy to read the iceberg table data in real time. When the delete or update sql operation is executed in trino, the following code will not read the changed data, but can only monitor the data of the insert sql operation.
`IcebergSource icebergSource = IcebergSource.forRowData()
.table(sourceTable)
.tableLoader(sourceTableLoader)
.assignerFactory(new SimpleSplitAssignerFactory())
.streaming(true)
.streamingStartingStrategy(StreamingStartingStrategy.TABLE_SCAN_THEN_INCREMENTAL)
.monitorInterval(Duration.ofSeconds(10))
.build();
StreamExecutionEnvironment env = StreamExecutionEnvironment.createLocalEnvironmentWithWebUI(buildConfiguration());
DataStream<RowData> stream =
env.fromSource(icebergSource, WatermarkStrategy.noWatermarks(), "icebergSource", TypeInformation.of(RowData.class));
try (CloseableIterator<RowData> iterator = stream.executeAndCollect()) {
while (iterator.hasNext()) {
System.out.println(iterator.next());
}
}`