You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SQL SELECT my_col FROM codec_test WHERE my_col >= ALL (ARRAY [100,1000]) throws [42000] Syntax error in SQL statement error
I created a small test that reproduces the problem on the main branch:
publicclassCodecIntegrationTestsextendsIntegrationTestSupport {
@TestvoidtestAllArray() {
createTable(connection, "INT");
Integervalue = 10000;
Flux.from(connection.createStatement("INSERT INTO codec_test values($1)")
.bind("$1", value)
.execute())
.flatMap(H2Result::getRowsUpdated)
.as(StepVerifier::create)
.expectNext(1L)
.verifyComplete();
// connection.createStatement("SELECT my_col FROM codec_test WHERE my_col >= 100 AND my_col >= 1000")connection.createStatement("SELECT my_col FROM codec_test WHERE my_col >= ALL (ARRAY [100,1000])")
.execute()
.flatMap(it -> it.map((row, rowMetadata) -> Optional.ofNullable(row.get(0))))
.as(StepVerifier::create)
.expectNext(Optional.of(10000))
.verifyComplete();
}
}
The variant SELECT my_col FROM codec_test WHERE my_col >= 100 AND my_col >= 1000 works well, the variant SELECT my_col FROM codec_test WHERE my_col >= ALL (ARRAY [100,1000]) throws the mentioned exception.
P.s. actually, I found that it fails when the method org.h2.engine.Session.prepareCommand() is called. The source of the issue is in the version of the H2, the mentioned error occurs in 2.1.214, but fixed in the version 2.2.220.
So looks like the question - do you have any plans on updating h2 version?
The text was updated successfully, but these errors were encountered:
The driver is currently unmaintained as the previous maintainer was let go from his previous company. I'd be more than happy to welcome new maintainers that are interested in moving this effort forward. Ideally, this driver-add-on to H2 would be included in the H2 core project.
Sorry, there are no plans for such support on H2 side, especially after release of Java 21 with virtual threads. H2 fully supports them since version 2.2.222 and many other JDBC drivers support them too. Virtual threads are faster than asynchronous APIs, they are simpler, and relationships between various parts of code and database transactions are pretty clear.
Bug Report
Versions
Current Behavior
SQL
SELECT my_col FROM codec_test WHERE my_col >= ALL (ARRAY [100,1000])
throws[42000] Syntax error in SQL statement
errorI created a small test that reproduces the problem on the main branch:
The variant
SELECT my_col FROM codec_test WHERE my_col >= 100 AND my_col >= 1000
works well, the variantSELECT my_col FROM codec_test WHERE my_col >= ALL (ARRAY [100,1000])
throws the mentioned exception.P.s. actually, I found that it fails when the method
org.h2.engine.Session.prepareCommand()
is called. The source of the issue is in the version of the H2, the mentioned error occurs in 2.1.214, but fixed in the version 2.2.220.So looks like the question - do you have any plans on updating h2 version?
The text was updated successfully, but these errors were encountered: