private void executeUpdateBatch() throws SQLException {
        try {
            rows.forEach(row -> {
                try {
                    JDBCTypeConvertUtils.setRecordToStatement(
                            updateStatement,
                            JDBCTypeConvertUtils.getSqlTypeFromFieldType(fieldTypes),
                            row,
                            primaryKeys.stream().mapToInt(fieldNames::indexOf).toArray()
                    );
                    updateStatement.addBatch();
                } catch (Exception e) {
                    throw new RuntimeException("impala jdbc execute batch error!", e);
                }
            });
            updateStatement.executeBatch();
            connection.commit();
            rows.clear();
        } catch (Exception e) {
            LOG.debug("impala jdbc execute batch error ", e);
            JdbcConnectionUtil.rollBack(connection);
            JdbcConnectionUtil.commit(connection);
            updateStatement.clearBatch();
            executeUpdate(connection);
        }
    }
execute batch update statement

@throws SQLException throw sql exception
impala/impala-sink/src/main/java/com/dtstack/flink/sql/sink/impala/ImpalaOutputFormat.java