timsaucer commented on PR #6746:
URL: https://github.com/apache/datafusion/pull/6746#issuecomment-2090457500
As a new user, I like this change very much. I found creating lead and lag
functions to be difficult to use. Suppose I wanted to call lead but provide the
other two optional arguments - shift offset and default value. Would the best
way to do that with this proposal to create the `WindowFunction` directly?
```
let single_lead = lead(col("mycol"));
let two_lead_with_default =
expr::WindowFunction::new(BuiltInWindowFunction::Lead, vec![col("mycol"),
lit(2), lit(mydefault)]);
```
--
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]