zstan commented on code in PR #4692:
URL: https://github.com/apache/ignite-3/pull/4692#discussion_r1837512804


##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/framework/TestClusterTest.java:
##########
@@ -361,4 +366,40 @@ public void testGetCountPlan() {
         List<List<Object>> rows = convertSqlRows(results.items());
         assertEquals(List.of(List.of("hello", 42L)), rows);
     }
+
+    @Test
+    public void testExecutionWithDynamicParam() {
+        cluster.start();
+
+        TestNode node = cluster.node("N1");
+        Object[] params = {1, null};
+
+        QueryPlan plan = node.prepare("SELECT ?, ?", params);
+        AsyncDataCursor<InternalSqlRow> cursor = node.executePlan(plan, 
params);
+        BatchedResult<InternalSqlRow> res = await(cursor.requestNextAsync(1));
+
+        assertThat(res.hasMore(), is(false));
+        assertThat(res.items(), hasSize(1));
+        assertThat(res.items().get(0).fieldCount(), is(2));
+        assertThat(res.items().get(0).get(0), is(1));
+        assertThat(res.items().get(0).get(1), nullValue());
+    }
+
+    @Test
+    public void testExecutionWithMissingDynamicParam() {
+        cluster.start();
+
+        TestNode node = cluster.node("N1");
+
+        QueryPlan plan = node.prepare("SELECT ?/?", 1, 0);

Review Comment:
   1. I found that prepare with dyn params is called only from your test, do we 
need such a method in such a case ? 
   2. dyn params passed into prepare and executePlan methods can be different, 
seems strange.
   3. call prepare with missed dyn parameter not raise any exception



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to