Copilot commented on code in PR #6949:
URL: https://github.com/apache/ignite-3/pull/6949#discussion_r2517803079


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItCriteriaQueryTest.java:
##########
@@ -517,6 +526,84 @@ public <T> void 
testKeyViewWithQuotes(CriteriaQuerySource<T> view, Function<T, E
         }
     }
 
+    @Test
+    public void testQueryAllColumnTypes() {
+        String tableName = "all_column_types";
+
+        CLIENT.sql().executeScript(format(
+                "CREATE TABLE {} (str VARCHAR PRIMARY KEY, byteCol TINYINT, 
shortCol SMALLINT, intCol INT, longCol BIGINT, "
+                        + "floatCol REAL, doubleCol DOUBLE, decimalCol 
DECIMAL(6, 3), boolCol BOOLEAN, bytesCol VARBINARY, "
+                        + "uuidCol UUID, dateCol DATE, timeCol TIME, 
datetimeCol TIMESTAMP, instantCol TIMESTAMP WITH LOCAL TIME ZONE)",
+                tableName));
+
+        UUID uuid = UUID.randomUUID();
+        LocalDate localDate = LocalDate.of(2024, 1, 1);
+        LocalTime localTime = LocalTime.of(12, 15, 10);
+        LocalDateTime localDateTime = LocalDateTime.of(2024, 1, 1, 12, 0);
+        Instant instant = Instant.parse("2024-01-01T12:00:00Z");
+        byte[] bytes = {1, 2, 3};
+
+        CLIENT.sql().executeScript("INSERT INTO " + tableName + " (str, 
byteCol, shortCol, intCol, longCol, floatCol, doubleCol, "
+                + "decimalCol, boolCol, bytesCol, uuidCol, dateCol, timeCol, 
datetimeCol, instantCol) VALUES "
+                + "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
+                "test", (byte) 1, (short) 2, 3, 4L, 5.0f, 6.0d, new 
BigDecimal("7.89"), true,
+                bytes, uuid, localDate, localTime, localDateTime, instant);

Review Comment:
   The `executeScript` method is being used for a parameterized INSERT 
statement, but this method is intended for executing SQL scripts (multiple 
statements). For single parameterized DML statements, use the `execute` method 
instead: `CLIENT.sql().execute(null, \"INSERT INTO ...\")`



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