allisonwang-db commented on code in PR #46481:
URL: https://github.com/apache/spark/pull/46481#discussion_r1594584246


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/python/PythonStreamingDataSourceSuite.scala:
##########
@@ -326,8 +326,11 @@ class PythonStreamingDataSourceSuite extends 
PythonDataSourceSuiteBase {
         lastBatch = q.lastProgress.batchId.toInt
       }
       assert(lastBatch > 20)
+      val rowCount = 
spark.read.format("json").load(outputDir.getAbsolutePath).count()
+      // There may be one uncommitted batch that is not recorded in query 
progress.
+      assert(rowCount == 2 * lastBatch + 2 || rowCount == 2 * lastBatch + 4)

Review Comment:
   Can we explain the `2 * lastBatch + 2` and `2 * lastBatch + 4` in the 
comment here? Just curious why can't we provide an upper bound for the row 
count here?



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to