-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-50153][SQL] Add name to RuleExecutor to make printing QueryExecutionMetrics's logs clearer
#48688
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
Conversation
…ryExecutionMetrics`'s logs clearer
MaxGekk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks helpful.
| abstract class RuleExecutor[TreeType <: TreeNode[_]] extends Logging { | ||
|
|
||
| /** Name for this rule executor, automatically inferred based on class name. */ | ||
| val name: String = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about to convert it to a method with protected to allow override in sub-classes for better names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, let me update it now, thanks!
|
+1, LGTM. Merging to master. |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, late LGTM. Thank you, @panbingkun and all!
|
Thanks all @MaxGekk @HyukjinKwon @dongjoon-hyun ❤️ ! |
What changes were proposed in this pull request?
The pr aims to add
nametoRuleExecutorto make printingQueryExecutionMetrics's logs clearer.Otherwise, the following printing is meaningless (without knowing that
RuleExecutor's metric is being output)Why are the changes needed?
There are many
similar outputsprinted in the log, but it seems difficult forspark developersto know whichRuleExecutorgenerated them.Does this PR introduce any user-facing change?
Yes, When
Spark developersobserve the logs printed byPlanChangeLogger#logMetrics, their meaning becomes clearer.How was this patch tested?
Manually check
Was this patch authored or co-authored using generative AI tooling?
No.