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: support explain syntax #546

Merged
merged 7 commits into from
Nov 22, 2022
Merged

Conversation

francis-du
Copy link
Contributor

@francis-du francis-du commented Nov 16, 2022

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Support explain syntax like this:

explain select * from foo

Checklist

  • Add explain to sql parser
  • Add explain test to sql parser
  • Handle explain in DataNode
  • Handle explain in Frontend

Refer to a related PR or issue link (optional)

Closes #531

@francis-du francis-du changed the title [SQL] - Support explain syntax feat: support explain syntax Nov 16, 2022
@francis-du francis-du marked this pull request as ready for review November 21, 2022 15:14
@francis-du
Copy link
Contributor Author

@v0y4g3r Hi Lei, Could you review this PR, If you have time.

@waynexia waynexia requested review from v0y4g3r and waynexia November 21, 2022 16:16
@v0y4g3r
Copy link
Contributor

v0y4g3r commented Nov 21, 2022

@v0y4g3r Hi Lei, Could you review this PR, If you have time.

Glad to help. We will finish the review asap.

@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Merging #546 (af5dd98) into develop (0791c65) will decrease coverage by 0.10%.
The diff coverage is 60.00%.

@@             Coverage Diff             @@
##           develop     #546      +/-   ##
===========================================
- Coverage    86.41%   86.30%   -0.11%     
===========================================
  Files          400      402       +2     
  Lines        50650    50886     +236     
===========================================
+ Hits         43770    43918     +148     
- Misses        6880     6968      +88     
Flag Coverage Δ
rust 86.30% <60.00%> (-0.11%) ⬇️

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

Impacted Files Coverage Δ
src/datanode/src/instance.rs 34.05% <0.00%> (-1.02%) ⬇️
src/datanode/src/instance/sql.rs 81.39% <0.00%> (-3.98%) ⬇️
src/datanode/src/sql/create.rs 89.52% <0.00%> (ø)
src/frontend/src/instance.rs 71.89% <0.00%> (-1.42%) ⬇️
src/frontend/src/instance/distributed.rs 77.50% <0.00%> (-6.80%) ⬇️
src/query/src/datafusion/planner.rs 67.27% <0.00%> (-14.95%) ⬇️
src/query/src/sql.rs 95.31% <0.00%> (-1.21%) ⬇️
src/sql/src/statements.rs 80.62% <ø> (ø)
src/sql/src/statements/statement.rs 50.00% <0.00%> (+1.72%) ⬆️
src/sql/src/statements/explain.rs 57.14% <57.14%> (ø)
... and 26 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

src/datanode/src/sql.rs Outdated Show resolved Hide resolved
src/frontend/src/instance.rs Show resolved Hide resolved
src/sql/src/parser.rs Show resolved Hide resolved
@v0y4g3r
Copy link
Contributor

v0y4g3r commented Nov 22, 2022

@francis-du Could you please fix the failing clippy check? You can test before push by running following command in your own machine:

cargo clippy --workspace --all-targets -- -D warnings -D clippy::print_stdout -D clippy::print_stderr

@francis-du
Copy link
Contributor Author

@francis-du Could you please fix the failing clippy check? You can test before push by running following command in your own machine:

cargo clippy --workspace --all-targets -- -D warnings -D clippy::print_stdout -D clippy::print_stderr

cargo clippy validation passed locally

image

@francis-du
Copy link
Contributor Author

I think the Clippy error comes from GitHub Action

image

Copy link
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

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

LGTM

@v0y4g3r v0y4g3r merged commit 4a9cf49 into GreptimeTeam:develop Nov 22, 2022
@francis-du francis-du deleted the explain branch November 22, 2022 13:25
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explain query not work in MySQL client
3 participants