jcsherin commented on issue #13168:
URL: https://github.com/apache/datafusion/issues/13168#issuecomment-2445301185

   In `lead`/`lag` user-defined window functions which accepts 1-3 arguments, 
the `shift_offset` (2nd argument) and `default_value` (3rd argument) are saved 
as fields of `WindowShiftEvaluator` struct which implements 
`PartitionEvaluator`. 
   
   
https://github.com/apache/datafusion/blob/223bb02fce886b47dc1ac81e2eda2bd3c6d60c3e/datafusion/functions-window/src/lead_lag.rs#L338-L344
 
   
   The arguments are parsed once and cached when the partition evaluator 
executes. So this allows correct operation even though `expressions()` returns 
only the first input expression to the partition evaluator.
   
   Now based on your example downstream I see that this API is overly 
restrictive. I agree that the default behavior needs to be where 
`expressions()` returns all the input expressions. 
   
   Apologies for the time you spent investigating this issue 🙏 
   
   
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to