Repository: ArroyoSystems/arroyo (language: rust)

Issue:
Window Function not picking up additional partition expressions
The below query should have row_num = 1, but it just partitions by the window.
```
SELECT counter, ROW_NUMBER() OVER (
        PARTITION BY counter, window
        ORDER BY counter DESC) AS row_num
        FROM (
SELECT counter, hop(interval '1 second', interval '4 second') as window FROM impulse GROUP BY 1,2)
```



Discussion / hints:

Fix patch:
diff --git a/arroyo-sql/src/pipeline.rs b/arroyo-sql/src/pipeline.rs
index 1904e9bf8..3458faa3d 100644
--- a/arroyo-sql/src/pipeline.rs
+++ b/arroyo-sql/src/pipeline.rs
@@ -897,7 +897,7 @@ impl SqlPipelineBuilder {
                     let field_names = w
                         .partition_by
                         .iter()
-                        .filter(|expr| Self::is_window(expr))
+                        .filter(|expr| !Self::is_window(expr))
                         .enumerate()
                         .map(|(i, _t)| Column {
                             relation: None,
@@ -908,7 +908,7 @@ impl SqlPipelineBuilder {
                     let field_computations = w
                         .partition_by
                         .iter()
-                        .filter(|expr| Self::is_window(expr))
+                        .filter(|expr| !Self::is_window(expr))
                         .map(|expression| to_expression_generator(expression, &input_struct))
                         .collect::<Result<Vec<_>>>()?;
 


Test patch: