-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Closed
Copy link
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
#12857 added the expressions method to the WindowUDFImpl trait.
The default impl currently only takes the first input_expr and discards the rest.
datafusion/datafusion/expr/src/udwf.rs
Lines 314 to 319 in 444a673
| fn expressions(&self, expr_args: ExpressionArgs) -> Vec<Arc<dyn PhysicalExpr>> { | |
| expr_args | |
| .input_exprs() | |
| .first() | |
| .map_or(vec![], |expr| vec![Arc::clone(expr)]) | |
| } |
This altered behavior caused a regression in a two column Window UDF used in datafusion-python tests. See this comment detailing the error and this commit that fixes it.
Describe the solution you'd like
The default behavior should just return all the input expressions.
Describe alternatives you've considered
I didn't find any justification for only taking the first input_expr as the default behavior, so probably I'm missing something.
@jcsherin - please let me know if there's a reason that I'm missing for this behavior.
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request