alamb commented on PR #13153:
URL: https://github.com/apache/datafusion/pull/13153#issuecomment-2450191377
I tried to produce an error / write some examples in dictionary.slt and I
couldn't figure out how to trigger an issue
```
(venv) andrewlamb@Andrews-MacBook-Pro-2:~/Software/datafusion$ git diff
diff --git a/datafusion/sqllogictest/test_files/dictionary.slt
b/datafusion/sqllogictest/test_files/dictionary.slt
index 176331f57..e802ddfe6 100644
--- a/datafusion/sqllogictest/test_files/dictionary.slt
+++ b/datafusion/sqllogictest/test_files/dictionary.slt
@@ -320,6 +320,41 @@ ORDER BY
2023-12-20T01:30:00 1000 f1 32.0
2023-12-20T01:30:00 1000 f2 foo
+# Window Functions
+query TTTT
+SELECT "tag_id", "type",
+ lead("type") OVER (PARTITION BY "tag_id" ORDER BY "time") as "next_type",
+ lag("type") OVER (PARTITION BY "tag_id" ORDER BY "time") as "last_type"
+FROM m2;
+----
+1000 active active NULL
+1000 active active active
+1000 active active active
+1000 active active active
+1000 active active active
+1000 active passive active
+1000 passive passive active
+1000 passive passive passive
+1000 passive passive passive
+1000 passive NULL passive
+
+query TTTT
+SELECT "tag_id", "type",
+ lead("type") OVER (PARTITION BY "tag_id" ORDER BY "time" RANGE BETWEEN 2
PRECEDING AND CURRENT ROW) as "next_type",
+ lag("type") OVER (PARTITION BY "tag_id" ORDER BY "time") as "last_type"
+FROM m2;
+----
+1000 active active NULL
+1000 active active active
+1000 active active active
+1000 active active active
+1000 active active active
+1000 active passive active
+1000 passive passive active
+1000 passive passive passive
+1000 passive passive passive
+1000 passive NULL passive
+
```
--
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]