-
Notifications
You must be signed in to change notification settings - Fork 706
feat(frontend): deprecate CREATE MATERIALIZED SOURCE syntax #7281
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
Conversation
|
Does this PR maintain backward compatibility? In other words, if a user has already created a materialized source with CREATE MATERIALIZED SOURCE and upgrades the codes to include this PR, will the existing materialized source still be usable? |
Not tested yet, but I'll try to make it backward-compatible. |
…materialized-source
I prefer to not maintain the compatibility at all. IIUC, currently our catalog and other meta format does not provide any compatibility guarantee. 🤔 |
Per offline discussion with @st1page , backward capability is non-trivial and our system currently has no guarantee on it. We could find out a workaround if there are user requirements for this. So this PR might not include backward capability. |
Also discussed offline with @st1page. Maintaining compatibility is hard and may not worth it. If there is a need to upgrade version for the already deployed cases, we can write a simple tool to migrate old metadata to the new one on demand. @fuyufjh What do you think? |
Codecov Report
@@ Coverage Diff @@
## main #7281 +/- ##
==========================================
+ Coverage 71.63% 71.66% +0.02%
==========================================
Files 1083 1083
Lines 173692 173575 -117
==========================================
- Hits 124428 124384 -44
+ Misses 49264 49191 -73
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
This PR is ready for review. PTAL @st1page @BugenZhao @tabVersion |
fuyufjh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| # TODO: `show sources` should display connectors created by `create source` only. | ||
| # We should introduce `show connectors` to display all connectors created via both | ||
| # `create source` and `create table`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 In which case a user may want to show connectors? (IIUC connectors cannot be used to do anything)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe users should be able to view all created connectors. 🤔 cc. @st1page @yezizp2012
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think user may only care about which connector is used by some table and SHOW CREATE TABLE is already enough for it. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree. no need for show connectors
yezizp2012
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| TableType::Index => "Use `DROP INDEX` to drop an index.", | ||
| TableType::Table => { | ||
| // TODO(Yuanxin): Remove this after unsupporting `CREATE MATERIALIZED SOURCE`. | ||
| // Note(bugen): may make this a method on `TableType` instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about implementing this directly on TableType?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether it's a good idea to separate Table and TableWithConnector as two types. cc @st1page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both LGTM. Never mind. 😄
tabVersion
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
basically LGTM
| # TODO: `show sources` should display connectors created by `create source` only. | ||
| # We should introduce `show connectors` to display all connectors created via both | ||
| # `create source` and `create table`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree. no need for show connectors
|
better add an error to tell the users that we no longer support |
|
@Mergifyio refresh |
✅ Pull request refreshed |
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
From this PR on, we no longer support
CREATE MATERIALIZED SOURCEsyntax. Users will useCREATE TABLEinstead ofCREATE MATERIALIZED SOURCEto create a table with a connector associated with it. The remaining part of the SQL command is the same as before.Also, users will be able to perform
INSERT,DELETE, andUPDATEoperations on a table with a connector associated with it.Checklist
./risedev check(or alias,./risedev c)Documentation
Types of user-facing changes
Release note
Create a table with a connector associated with it:
Insert into a table with a connector associated with it:
Update a table with a connector associated with it:
Delete from a table with a connector associated with it:
Misuse old syntax:
CREATE MATERIALIZED SOURCE s ( v int ) WITH ( connector = ‘datagen’ ) ROW FORMAT json; ERROR: QueryError: sql parser error: CREATE MATERIALIZED SOURCE has been deprecated, use CREATE TABLE insteadRefer to a related PR or issue link
Close #5949