Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug in sample_random when probability_to_keep is 0 #989

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

busma13
Copy link
Contributor

@busma13 busma13 commented Jan 17, 2025

This PR makes the following changes:

  • Fixes a bug in the sample_random processor when probability_to_keep is set to 0%. If the random number generator returns 0 then a record would be returned ( 0 <= 0 is true ). Setting the random() function's minimum value to 1 ensures that no records will ever be returned ( 1 <= 0 is false).
  • Update docs
  • Add test with large dataset and probability_to_keep set to 0%
  • bump standard asset from v1.3.1 to v1.3.2

ref: #988

@busma13 busma13 marked this pull request as ready for review January 17, 2025 18:44
@busma13 busma13 requested review from godber and jsnoble January 17, 2025 18:44
@godber godber merged commit a6c5246 into master Jan 17, 2025
7 checks passed
@godber godber deleted the fix-sample_random-bug branch January 17, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants