Jefffrey commented on code in PR #19642:
URL: https://github.com/apache/datafusion/pull/19642#discussion_r2671099455


##########
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:
   I'm still not clear on what the future plan for this API is; are we planning 
to remove or modify it to be more general? If so are there concrete plans for 
this?
   
   I could make the docstring a bit more general for example and move a lot of 
it to the `LimitPushPastWindows` optimizer rule, but I still feel the enum 
itself is very specific to the rule:
   
   
https://github.com/apache/datafusion/blob/102caeb2261c5ae006c201546cf74769d80ceff8/datafusion/expr/src/udwf.rs#L436-L446
   
   - The variants already describe themselves in terms of the effects they have 
on the limit
   
   So making it more general when the code itself is already quite specific 
seems wrong 🤔 



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