somu-imply commented on code in PR #14510:
URL: https://github.com/apache/druid/pull/14510#discussion_r1286042644


##########
sql/src/test/resources/calcite/tests/window/wikipediaSimplePartition.sqlTest:
##########
@@ -6,29 +6,31 @@ sql: |
     FLOOR(__time TO HOUR) t,
     SUM(delta) delta,
     SUM(SUM(delta)) OVER (PARTITION BY countryIsoCode) totalDelta,
-    LAG(FLOOR(__time TO HOUR),  2) OVER (PARTITION BY countryIsoCode) 
laggardTime,
-    LEAD(FLOOR(__time TO HOUR),  1) OVER (PARTITION BY countryIsoCode) 
leadTime,
-    FIRST_VALUE(SUM(delta)) OVER (PARTITION BY countryIsoCode) AS firstDelay,
-    LAST_VALUE(SUM(delta)) OVER (PARTITION BY countryIsoCode) AS lastDelay,
-    NTILE(3) OVER (PARTITION BY countryIsoCode) AS delayNTile
+    LAG(FLOOR(__time TO HOUR),  2) OVER (PARTITION BY countryIsoCode ORDER BY 
FLOOR(__time TO HOUR)) laggardTime,
+    LEAD(FLOOR(__time TO HOUR),  1) OVER (PARTITION BY countryIsoCode ORDER BY 
FLOOR(__time TO HOUR)) leadTime,
+    FIRST_VALUE(SUM(delta)) OVER (PARTITION BY countryIsoCode ORDER BY 
FLOOR(__time TO HOUR)) AS firstDelay,
+    LAST_VALUE(SUM(delta)) OVER (PARTITION BY countryIsoCode ORDER BY 
FLOOR(__time TO HOUR)) AS lastDelay,
+    NTILE(3) OVER (PARTITION BY countryIsoCode ORDER BY FLOOR(__time TO HOUR)) 
AS delayNTile

Review Comment:
   On the new Calcite, these queries needed to change, Gian/Eric introduced 
them. I'll ask 



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