kgyrtkirk commented on code in PR #16603:
URL: https://github.com/apache/druid/pull/16603#discussion_r1642250325
##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteWindowQueryTest.java:
##########
@@ -278,6 +278,53 @@ public void testWindow()
.run();
}
+ @Test
+ public void testWindowAllBoundsCombination()
+ {
+ testBuilder()
+ .sql("select\n"
+ + "cityName,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between unbounded preceding and 1 preceding) c1,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between unbounded preceding and current row) c2,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between unbounded preceding and 1 following) c3,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between unbounded preceding and unbounded following) c4,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between 3 preceding and 1 preceding) c5,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between 1 preceding and current row) c6,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between 1 preceding and 1 FOLLOWING) c7,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between 1 preceding and unbounded FOLLOWING) c8,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between 1 FOLLOWING and unbounded FOLLOWING) c9,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between 1 FOLLOWING and 3 FOLLOWING) c10,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between current row and 1 following) c11,\n"
+ + "count(*) over (partition by cityName order by countryName rows
between current row and unbounded following) c12\n"
+ + "from wikipedia\n"
+ + "where cityName in ('Vienna', 'Seoul')\n"
+ + "group by countryName, cityName, added")
+ .queryContext(ImmutableMap.of(
+ PlannerContext.CTX_ENABLE_WINDOW_FNS, true,
+ QueryContexts.ENABLE_DEBUG, true,
+ QueryContexts.WINDOWING_STRICT_VALIDATION, false
Review Comment:
is it necessary to disable this?
--
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]