Skip to content

Commit

Permalink
fix table sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
takaaki7 authored and takaaki7 committed Oct 12, 2023
1 parent 1fb88a3 commit c2bbaa6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ private Pair<Integer, Integer> pruneSegmentsForShardSampling(final Set<SegmentSe
int allShards = segments.stream()
.mapToInt(s -> s.getSegmentDescriptor().getPartitionNumber()).max().getAsInt();
int targetShards = Math.round(
allShards * ((SampledTableDataSource) query.getDataSource()).getSamplingPercentage());
allShards * ((SampledTableDataSource) query.getDataSource()).getSamplingPercentage()) / 100;
Iterator<SegmentServerSelector> iterator = segments.iterator();
int removedSegments = 0;
while (iterator.hasNext()) {
Expand Down

0 comments on commit c2bbaa6

Please sign in to comment.