buraksenn commented on code in PR #20963:
URL: https://github.com/apache/datafusion/pull/20963#discussion_r2990756019


##########
datafusion/sql/src/select.rs:
##########
@@ -297,14 +297,23 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
             plan
         };
 
-        // The outer expressions we will search through for window functions.
-        // Window functions may be sourced from the SELECT list or from the 
QUALIFY expression.
-        let windows_expr_haystack = select_exprs_post_aggr
-            .iter()
-            .chain(qualify_expr_post_aggr.iter());
+        // The window expressions from SELECT and QUALIFY only, used to 
validate that
+        // QUALIFY is used with window functions (ORDER BY window functions 
don't count).
+        let qualify_window_func_exprs = find_window_exprs(

Review Comment:
   I’ve taken a note and will open a followup PR if suitable



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