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


##########
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'm not familiar with the rules for writing such tests.
   Is there somewhere I can read about this and learn more?
   It's not clear to me why they should be separate from Java tests. 
   What's the advantage of this approach?



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