-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClickHouseConnection#prepareStatement(String, int)
should not throw an exception when Statement.RETURN_GENERATED_KEYS
is recognized
#1968
Comments
|
Good day, @linghengqian ! Here is my example of
I will look soon on the PR and the issue. |
Hi, @linghengqian! Unfortunately, ClickHouse has no ability to return anything in response to an INSERT operation. Here is related issue ClickHouse/ClickHouse#21697 |
/*
* (non-Javadoc)
*
* @see java.sql.Connection#prepareStatement(java.lang.String, int)
*/
@Override
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
throws SQLException {
if (isClosed) {
throw new SQLException("Connection is closed");
}
return new HivePreparedStatement(this, client, sessHandle, sql);
} |
@linghengqian Can framework have an option to set |
|
@linghengqian |
Describe the bug
com.clickhouse.jdbc.ClickHouseConnection#prepareStatement(String, int)
method in thecom.clickhouse:clickhouse-jdbc
ClickHouse JDBC driver should not throw an exception whenjava.sql.Statement.RETURN_GENERATED_KEYS
is recognized. See https://github.com/ClickHouse/clickhouse-java/blob/v0.7.1-patch1/clickhouse-jdbc/src/main/java/com/clickhouse/jdbc/ClickHouseConnection.java#L126 .apache/shardingsphere
try to proxycom.clickhouse.jdbc.ClickHouseConnection
and generate distributed IDs from independent logic, which leads to strange handling like Adds documentation for ClickHouse support apache/shardingsphere#33779 .Steps to reproduce
Expected behaviour
com.clickhouse.jdbc.ClickHouseConnection#prepareStatement(String, int)
does not throw an exception whenautoGeneratedKeys
isjava.sql.Statement.RETURN_GENERATED_KEYS
.Code example
Error log
apache/shardingsphere
. An early investigation is at Improve GraalVM Reachability Metadata and corresponding nativeTest related unit tests apache/shardingsphere#29052 .Configuration
Environment
0.6.3
Language version
? If the template refers to the JDK version, I useGraalVM CE For 22.0.2
.Ubuntu 22.04.4 LTS
ClickHouse server
clickhouse/clickhouse-server:24.10.2.80
CREATE TABLE
statements for tables involved: None.The text was updated successfully, but these errors were encountered: