Gianzie commented on code in PR #4253:
URL: https://github.com/apache/streampark/pull/4253#discussion_r2134366450


##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/ApplicationBackUpCleanTask.java:
##########
@@ -40,15 +40,21 @@ public class ApplicationBackUpCleanTask {
     public void backUpClean() {
         log.info("Start to clean application backup");
         // select all application backup which count > maxBackupNum group by 
app_id
-        backUpService.lambdaQuery().groupBy(FlinkApplicationBackup::getAppId)
-            .having("count(*) > " + maxBackupNum).list().stream()
+        backUpService.lambdaQuery()
+            .select(FlinkApplicationBackup::getAppId)
+            .groupBy(FlinkApplicationBackup::getAppId)
+            .having("count(*) > " + maxBackupNum)

Review Comment:
   Yeah, you are right, this way of writing can prevent SQL injection, I have 
made the changes, thx!



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