abhishekrb19 commented on code in PR #15994:
URL: https://github.com/apache/druid/pull/15994#discussion_r1520857627
##########
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:
Good point. However, we don't enforce an upper bound on some related
parameters like `limit` and `batchSize`, so I'm unsure if we want to do it for
`versions` size. Also, the maximum size for `IN` would also depend on the
underlying metadata store itself, so my suggestion would be to roll this out
without any size restriction right out of the bat, and revisit this later if
needed
--
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]