tkalkirill commented on code in PR #5113:
URL: https://github.com/apache/calcite/pull/5113#discussion_r3621530144


##########
core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java:
##########
@@ -10739,14 +10758,12 @@ void testGroupExpressionEquivalenceParams() {
   @Test void testNegativeFetchOffsetLimit() {
     sql("select name from dept limit ^-^1")
         .fails("(?s).*Encountered \"-\".*");
-    sql("select name from dept offset ^-^1")
-        .fails("(?s).*Encountered \"-\".*");
+    sql("select name from dept offset -1").ok();
     sql("select name from dept fetch next ^-^1 rows only")
         .fails("(?s).*Encountered \"-\".*");
     sql("select name from dept order by name limit ^-^1")
         .fails("(?s).*Encountered \"-\".*");
-    sql("select name from dept order by name offset ^-^1")
-        .fails("(?s).*Encountered \"-\".*");
+    sql("select name from dept order by name offset -1").ok();

Review Comment:
   Because I changed the validation for OFFSET. But I fixed that and added a 
check for negative values ​​for literals.



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