-
Notifications
You must be signed in to change notification settings - Fork 594
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
feat(frontend): show create table #7152
Conversation
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
@@ -76,7 +76,7 @@ pub fn gen_create_mv_plan( | |||
|
|||
let (database_id, schema_id) = session.get_database_and_schema_id_for_create(schema_name)?; | |||
|
|||
let definition = query.to_string(); |
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.
With this previous method, WITH
options cannot be preserved. That'll be problematic for sinks.
Codecov Report
@@ Coverage Diff @@
## main #7152 +/- ##
==========================================
+ Coverage 73.12% 73.15% +0.03%
==========================================
Files 1053 1053
Lines 167974 167994 +20
==========================================
+ Hits 122826 122902 +76
+ Misses 45148 45092 -56
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 |
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.
Good job, rest LGTM.
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. A quick question, if we add a column to a table, how to modify the definition of the table? original definition
+ add column statement
or regenerate a new definition.
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
I guess to show this one, according to the behavior of MySQL. 🤔 It always frankly shows how to create an empty table with the same schema in one-liner. BTW, for |
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.
What's changed and what's your intention?
CREATE
statements, used forSHOW CREATE
later.CREATE
definition for materialized views and tables.SHOW CREATE TABLE
.We'll use this SQL to retrieve the original definition of the table, for the first version of
ALTER TABLE ADD COLUMN
. 🤣Checklist
./risedev check
(or alias,./risedev c
)Documentation
If your pull request contains user-facing changes, please specify the types of the changes, and create a release note. Otherwise, please feel free to remove this section.
Types of user-facing changes
Release note
Support
SHOW CREATE TABLE
.Refer to a related PR or issue link (optional)