alamb commented on code in PR #5450:
URL: https://github.com/apache/arrow-datafusion/pull/5450#discussion_r1123634700
##########
datafusion/expr/src/logical_plan/extension.rs:
##########
@@ -30,6 +30,9 @@ pub trait UserDefinedLogicalNode: fmt::Debug + Send + Sync {
/// Return a reference to self as Any, to support dynamic downcasting
fn as_any(&self) -> &dyn Any;
+ /// Return the plan's name
Review Comment:
I think similar information is present via
```
fn fmt_for_explain(&self, f: &mut fmt::Formatter) -> fmt::Result;
```
For example:
https://github.com/apache/arrow-datafusion/blob/a95e0ec2fd929aae1c2f67148243eb4825d81a3b/datafusion/proto/src/logical_plan/mod.rs#L1681-L1683
However, it is not easy to use (as you need a formatter, etc)
What would you think about making a function like the following that
returned the result of format_for_explain
```rust
fn to_string(&self) -> String {
// figure out how to call format_for_explain here
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]