mustafasrepo commented on code in PR #8842:
URL: https://github.com/apache/arrow-datafusion/pull/8842#discussion_r1451993814


##########
datafusion/sqllogictest/test_files/window.slt:
##########
@@ -3871,3 +3871,31 @@ FROM (SELECT c1, c2, ROW_NUMBER() OVER(PARTITION BY c1) 
as rn
     LIMIT 5)
 GROUP BY rn
 ORDER BY rn;
+
+# create a table for testing
+statement ok
+CREATE TABLE table_with_pk (
+          sn INT PRIMARY KEY,
+          ts TIMESTAMP,
+          currency VARCHAR(3),
+          amount FLOAT
+        ) as VALUES
+          (0, '2022-01-01 06:00:00'::timestamp, 'EUR', 30.0),
+          (1, '2022-01-01 08:00:00'::timestamp, 'EUR', 50.0),
+          (2, '2022-01-01 11:30:00'::timestamp, 'TRY', 75.0),
+          (3, '2022-01-02 12:00:00'::timestamp, 'EUR', 200.0),
+          (4, '2022-01-03 10:00:00'::timestamp, 'TRY', 100.0)
+
+query TT
+EXPLAIN SELECT *, SUM(amount) OVER(ORDER BY sn) as sum1

Review Comment:
   Thanks @alamb, added a comment to explain rationale



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

Reply via email to