andygrove opened a new issue, #1109: URL: https://github.com/apache/datafusion-comet/issues/1109
### Describe the bug `CometNativeExec` builds a tree of `CometMetric` nodes containing SQLMetrics for the Spark plan operators. This structure is passed into the `Native.createPlan` method. During native execution, calls to `update_metrics` will recurse through the native `ExecutionPlan` tree and through the `CometMetric` tree simultaneously and copy native metrics to Spark metrics. This approach assumes a 1:1 mapping between the Spark plan and the native plan. In some cases, this assumption is not correct and we therefore drop metrics and the Spark UI does not show metrics for some nodes. One example is for aggregate queries, where the native planner sometimes inserts an additional projection. Another example is that we insert `CopyExec` nodes around the inputs to aggregate, sort, and join operators. ### Steps to reproduce _No response_ ### Expected behavior _No response_ ### Additional context _No response_ -- 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: github-unsubscr...@datafusion.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org