abhishekrb19 commented on code in PR #16141:
URL: https://github.com/apache/druid/pull/16141#discussion_r1529175174


##########
server/src/main/java/org/apache/druid/metadata/SqlSegmentsMetadataQuery.java:
##########
@@ -834,6 +869,20 @@ private static int computeNumChangedSegments(List<String> 
segmentIds, int[] segm
     return numChangedSegments;
   }
 
+  private static String getConditionForVersions(
+      final List<String> versions
+  )
+  {
+    if (CollectionUtils.isNullOrEmpty(versions)) {
+      return "";
+    }
+
+    final String versionsCsv = versions.stream()
+                                       .map(version -> "'" + version + "'")
+                                       .collect(Collectors.joining(","));
+    return StringUtils.format(" AND version IN (%s)", versionsCsv);

Review Comment:
   Good call. I have made versions parameterized. Also, I noticed an existing 
pattern with segment IDs too, which should be changed to the parameterized form 
as well. I will follow up on that in a separate patch.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to