rdblue commented on a change in pull request #3863:
URL: https://github.com/apache/iceberg/pull/3863#discussion_r780840017



##########
File path: 
spark/v3.0/spark-extensions/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DynamicFileFilterExec.scala
##########
@@ -78,6 +85,16 @@ abstract class DynamicFileFilterExecBase(
   override def simpleString(maxFields: Int): String = {
     s"DynamicFileFilterExec${truncatedString(output, "[", ", ", "]", 
maxFields)}"
   }
+
+  def postFileFilterMetric(totalFilesNumber: Int, hitFilesNumber: Int): Unit = 
{
+    longMetric("totalFiles").set(totalFilesNumber)
+    longMetric("hitFiles").set(hitFilesNumber)
+    if (totalFilesNumber > 0) {
+      longMetric("fileHitRate").set(hitFilesNumber * 100 / totalFilesNumber)
+    }
+    val executionId = 
sparkContext.getLocalProperty(SQLExecution.EXECUTION_ID_KEY)
+    SQLMetrics.postDriverMetricUpdates(sparkContext, executionId, 
metrics.values.toSeq)

Review comment:
       Can you explain this a bit more? What's going on with this line, sending 
updates to the driver?




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