tkalkirill commented on code in PR #13464:
URL: https://github.com/apache/ignite/pull/13464#discussion_r3766649851


##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/DynamicParametersIntegrationTest.java:
##########
@@ -216,6 +216,139 @@ public void testFractionalLimitOffset() {
         assertThrowsSqlException("SELECT id FROM person ORDER BY id OFFSET ? 
ROWS", null, BigDecimal.valueOf(-1.5));
     }
 
+    /** */
+    @Test
+    public void testInvalidFetchExpression() {
+        createAndPopulateTable();
+
+        assertThrowsSqlException("SELECT * FROM PERSON FETCH FIRST (?) ROWS 
ONLY", null, -2);
+        assertThrowsSqlException("SELECT * FROM PERSON FETCH FIRST (?) ROWS 
ONLY", null, -1.5);
+        assertThrowsSqlException("SELECT * FROM PERSON FETCH FIRST (?) ROWS 
ONLY", null, NULL_RESULT);
+        assertThrowsSqlException("SELECT * FROM PERSON FETCH FIRST (?) ROWS 
ONLY", null, bigValue());
+        assertThrowsSqlException("SELECT * FROM PERSON FETCH FIRST (?) ROWS 
ONLY", null, "abc");
+
+        assertThrowsSqlException("SELECT * FROM PERSON FETCH FIRST (1 + ? - 4) 
ROWS ONLY", null, 1);
+        assertThrowsSqlException("SELECT * FROM PERSON FETCH FIRST (? - (50 - 
20)) ROWS ONLY", null, 2);
+
+        assertThrowsSqlException("SELECT * FROM PERSON FETCH FIRST SQRT(?) 
ROWS ONLY", null, 4);
+    }
+
+    /** */
+    @Test
+    public void testFetchExpression() {

Review Comment:
   I would leave it as is, unless you insist.



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