gabotechs commented on code in PR #25181:
URL: https://github.com/apache/datafusion/pull/25181#discussion_r4045597319


##########
datafusion/substrait/tests/cases/roundtrip_logical_plan.rs:
##########
@@ -1684,6 +1684,63 @@ async fn simple_window_function() -> Result<()> {
     roundtrip("SELECT RANK() OVER (PARTITION BY a ORDER BY b), d, sum(b) OVER 
(PARTITION BY a) FROM data;").await
 }
 
+#[tokio::test]
+async fn stacked_windows_with_same_default_name_via_builder() -> Result<()> {

Review Comment:
   Could we also assert the output values and add a filter between the two 
windows so rn1 and rn2 differ? Both currently produce identical values, so 
accidentally referencing the inherited window column would go undetected. I 
checked a case using row_number() OVER (ORDER BY a) with WHERE a > 1 between 
windows: the remaining row has rn1 = 2, rn2 = 1, and it passes with this fix.



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