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(parser): Implement parsing of SINK statement #3219

Merged
merged 68 commits into from
Jun 15, 2022
Merged

Conversation

nanderstabel
Copy link
Contributor

@nanderstabel nanderstabel commented Jun 14, 2022

What's changed and what's your intention?

Added implementation of SINK statement parsing.

Please explain IN DETAIL what the changes are in this PR and why they are needed:

Following statement is now allowed:

CREATE SINK snk FROM mv WITH (
    'sink' = 'mysql', 
    'mysql.endpoint' = '127.0.0.1:3306', 
    'mysql.table' = '<table_name>', 
    'mysql.database' = '<database_name>', 
    'mysql.user' = '<user_name>', 
    'mysql.password' = '<password>')

IF NOT EXISTS is optional.

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

@codecov
Copy link

codecov bot commented Jun 14, 2022

Codecov Report

Merging #3219 (5dfbaf2) into main (a4aab7a) will increase coverage by 0.00%.
The diff coverage is 83.33%.

@@           Coverage Diff           @@
##             main    #3219   +/-   ##
=======================================
  Coverage   73.48%   73.48%           
=======================================
  Files         746      746           
  Lines      101957   101992   +35     
=======================================
+ Hits        74923    74952   +29     
- Misses      27034    27040    +6     
Flag Coverage Δ
rust 73.48% <83.33%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/frontend/src/handler/show.rs 89.51% <0.00%> (-0.64%) ⬇️
src/sqlparser/src/keywords.rs 100.00% <ø> (ø)
src/sqlparser/src/ast/mod.rs 88.70% <33.33%> (-0.28%) ⬇️
src/sqlparser/src/ast/statement.rs 82.71% <95.65%> (+1.35%) ⬆️
src/sqlparser/src/parser.rs 92.31% <100.00%> (+0.02%) ⬆️
src/meta/src/barrier/mod.rs 69.13% <0.00%> (-0.33%) ⬇️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@nanderstabel nanderstabel marked this pull request as ready for review June 14, 2022 15:44
@nanderstabel nanderstabel enabled auto-merge (squash) June 14, 2022 15:49
@nanderstabel nanderstabel merged commit 363c2ac into main Jun 15, 2022
Copy link
Contributor

@lmatz lmatz left a comment

Choose a reason for hiding this comment

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

LGTM

@nanderstabel nanderstabel deleted the ns-sink-parser branch June 15, 2022 03:51
@hengm3467 hengm3467 added the user-facing-changes Contains changes that are visible to users label Jun 17, 2022
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.

None yet

4 participants