Jefffrey commented on code in PR #19642:
URL: https://github.com/apache/datafusion/pull/19642#discussion_r2663351648
##########
datafusion/expr/src/udwf.rs:
##########
@@ -427,21 +440,130 @@ pub trait WindowUDFImpl: Debug + DynEq + DynHash + Send
+ Sync {
None
}
- /// If not causal, returns the effect this function will have on the window
+ /// Returns the effect this function has on limit pushdowns. See
[`LimitEffect`]
+ /// for more details.
+ ///
+ /// Defaults to [`LimitEffect::Unknown`].
fn limit_effect(&self, _args: &[Arc<dyn PhysicalExpr>]) -> LimitEffect {
LimitEffect::Unknown
}
}
-/// the effect this function will have on the limit pushdown
+/// The effect this function will have on limit pushdowns through a window
bound.
Review Comment:
So does that mean we're planning to alter/remove this `limit_effect()` API,
even though it was recently introduced?
I agree with this being too overly specific, but considering we introduced a
new API to `WindowUDFImpl` just for this optimizer rule I felt it would help
users understand why this API exists and how it affects things in DataFusion.
As the documentation currently is on main, I find it hard to understand its
purpose so I assume it may be the same for other users. And the best way I
found to understand this was via an example usage (and so far the only usage).
Do you have a suggestion on how we could generalize this documentation in a
way that still helps users understand what it is for?
--
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]