RussellSpitzer commented on a change in pull request #3775:
URL: https://github.com/apache/iceberg/pull/3775#discussion_r772594645
##########
File path:
spark/v3.0/spark/src/main/java/org/apache/iceberg/spark/source/SparkMicroBatchStream.java
##########
@@ -169,8 +169,7 @@ public void stop() {
private List<FileScanTask> planFiles(StreamingOffset startOffset,
StreamingOffset endOffset) {
List<FileScanTask> fileScanTasks = Lists.newArrayList();
StreamingOffset batchStartOffset =
StreamingOffset.START_OFFSET.equals(startOffset) ?
- new StreamingOffset(SnapshotUtil.firstSnapshotAfterTimestamp(table,
fromTimestamp).snapshotId(), 0, false) :
- startOffset;
+ determineStartingOffset(table, fromTimestamp) : startOffset;
Review comment:
I wonder if it would be simpler if we just drop the ternary operator
here and have "suppliedOffset" be a parameter like
```java
determineStartingOffset(table, fromTimestamp, startOffset) {
... logic
}
determineStartingOffset(table, fromTimetsamp) {
determineStartingOffset(table, fromTimetsamp, null)
}
```
--
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]