-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add name
method to ExecutionPlan
trait
#9558
Comments
We can probably impl this method using td::any::type_name and make it a provided method: Something like
} |
I was hoping to avoid having to do any compute since I believe the name is always known at compile time. Of course my proposal would make this a breaking change and maybe thats not wanted for this type of change. If so, then certainly we could do something as a provided method. |
@alamb im curious if you have thoughts on this. |
I think adding a Requiring a Note I think you could probably just add a single function and make the change to the trait backwards compatible, for example pub trait ExecutionPlan: Debug + DisplayAs + Send + Sync {
/// return the name of this execution plan's type
fn name(&self) -> &'static str { "UNKNOWN" }
...
} The Another option for an API that avoids string copying could be fn name(&self) -> Arc<str> ; To still allow dynamicc names |
I think thats a great idea.
Do you have or know of existing use cases for dynamic names? I had in mind that these names would always be known at compile time. |
I do not know of any use cases for dynamic names |
Is your feature request related to a problem or challenge?
In the telemetry we produce on query executions we sometimes need to know the name of
ExecutionPlan
nodes (i.e.ParquetExec
). Right now we do something like the following to extract the name:From what I have seen the name of
ExecutionPlan
is always known at compile time so I think this is unnecessary work and I am hoping to provide a simpler way to get access to this information.Describe the solution you'd like
Could we add something like the following to
ExecutionPlan
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: