andygrove commented on code in PR #6314:
URL: https://github.com/apache/datafusion-comet/pull/6314#discussion_r4149555143


##########
spark/src/test/scala/org/apache/spark/sql/comet/CometTaskMetricsSuite.scala:
##########
@@ -1097,6 +1097,39 @@ class CometTaskMetricsSuite extends CometTestBase with 
AdaptiveSparkPlanHelper {
     }
   }
 
+  test("native block without a JVM input publishes SQL metrics on the update 
interval") {

Review Comment:
   Added the `1` ms case in 299144ee16, plus 275327a6a6 to keep it compiling on 
Spark 3.x, where `withSQLConf` returns `Unit`. The task creates the native 
plan, which starts the interval clock, when it builds the iterator, so sleeping 
before the first `next()` makes the interval due deterministically rather than 
by timing. I checked that it catches the case you described: with the publish 
removed from this branch, the new case fails with `output_rows` still at 0 
after the first batch. It passed three runs in a row with the fix.



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