This is an automated email from the ASF dual-hosted git repository.

gaojun2048 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new fce9ddaa2b [Hotfix][connector-v2][clickhouse] Fixed an out-of-order 
BUG with output data fields of clickhouse-sink (#5346)
fce9ddaa2b is described below

commit fce9ddaa2b1d1349af2dfe3951a38c28b7baaadc
Author: wow_zx <[email protected]>
AuthorDate: Thu Oct 26 17:47:17 2023 +0800

    [Hotfix][connector-v2][clickhouse] Fixed an out-of-order BUG with output 
data fields of clickhouse-sink (#5346)
---
 .../sink/client/executor/JdbcBatchStatementExecutorBuilder.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/executor/JdbcBatchStatementExecutorBuilder.java
 
b/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/executor/JdbcBatchStatementExecutorBuilder.java
index 301633fb1c..5ca2e57b10 100644
--- 
a/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/executor/JdbcBatchStatementExecutorBuilder.java
+++ 
b/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/executor/JdbcBatchStatementExecutorBuilder.java
@@ -57,8 +57,8 @@ public class JdbcBatchStatementExecutorBuilder {
 
     private String[] getDefaultProjectionFields() {
         List<String> fieldNames = Arrays.asList(rowType.getFieldNames());
-        return clickhouseTableSchema.keySet().stream()
-                .filter(fieldNames::contains)
+        return fieldNames.stream()
+                .filter(clickhouseTableSchema::containsKey)
                 .toArray(String[]::new);
     }
 

Reply via email to