Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native metrics do not always get mapped to the correct Spark nodes #1109

Closed
andygrove opened this issue Nov 21, 2024 · 0 comments · Fixed by #1111
Closed

Native metrics do not always get mapped to the correct Spark nodes #1109

andygrove opened this issue Nov 21, 2024 · 0 comments · Fixed by #1111
Assignees
Labels
bug Something isn't working

Comments

@andygrove
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant