tkalkirill commented on code in PR #13464:
URL: https://github.com/apache/ignite/pull/13464#discussion_r3765751129
##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/LimitOffsetIntegrationTest.java:
##########
@@ -199,6 +197,128 @@ public void testOffsetOutOfRange() throws Exception {
assertQuery("SELECT (SELECT id FROM TEST_PART ORDER BY id LIMIT 1
OFFSET 10)").returns(NULL_RESULT).check();
}
+ /** */
+ @Test
+ public void testInvalidFetchExpression() {
+ assertThrowsSqlException("SELECT * FROM TEST_REPL FETCH FIRST (" +
bigValue() + ") ROWS ONLY", null);
+ assertThrowsSqlException("SELECT * FROM TEST_REPL FETCH FIRST (" +
bigValue() + " + 1) ROWS ONLY", null);
+ assertThrowsSqlException("SELECT * FROM TEST_REPL FETCH FIRST (1 + " +
bigValue() + ") ROWS ONLY", null);
+
+ assertThrowsSqlException("SELECT * FROM TEST_REPL FETCH FIRST (-2)
ROWS ONLY", null);
+ assertThrowsSqlException("SELECT * FROM TEST_REPL FETCH FIRST (2 - 3)
ROWS ONLY", null);
+ assertThrowsSqlException("SELECT * FROM TEST_REPL FETCH FIRST (1 + 2 -
4) ROWS ONLY", null);
Review Comment:
I'd prefer to leave it here, just one line.
--
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]