Skip to content

Conversation

carlopi
Copy link
Contributor

@carlopi carlopi commented Dec 28, 2024

This is connected to raising RandomEngine to use 64bit state, see #13920, but initialization need to be done on full range otherwise entropy is limited when many repeated statement are executed.

Note that here we only solve the problem for RandomLocalState.
A wider rework of the RandomEngine API would also be also handy, since currently it takes a int64_t that can be either invalid (-1) or valid (>=0), but out of scope here given interactions with sampling PRs make it a larger change.

Test case by @taniabogatsch

Fixes duckdb/duckdb-rs#331
Fixes marcboeker/go-duckdb#339

This is connected to raising RandomEngine to use 64bit state, see duckdb#13920, but
initialization need to be done on full range otherwise entropy is limited when many repeated statement are executed.

Note that here we only solve the problem for RandomLocalState.
A wider rework of the RandomEngine API migth be also handy.

Test case provided by @taniabogatsch

Fixes duckdb/duckdb-rs#331
Fixes marcboeker/go-duckdb#339
@hannes hannes merged commit 8ae1c68 into duckdb:main Dec 30, 2024
42 of 43 checks passed
github-actions bot pushed a commit to duckdb/duckdb-r that referenced this pull request Dec 30, 2024
Fix the seed of RandomLocalState to be 64bit instead of 32bits (duckdb/duckdb#15482)
github-actions bot added a commit to duckdb/duckdb-r that referenced this pull request Dec 30, 2024
Fix the seed of RandomLocalState to be 64bit instead of 32bits (duckdb/duckdb#15482)

Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
Mytherin added a commit that referenced this pull request Jan 3, 2025
…15524)

Adapt to changes added in #15482,
fixing nightly OSX Release workflow.
@carlopi carlopi deleted the fix_random_start_entropy branch February 4, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Concurrently append data with the Appender [BUG] 'gen_random_uuid()' Constraint Error: Duplicate key
2 participants