zachjsh commented on code in PR #15994:
URL: https://github.com/apache/druid/pull/15994#discussion_r1520798465


##########
server/src/main/java/org/apache/druid/metadata/SqlSegmentsMetadataQuery.java:
##########
@@ -619,6 +639,13 @@ private Query<Map<String, Object>> buildSegmentsTableQuery(
       appendConditionForIntervalsAndMatchMode(sb, intervals, matchMode, 
connector);
     }
 
+    if (!CollectionUtils.isNullOrEmpty(versions)) {
+      final String versionsStr = versions.stream()
+                                          .map(version -> "'" + version + "'")
+                                          .collect(Collectors.joining(","));
+      sb.append(StringUtils.format(" AND version IN (%s)", versionsStr));

Review Comment:
   should we enforce some limit on the number of versions here? I think in 
practice most users wouldnt be specifying too many versions at once.



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