API to get all Column
references in an Expr
without cloning Columns
#10505
Labels
enhancement
New feature or request
Is your feature request related to a problem or challenge?
This API is used in several optimizer passes to recursively find all column references in an expression
pub fn Expr::to_columns(&self) -> Result<HashSet<Column>, DataFusionError>
However, it requires
clone()
ing allColumns
(which requires allocating and copying a string) even if the caller only needs to check if there is a reference. This is inefficient and leads to a slower optimizerDescribe the solution you'd like
I would like an API that does not require copying
Describe alternatives you've considered
One version might be this (returned hasset has
&Expr
not `Expr)Additional context
No response
The text was updated successfully, but these errors were encountered: