wineternity commented on code in PR #4035:
URL: 
https://github.com/apache/incubator-seatunnel/pull/4035#discussion_r1094138631


##########
seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/client/ClickhouseProxy.java:
##########
@@ -141,7 +141,7 @@ public Map<String, String> 
getClickhouseTableSchema(ClickHouseRequest<?> request
      */
     public List<Shard> getClusterShardList(ClickHouseRequest<?> connection, 
String clusterName,
                                            String database, int port, String 
username, String password) {
-        String sql = "select 
shard_num,shard_weight,replica_num,host_name,host_address,port from 
system.clusters where cluster = '" + clusterName + "'";
+        String sql = "select 
shard_num,shard_weight,replica_num,host_name,host_address,port from 
system.clusters where cluster = '" + clusterName + "'" + " and replica_num=1";

Review Comment:
   As the document say we only support the distributed table with 
internal_replication equals to true,  so when we split data , we only need to 
split data to one replica of shard, and let internal replication to copy to 
other replicas. But I am hesitating whether to add a configuration like 
internal_replication to let user decide whether write data to all replica or 
just one replica of a shard  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to