Skip to content

Commit

Permalink
[Bug-#1913][chunjun-connector-jdbc-base] clickhouse jdbc connection a…
Browse files Browse the repository at this point in the history
…re not Not supporting transactions.
  • Loading branch information
冯剑 Jian committed Aug 12, 2024
1 parent 284c84f commit b1c92a8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import com.dtstack.chunjun.connector.jdbc.util.key.KeyUtil;
import com.dtstack.chunjun.constants.Metrics;
import com.dtstack.chunjun.enums.ColumnType;
import com.dtstack.chunjun.enums.Semantic;
import com.dtstack.chunjun.metrics.BigIntegerAccumulator;
import com.dtstack.chunjun.metrics.StringAccumulator;
import com.dtstack.chunjun.restore.FormatState;
Expand Down Expand Up @@ -105,7 +106,9 @@ public void openInternal(InputSplit inputSplit) {
String querySQL = null;
try {
dbConn = getConnection();
dbConn.setAutoCommit(false);
if (Semantic.getByName(config.getSemantic()) == Semantic.EXACTLY_ONCE) {
dbConn.setAutoCommit(false);
}

querySQL = buildQuerySql(currentJdbcInputSplit);
jdbcConfig.setQuerySql(querySQL);
Expand Down

0 comments on commit b1c92a8

Please sign in to comment.