[Bug] [chunjun-connector-jdbc-base] clickhouse jdbc connection not supported setAutoCommit(false)
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
When I tried to implement the synchronization function of clickhouse2hive, I found the following error message.
Caused by: java.sql.SQLFeatureNotSupportedException: Transactions are not supported at ru.yandex.clickhouse.ClickHouseConnectionImpl.setAutoCommit(ClickHouseConnectionImpl.java:219) at com.dtstack.flinkx.connector.jdbc.source.JdbcInputFormat.openInternal(JdbcInputFormat.java:114)
I think the problem lies in this piece of code
What you expected to happen
I hope to control clickhouse-source to skip opening transactions by configuring parameters,for example:
Because the default value is
"semantic": "at-least-once"`, it does not affect other synchronization functions
How to reproduce
When using clickhouse-source to read data, this type of problem may occur
Anything else
null
Version
master
Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
I think this can unify the management of whether transactions are enabled or not, without the need to change setAutoCommit for every chunjun-connector-module
Try it with the latest version. clickhouse has overwrite openInternal and removed setAutoCommit