techdocsmith commented on code in PR #15746:
URL: https://github.com/apache/druid/pull/15746#discussion_r1465385332
##########
sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java:
##########
@@ -14813,6 +14814,18 @@ public void testUnSupportedNullsLast()
assertThat(e, invalidSqlIs("ASCENDING ordering with NULLS LAST is not
supported! (line [1], column [41])"));
}
+ @Test
+ public void testUnSupportedRangeBounds()
+ {
+ assumeFeatureAvailable(EngineFeature.WINDOW_FUNCTIONS);
+
+ DruidException e = assertThrows(DruidException.class, () -> testBuilder()
+ .queryContext(ImmutableMap.of(PlannerContext.CTX_ENABLE_WINDOW_FNS,
true))
+ .sql("SELECT dim1,ROW_NUMBER() OVER (ORDER BY dim1 RANGE BETWEEN 3
PRECEDING AND 2 FOLLOWING) from druid.foo")
+ .run());
+ assertThat(e, invalidSqlIs("The query contains a window frame which might
not always give correct results. To disregard this warning
[windowingStrictValidation] can be set in the query context. (line [1], column
[31])"));
Review Comment:
```suggestion
assertThat(e, invalidSqlIs("The query contains a window frame which may
return incorrect results. To disregard this warning, set
[windowingStrictValidation] in the query context. (line [1], column [31])"));
```
--
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]