zhengzengprc commented on a change in pull request #3039:
URL: https://github.com/apache/iceberg/pull/3039#discussion_r700649017



##########
File path: 
spark3/src/main/java/org/apache/iceberg/spark/source/SparkMicroBatchStream.java
##########
@@ -106,7 +107,9 @@
     this.splitOpenFileCost = Spark3Util.propertyAsLong(
         options, SparkReadOptions.FILE_OPEN_COST, tableSplitOpenFileCost);
 
-    InitialOffsetStore initialOffsetStore = new InitialOffsetStore(table, 
checkpointLocation);
+    this.fromTimestamp = Spark3Util.propertyAsLong(options, 
SparkReadOptions.STREAM_FROM_TIMESTAMP, -1L);
+
+    InitialOffsetStore initialOffsetStore = new InitialOffsetStore(table, 
checkpointLocation, this.fromTimestamp);

Review comment:
       To be clarify, you mean this in line 112 but not line 110 right? Or both 
of them?
   I see we use this in constructor when we assign the value to a class member, 
but when we use the member we don't quote "this". This should be an easy 
change, but just wanna clarify thanks. 

##########
File path: 
spark3/src/main/java/org/apache/iceberg/spark/source/SparkMicroBatchStream.java
##########
@@ -106,7 +107,9 @@
     this.splitOpenFileCost = Spark3Util.propertyAsLong(
         options, SparkReadOptions.FILE_OPEN_COST, tableSplitOpenFileCost);
 
-    InitialOffsetStore initialOffsetStore = new InitialOffsetStore(table, 
checkpointLocation);
+    this.fromTimestamp = Spark3Util.propertyAsLong(options, 
SparkReadOptions.STREAM_FROM_TIMESTAMP, -1L);
+
+    InitialOffsetStore initialOffsetStore = new InitialOffsetStore(table, 
checkpointLocation, this.fromTimestamp);

Review comment:
       To be clarify, you mean this in line 112 but not line 110 right? Or both 
of them?
   I see we use this in constructor when we assign the value to a class member, 
but when we use the member we don't quote "this". This should be an easy 
change, but just wanna clarify first thanks. 




-- 
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]

Reply via email to