You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2020/07/16 14:14:47 UTC
[tinkerpop] 02/02: Merge branch '3.4-dev'
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit bbd9b873f87a18b1b62a4651d855720c344e926d
Merge: 918bfe1 4a4debe
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Thu Jul 16 10:14:23 2020 -0400
Merge branch '3.4-dev'
CHANGELOG.asciidoc | 1 +
.../gremlin/process/traversal/step/filter/SampleGlobalStep.java | 9 ++++-----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --cc gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java
index e0f772a,5290f97..5232d60
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java
@@@ -104,8 -92,7 +104,7 @@@ public final class SampleGlobalStep<S>
if (sampleBulk < s.bulk()) {
final double currentWeight = ((ProjectedTraverser<S, Number>) s).getProjections().get(0).doubleValue();
for (int i = 0; i < (s.bulk() - sampleBulk); i++) {
- runningWeight = runningWeight + currentWeight;
- if (random.nextDouble() <= ((runningWeight / totalWeight))) {
- if (RANDOM.nextDouble() <= ((currentWeight / runningTotalWeight))) {
++ if (random.nextDouble() <= ((currentWeight / runningTotalWeight))) {
final Traverser.Admin<S> split = s.split();
split.setBulk(1L);
sampledSet.add(split);