diff --git a/processing/src/main/java/io/druid/segment/incremental/SpatialDimensionRowFormatter.java b/processing/src/main/java/io/druid/segment/incremental/SpatialDimensionRowFormatter.java index 1d624dfb75d..b9b4ce9cc74 100644 --- a/processing/src/main/java/io/druid/segment/incremental/SpatialDimensionRowFormatter.java +++ b/processing/src/main/java/io/druid/segment/incremental/SpatialDimensionRowFormatter.java @@ -56,7 +56,9 @@ public class SpatialDimensionRowFormatter { this.spatialDimensionMap = Maps.newHashMap(); for (SpatialDimensionSchema spatialDimension : spatialDimensions) { - this.spatialDimensionMap.put(spatialDimension.getDimName(), spatialDimension); + if (this.spatialDimensionMap.put(spatialDimension.getDimName(), spatialDimension) != null) { + throw new ISE("Duplicate spatial dimension names found! Check your schema yo!"); + } } this.spatialPartialDimNames = Sets.newHashSet( Iterables.concat(