From e1631967e387da32876dadd3837d09c7db029edd Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Sat, 19 Dec 2015 11:39:24 -0600 Subject: [PATCH] adding comments to explain merge failure in segmentMetadata query --- .../query/metadata/SegmentMetadataQueryQueryToolChest.java | 2 ++ .../java/io/druid/query/metadata/SegmentMetadataQueryTest.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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(); }