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

feat(frontend): support create table with connector syntax #7110

Merged
merged 5 commits into from
Jan 5, 2023

Conversation

xx01cyx
Copy link
Contributor

@xx01cyx xx01cyx commented Dec 29, 2022

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

Summarize your change

Support syntax:

CREATE TABLE t (
  v int
) WITH (
  connector = 'xxx',
  ...
) ROW FORMAT xxx;

This is equivalent to CREATE MATERIALIZED SOURCE.

Describe any limitations of the current code

  • DROP TABLE may not work as expected. This will be fixed after unsupporting CREATE MATERIALIZED SOURCE.
  • No test cases for the new syntax. This will be done after unsupporting CREATE MATERIALIZED SOURCE (so I could rename all CREATE MATERIALIZED SOURCE to CREATE TABLE).

Checklist

  • I have written necessary rustdoc comments
  • All checks passed in ./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

Please keep the types that apply to your changes, and remove those that do not apply.

  • SQL commands, functions, and operators

Release note

Please create a release note for your changes. In the release note, focus on the impact on users, and mention the environment or conditions where the impact may occur.

Refer to a related PR or issue link (optional)

#5949

@xx01cyx xx01cyx changed the title Cyx/dml frontend new syntax feat(frontend): support create table with connector syntax Dec 29, 2022
@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Merging #7110 (a9f9267) into main (0cd33b8) will decrease coverage by 0.01%.
The diff coverage is 52.81%.

@@            Coverage Diff             @@
##             main    #7110      +/-   ##
==========================================
- Coverage   73.14%   73.13%   -0.02%     
==========================================
  Files        1054     1054              
  Lines      168550   168645      +95     
==========================================
+ Hits       123294   123342      +48     
- Misses      45256    45303      +47     
Flag Coverage Δ
rust 73.13% <52.81%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
src/sqlparser/src/ast/statement.rs 72.51% <0.00%> (ø)
src/frontend/src/handler/explain.rs 57.89% <44.44%> (-1.92%) ⬇️
src/frontend/src/handler/create_table.rs 80.96% <45.61%> (-8.53%) ⬇️
src/frontend/src/handler/create_source.rs 63.87% <59.13%> (+4.57%) ⬆️
src/sqlparser/src/ast/mod.rs 89.20% <75.00%> (-0.06%) ⬇️
src/sqlparser/src/parser.rs 92.33% <75.00%> (-0.03%) ⬇️
src/frontend/planner_test/src/lib.rs 72.88% <100.00%> (+0.13%) ⬆️
src/frontend/src/handler/mod.rs 66.36% <100.00%> (+0.75%) ⬆️
...frontend/src/optimizer/plan_node/logical_source.rs 63.63% <100.00%> (ø)
... and 2 more

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

@xx01cyx xx01cyx requested a review from st1page December 29, 2022 06:16
@TennyZhuang
Copy link
Contributor

Is this a user-facing change?

@xx01cyx
Copy link
Contributor Author

xx01cyx commented Dec 29, 2022

Is this a user-facing change?

Yes. But this feature has not been completed yet, for there exist some limits (such as the user cannot perform DML on table created with a connector now).

@xx01cyx xx01cyx added the user-facing-changes Contains changes that are visible to users label Dec 29, 2022
Copy link
Contributor

@st1page st1page left a comment

Choose a reason for hiding this comment

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

generally LGTM, PTAL @tabVersion

Copy link
Contributor

@tabVersion tabVersion left a comment

Choose a reason for hiding this comment

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

LGTM. good work

Copy link
Member

@BugenZhao BugenZhao left a comment

Choose a reason for hiding this comment

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

rubber stamp

src/frontend/src/handler/create_source.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature user-facing-changes Contains changes that are visible to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants