risingwave
risingwave copied to clipboard
feat(frontend): Add Create subscription in frontend
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
In this pr, We support
CREATE SUBSCRIPTION s1 FROM aaa WITH (retention = '1D') ;
DROP SUBSCRIPTION xxx;
ALTER SUBSCRIPTION x1 RENAME TO x2 ;
ALTER SUBSCRIPTION x1 OWNER TO user1;
ALTER SUBSCRIPTION x1 SET SCHEMA test_schema;
ALTER SUBSCRIPTION x1 SET PARALLELISM = 2;
in frontend
Checklist
- [ ] I have written necessary rustdoc comments
- [ ] I have added necessary unit tests and integration tests
- [ ] I have added test labels as necessary. See details.
- [ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #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 needs documentation updates. (Please use the Release note section below to summarize the impact on users)
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.
⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.
Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.
🔎 Detected hardcoded secret in your pull request
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 9425213 | Triggered | Generic Password | eacebbe3596faa897f8a84f36b989702217f33a7 | ci/scripts/regress-test.sh | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Our GitHub checks need improvements? Share your feedbacks!
I am a bit concerned with a 2.3K LoC PR with zero test :(
Is it possible to split it into smaller PRs and add some tests (at least e2e tests).
I have added e2e test, including alter, and simple create, drop statements, (ci for correctness testing will be added with the cursor implementation)
I am a bit concerned with a 2.3K LoC PR with zero test :(
Is it possible to split it into smaller PRs and add some tests (at least e2e tests).
+1 for splitting the PR.
The current PR can be split into at least 2 PRs. One for meta part only, which involves adding new metadata model and new meta node rpc, and one for frontend part that handles the SQL and call the meta node rpc. The PRs can be further split if a single PR has more than 1K LOC.
I am a bit concerned with a 2.3K LoC PR with zero test :( Is it possible to split it into smaller PRs and add some tests (at least e2e tests).
+1 for splitting the PR.
The current PR can be split into at least 2 PRs. One for meta part only, which involves adding new metadata model and new meta node rpc, and one for frontend part that handles the SQL and call the meta node rpc. The PRs can be further split if a single PR has more than 1K LOC.
okk, I split it meta part is in https://github.com/risingwavelabs/risingwave/pull/15371
After spilit out the meta code. the pr is left with only the frontend code which is slightly more than 1k in addition to the tests, the pr can continue to be reviewed
Left a comment in the previous PR. Might be fixed by the way in this PR. https://github.com/risingwavelabs/risingwave/pull/15371#discussion_r1512182710
Could you please test drop cascade for a table if it is used by a subscription?
create table t (..); create subscription sub from t; drop table t cascade;
test it, drop table t cascade; will drop sub;
Could you please test drop cascade for a table if it is used by a subscription?
create table t (..); create subscription sub from t; drop table t cascade;test it,
drop table t cascade;will dropsub;
I see, no wonder I couldn't find the relevant code in this PR, because it is supported in a previous PR.