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: impl parser and operator for CREATE FLOW #3806

Merged
merged 15 commits into from
Apr 28, 2024

Conversation

waynexia
Copy link
Member

@waynexia waynexia commented Apr 26, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

#3664

What's changed and what's your intention?

Implement parser for CREATE TASK and convert it to create flow task expr

Grammar definition by @discord9 :

CREATE [ OR REPLACE ] FLOW [ IF NOT EXISTS ] <name>
OUTPUT AS <Table name>
[ EXPIRE_WHEN <expr> ]
[ COMMENT = "<string>" ]
AS 
<SQL>;

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia requested review from MichaelScofield and a team as code owners April 26, 2024 08:27
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Apr 26, 2024
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia changed the title feat: impl parser and operator for CREATE TASK feat: impl parser and operator for CREATE FLOW Apr 26, 2024
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Copy link

codecov bot commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 49.80989% with 132 lines in your changes are missing coverage. Please review.

Project coverage is 85.43%. Comparing base (1bbde15) to head (ab704ce).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3806      +/-   ##
==========================================
- Coverage   85.79%   85.43%   -0.37%     
==========================================
  Files         951      951              
  Lines      162577   162837     +260     
==========================================
- Hits       139486   139113     -373     
- Misses      23091    23724     +633     

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia enabled auto-merge April 28, 2024 11:04
src/operator/src/expr_factory.rs Outdated Show resolved Hide resolved
src/operator/src/expr_factory.rs Outdated Show resolved Hide resolved
src/operator/src/expr_factory.rs Outdated Show resolved Hide resolved
src/operator/src/statement/ddl.rs Outdated Show resolved Hide resolved
src/operator/src/statement/ddl.rs Outdated Show resolved Hide resolved
src/sql/src/parsers/create_parser.rs Outdated Show resolved Hide resolved
src/sql/src/parsers/create_parser.rs Outdated Show resolved Hide resolved
src/sql/src/statements/create.rs Outdated Show resolved Hide resolved
src/sql/src/statements/statement.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

Almost LGTM

waynexia and others added 4 commits April 28, 2024 20:05
Co-authored-by: Jeremyhi <jiachun_feng@proton.me>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@waynexia waynexia added this pull request to the merge queue Apr 28, 2024
Merged via the queue into GreptimeTeam:main with commit 7ef18c0 Apr 28, 2024
20 checks passed
@waynexia waynexia deleted the parse-create-task branch April 28, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants