Copilot commented on code in PR #9446:
URL: https://github.com/apache/seatunnel/pull/9446#discussion_r2151172184


##########
seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/util/ClickhouseProxy.java:
##########
@@ -429,6 +438,100 @@ public void dropDatabase(String database, boolean 
ignoreIfNotExists) {
         executeSql(ClickhouseCatalogUtil.INSTANCE.getDropDatabaseSql(database, 
ignoreIfNotExists));
     }
 
+    public List<ClickhousePart> getPartList(
+            String database, String table, Shard shard, List<String> 
partitionList) {
+
+        String sql =
+                String.format(
+                        "select name from system.parts where database = '%s' 
and table = '%s'",
+                        database, table);
+
+        if (partitionList != null && !partitionList.isEmpty()) {

Review Comment:
   The SQL query in getPartList is built by directly concatenating the 
partition list values. Consider using a parameterized query or properly 
escaping input values to mitigate the risk of SQL injection.



-- 
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