viirya commented on pull request #31398:
URL: https://github.com/apache/spark/pull/31398#issuecomment-772334527


   > The problem here is how to integrate this with Spark SQL. One idea is to 
use `AccumulatorV2`, which is a public API already and is very flexible. But we 
need to figure out how to make it work with the SQL UI. The other idea is to 
use `SQLMetrics`, which is private and we need some API design to map public 
API to `SQLMetrics`. It also limits the way of aggregating metrics.
   
   Currently I took the second idea. I add one public interface `CustomMetric` 
to map to `SQLMetrics`. There will be corresponding metric classes such as 
`CustomSumMetric`. This approach is easier to work with SQL UI.


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

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