[ 
https://issues.apache.org/jira/browse/IGNITE-24078?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Pereslegin updated IGNITE-24078:
--------------------------------------
    Summary: Jdbc. Confusing exception when executing DDL query using 
executeBatch method.  (was: Jdbc. Confused exception when executing DDL query 
using executeBatch method.)

> Jdbc. Confusing exception when executing DDL query using executeBatch method.
> -----------------------------------------------------------------------------
>
>                 Key: IGNITE-24078
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24078
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Pavel Pereslegin
>            Priority: Major
>              Labels: ignite-3
>
> Reproducer:
> {code:java}
>     try (Statement stmt = conn.createStatement()) {
>         stmt.addBatch("CREATE TABLE xxxx (id INT PRIMARY KEY, name VARCHAR)");
>         stmt.executeBatch();
>     }
> {code}
> Result:
> {noformat}
> java.sql.BatchUpdateException: class java.lang.Boolean cannot be cast to 
> class java.lang.Long (java.lang.Boolean and java.lang.Long are in module 
> java.base of loader 'bootstrap')
>       at 
> org.apache.ignite.internal.jdbc.JdbcStatement.executeBatch(JdbcStatement.java:605)
>       at 
> org.apache.ignite.jdbc.ItJdbcBatchSelfTest.testBatch(ItJdbcBatchSelfTest.java:128)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:566)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
>       at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
> {noformat}
> I expect there should be a SQL query type mismatch error (expected DML, but 
> was DDL).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to