diff --git a/server/src/main/java/org/apache/druid/client/CachingClusteredClient.java b/server/src/main/java/org/apache/druid/client/CachingClusteredClient.java index 590a29e4a8d4..519296e388aa 100644 --- a/server/src/main/java/org/apache/druid/client/CachingClusteredClient.java +++ b/server/src/main/java/org/apache/druid/client/CachingClusteredClient.java @@ -519,7 +519,7 @@ private Pair pruneSegmentsForShardSampling(final Set s.getSegmentDescriptor().getPartitionNumber()).max().getAsInt(); int targetShards = Math.round( - allShards * ((SampledTableDataSource) query.getDataSource()).getSamplingPercentage()); + allShards * ((SampledTableDataSource) query.getDataSource()).getSamplingPercentage()) / 100; Iterator iterator = segments.iterator(); int removedSegments = 0; while (iterator.hasNext()) {