dwsmith1983 commented on code in PR #5880:
URL: https://github.com/apache/datafusion-comet/pull/5880#discussion_r3996936435


##########
spark/src/main/scala/org/apache/spark/sql/comet/CometIcebergNativeScanExec.scala:
##########
@@ -235,9 +235,10 @@ case class CometIcebergNativeScanExec(
       nativeMetrics = nativeMetrics,
       subqueries = Seq.empty) {
       override def compute(split: Partition, context: TaskContext): 
Iterator[ColumnarBatch] = {
-        val res = super.compute(split, context)
+        // Register before super.compute creates the CometExecIterator, so 
this listener runs
+        // after the iterator's close has published the final scan metrics.

Review Comment:
   > An Iceberg scan with a `LIMIT` at the default update interval would mirror 
your parquet test and give this line a guard.
   
   Added in CometIcebergNativeSuite at the default interval and at -1. One 
caveat: the Iceberg scan is always its own block with no JVM input, so it takes 
the batch-receiver path where every returned batch publishes metrics, and the 
test passes with or without the reorder. The shape that would fail, an Iceberg 
scan fused under a join with a broadcast input, registers no report at all 
until #5265 widens the gate. So this test covers the site rather than proving 
the order.
   



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