nebula icon indicating copy to clipboard operation
nebula copied to clipboard

Fix probability inaccuracy in reservoir sampling

Open chzhoo opened this issue 4 months ago • 1 comments

What type of PR is this?

  • [x] bug
  • [ ] feature
  • [ ] enhancement

What problem(s) does this PR solve?

Issue(s) number: 6091

Description:

The <go_statement> SAMPLE <sample_list> statement relay on the reservoir sampling algorithm, but the current implementation exhibits probability inaccuracies.

How do you solve it?

Special notes for your reviewer, ex. impact of this fix, design document, etc:

Checklist:

Tests:

  • [x] Unit test(positive and negative cases)
  • [ ] Function test
  • [ ] Performance test
  • [ ] N/A

Affects:

  • [ ] Documentation affected (Please add the label if documentation needs to be modified.)
  • [ ] Incompatibility (If it breaks the compatibility, please describe it and add the label.)
  • [ ] If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • [ ] Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe: Fix probability inaccuracy in reservoir sampling

chzhoo avatar Aug 14 '25 08:08 chzhoo

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 14 '25 08:08 CLAassistant