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

Add tests that random() and uuid() produce unique values for each row #10248

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Apr 26, 2024

Which issue does this PR close?

Closes #10247

Rationale for this change

We have a gap in test coverage

All the tests passed, but we almost broke this behavior, but caught it in review #10193 (comment)

What changes are included in this PR?

  1. Add tests for random and uuid

Note I also verified that these tests fail at 864d197 (part of #10193 which almost introduced a bug)

Are these changes tested?

Only tests

Are there any user-facing changes?

Copy link
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anyone gets a build that fails because RNG generated two same values they should win a prize

@alamb
Copy link
Contributor Author

alamb commented Apr 26, 2024

If anyone gets a build that fails because RNG generated two same values they should win a prize

And good luck reproducing it 😆 (but seriously I think the chance of infrastructure failures are far more likely)

@jayzhan211
Copy link
Contributor

👍

@jayzhan211 jayzhan211 merged commit 6f0c693 into apache:main Apr 26, 2024
23 checks passed
@alamb alamb deleted the alamb/unique_tests branch April 26, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uuid and random need return different value in different row
3 participants