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

fix(sqlsmith): ban tables with invalid columns for window functions #10913

Merged
merged 3 commits into from
Jul 13, 2023

Conversation

kwannoel
Copy link
Contributor

@kwannoel kwannoel commented Jul 12, 2023

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

What's changed and what's your intention?

Related: #10516

This PR bans relations like CREATE table t (v1 timestamp, window_start timestamp) from being used when generating hop and tumble functions.

Done by filtering out any tables with window_start / window_end when selecting candidate relations for hop and tumble.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR contains user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

@kwannoel kwannoel changed the title fix(sqlsmith) ban tables with window_start and window_end columns for window functions fix(sqlsmith) ban tables with invalid columns for window functions Jul 12, 2023
@kwannoel kwannoel changed the title fix(sqlsmith) ban tables with invalid columns for window functions fix(sqlsmith): ban tables with invalid columns for window functions Jul 12, 2023
@codecov
Copy link

codecov bot commented Jul 12, 2023

Codecov Report

Merging #10913 (193131a) into main (dc6f647) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main   #10913   +/-   ##
=======================================
  Coverage   69.96%   69.97%           
=======================================
  Files        1307     1307           
  Lines      223292   223292           
=======================================
+ Hits       156237   156241    +4     
+ Misses      67055    67051    -4     
Flag Coverage Δ
rust 69.97% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@stdrc stdrc left a comment

Choose a reason for hiding this comment

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

LGTM

@xxchan xxchan added this pull request to the merge queue Jul 12, 2023
@kwannoel
Copy link
Contributor Author

kwannoel commented Jul 12, 2023

May still need a further fix after this PR, which is to make sure gen hop and gen tumble add window_start and window_end to their columns.

EDIT: actually not so straightforward. There could be hidden columns as a result of group_by. Those may not be SELECTed, but can still cause HOP to fail. Because they are still a part of the input.
We may not be able to prune them, sometimes they are a required part of the stream key, esp for group by.

@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 12, 2023
@kwannoel kwannoel added this pull request to the merge queue Jul 13, 2023
Merged via the queue into main with commit 58854e9 Jul 13, 2023
@kwannoel kwannoel deleted the kwannoel/ban-col branch July 13, 2023 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants