-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-52632][SQL] Pretty display V2 write plan nodes #51332
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
base: master
Are you sure you want to change the base?
Conversation
@@ -67,6 +68,7 @@ private[noop] object NoopBatchWrite extends BatchWrite { | |||
override def useCommitCoordinator(): Boolean = false | |||
override def commit(messages: Array[WriterCommitMessage]): Unit = {} | |||
override def abort(messages: Array[WriterCommitMessage]): Unit = {} | |||
override def toString: String = "NoopBatchWrite" |
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.
Can we use Utils.getFormattedClassName
?
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.
thanks for suggestion, updated
cc @viirya |
@@ -367,6 +365,8 @@ trait V2ExistingTableWriteExec extends V2TableWriteExec { | |||
def refreshCache: () => Unit | |||
def write: Write | |||
|
|||
override val stringArgs: Iterator[Any] = Iterator(query, write) |
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.
As query
is the child
of the plan, it won't be shown by argString
, I wonder why we need to put it in stringArgs
?
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.
I noticed that, but other existing overrides also include the child
, I just follow that.
for example
case class SubqueryExec(...) {
...
override def stringArgs: Iterator[Any] = Iterator(name, child) ++ Iterator(s"[id=#$id]")
...
}
What changes were proposed in this pull request?
Pretty display V2 write plan nodes by overriding
def stringArgs
.Why are the changes needed?
Better UX for UI display and
EXPLAIN
outputDoes this PR introduce any user-facing change?
Yes, change affects UI display and
EXPLAIN
output for V2 write cases.How was this patch tested?
Use AppendData as an example.
Before


After
Was this patch authored or co-authored using generative AI tooling?
No.