CTTY commented on code in PR #11947:
URL: https://github.com/apache/hudi/pull/11947#discussion_r1797918568
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/procedure/TestCopyToTableProcedure.scala:
##########
@@ -188,10 +191,11 @@ class TestCopyToTableProcedure extends
HoodieSparkProcedureTestBase {
spark.sql(s"insert into $tableName select 2, 'a2', 20, 1500")
// mark beginTime
- val beginTime = spark.sql(s"select max(_hoodie_commit_time) from
$tableName").collectAsList().get(0).get(0)
+ val fs = HadoopFSUtils.getFs(tablePath,
spark.sessionState.newHadoopConf())
+ val beginCompletionTime =
HoodieDataSourceHelpers.latestCommitCompletionTime(fs, tablePath)
spark.sql(s"insert into $tableName select 3, 'a3', 30, 2000")
spark.sql(s"insert into $tableName select 4, 'a4', 40, 2500")
- val endTime = spark.sql(s"select max(_hoodie_commit_time) from
$tableName").collectAsList().get(0).get(0)
+ val endCompletionTime =
HoodieDataSourceHelpers.latestCommitCompletionTime(fs, tablePath)
Review Comment:
There are few inserts between the two calls of
`HoodieDataSourceHelpers.latestCommitCompletionTime(fs, tablePath)` so it won't
be the same
--
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]