flyrain commented on PR #11564: URL: https://github.com/apache/iceberg/pull/11564#issuecomment-2487559443
Thank you, @Acehaidrey, for reporting this issue! It seems that the method `buildChangelogScan()` does not properly set up the scan when the startTimestamp is newer than the timestamp of the current snapshot. Adding the following logic at this [line](https://github.com/apache/iceberg/blob/451834535892dca3cff199f975038be80a2d0b12/spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkScanBuilder.java#L562-L562) should address the problem: ``` if (startTimestamp != null && table.currentSnapshot().timestampMillis() < startTimestamp) { emptyScan = true; } ``` However, I believe there's an opportunity to revisit the `buildChangelogScan()` method more holistically. Refactoring it could improve its clarity and make it less prone to errors in the future. I'd be happy to collaborate or discuss further ideas for restructuring the method. Let me know what you think! -- 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