Apr 2023

1 commit
Add array_sample() and array_shuffle() functions.
7 Apr 2023Tom Lanemaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% suremodified before commitmoderate changesfrom patchset #711 of 7 reviewers saw the final version

The commit retains the implementation and SQL tests from #71, whose Author header credits Martin Kalcher, but adds keep_lb handling in array_userfuncs.c so array_sample() resets the first lower bound to 1. It also revises shuffle indexing and documentation, updates expected bounds, and bumps catversion.h; Tom Lane confirms fixing and pushing it in #74.

  • Thomas Munrosaw an earlier versionLLM analysis, 98% sureIdentified bounded-random-number bias and suggested specialized paths in #11, then examined the generic prototype's representation and performance in #16, before substantial implementation changes.
  • David G. Johnstonsaw an earlier versionLLM analysis, 100% sureFlagged probabilistically failing shuffle and sample regression assertions in #8, which the author agreed to remove in #14, before the core implementation replaced intarray.
  • Robert Haassaw an earlier versionLLM analysis, 100% sureFound inconsistent sample ordering and dimensionality and requested multidimensional and non-default-bound tests in #29, preceding the shared slice-based implementation.
  • Aleksander Alekseevsaw an earlier versionLLM analysis, 90% sureProposed preserving inner arrays while shuffling the first dimension in #39, a design adopted in #45, although he explicitly had not reviewed the code.
  • Dean Rasheedsaw an earlier versionLLM analysis, 100% sureCaught incorrect volatility and random-number generation in #46 and reviewed the shared-PRNG implementation favorably in #53, before that PRNG design was removed.
  • Fabien COELHOsaw an earlier versionLLM analysis, 99% sureReviewed prototypes, swapping, sampling semantics, and tests in #56 and #58, then recommended the global PRNG in #65, before final parallel-safety and lower-bound changes.
  • Tom Lanesaw the final versioncommittercommitted the patch

Credits across 1 commit

Author
Martin KalcherLLM1
Reviewer
Tom Lanecommitter1
Committer
Tom Lane1

N LLM means N of the credits come from LLM analysis, not from commit trailers.