Skip to content

feat(sqlsmith): support generation of select * except #22146

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cardigan1008
Copy link
Contributor

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

This PR adds support for SELECT * EXCEPT (...) in SQLSmith.

Previously, we avoided generating SELECT * queries due to the risk of implicitly including system-generated columns (e.g., window_start from tumble/hop functions), which could lead to binding errors.

Now, with a stricter generation policy that restricts tumble/hop to only operate on base tables, such implicit columns are no longer propagated. As a result, SELECT * and SELECT * EXCEPT (...) can be safely generated. The implementation randomly excludes a subset of columns from the current schema to construct a valid EXCEPT list.

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • I have checked the Release Timeline and Currently Supported Versions to determine which release branches I need to cherry-pick this PR into.

Documentation

  • My PR needs documentation updates.
Release note

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.

1 participant