diff --git a/processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java b/processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java index 9144f01e763..b6d9fd99a49 100644 --- a/processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java +++ b/processing/src/main/java/io/druid/query/metadata/SegmentMetadataQueryQueryToolChest.java @@ -149,6 +149,8 @@ public class SegmentMetadataQueryQueryToolChest extends QueryToolChest newIntervals = null; if (query.hasInterval()) { + //List returned by arg1.getIntervals() is immutable, so a new list needs to + //be created. newIntervals = new ArrayList<>(arg1.getIntervals()); newIntervals.addAll(arg2.getIntervals()); } diff --git a/processing/src/test/java/io/druid/query/metadata/SegmentMetadataQueryTest.java b/processing/src/test/java/io/druid/query/metadata/SegmentMetadataQueryTest.java index 5289e3439ae..671b3bbf4eb 100644 --- a/processing/src/test/java/io/druid/query/metadata/SegmentMetadataQueryTest.java +++ b/processing/src/test/java/io/druid/query/metadata/SegmentMetadataQueryTest.java @@ -164,7 +164,7 @@ public class SegmentMetadataQueryTest testQuery, Maps.newHashMap() ), - "failed SegmentMetadata bySegment query" + "failed SegmentMetadata merging query" ); exec.shutdownNow(); }