Skip to content

feat: handle "USE <catalog>-<schema>" in MySQL#857

Merged
waynexia merged 2 commits intoGreptimeTeam:developfrom
MichaelScofield:feat/mysql-use-catalog
Jan 12, 2023
Merged

feat: handle "USE <catalog>-<schema>" in MySQL#857
waynexia merged 2 commits intoGreptimeTeam:developfrom
MichaelScofield:feat/mysql-use-catalog

Conversation

@MichaelScofield
Copy link
Copy Markdown
Collaborator

@MichaelScofield MichaelScofield commented Jan 10, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Handles USE <catalog>-<schema> in MySQL, as requested in #798

Also do some refactors on SqlQueryHandler and GrpcQueryHandler, add associate types for implementors' errors, to get rid of the "map error to BoxedError then snafu context to server error" practice in implementors, gaining more coherence.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

#670

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 10, 2023

Codecov Report

Merging #857 (3697f56) into develop (9428e70) will increase coverage by 0.06%.
The diff coverage is 75.63%.

@@             Coverage Diff             @@
##           develop     #857      +/-   ##
===========================================
+ Coverage    86.09%   86.15%   +0.06%     
===========================================
  Files          421      425       +4     
  Lines        55549    55858     +309     
===========================================
+ Hits         47823    48123     +300     
- Misses        7726     7735       +9     
Flag Coverage Δ
rust 86.15% <75.63%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
src/datanode/src/server.rs 0.00% <0.00%> (ø)
src/frontend/src/instance/opentsdb.rs 95.94% <ø> (ø)
src/frontend/src/server.rs 0.00% <0.00%> (ø)
src/servers/src/error.rs 35.18% <0.00%> (+0.63%) ⬆️
src/frontend/src/error.rs 12.50% <12.50%> (+1.63%) ⬆️
src/datanode/src/instance/sql.rs 80.73% <22.22%> (+0.29%) ⬆️
src/servers/src/query_handler/sql.rs 61.29% <61.29%> (ø)
src/frontend/src/instance/distributed.rs 92.13% <75.00%> (-0.02%) ⬇️
src/frontend/src/instance.rs 71.18% <81.25%> (-0.72%) ⬇️
src/frontend/src/instance/standalone.rs 82.85% <82.85%> (ø)
... and 50 more

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

Comment thread src/datanode/src/instance/sql.rs Outdated
@MichaelScofield
Copy link
Copy Markdown
Collaborator Author

@sunng87 PTAL

Comment thread src/datanode/src/instance/sql.rs Outdated
Copy link
Copy Markdown
Member

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

LGTM. Can you run the integration test in this branch before merging it? cargo run --bin sqlness-runner. Make sure it doesn't break any tests.

Comment thread src/frontend/src/error.rs Outdated
@waynexia waynexia merged commit 2664436 into GreptimeTeam:develop Jan 12, 2023
@MichaelScofield MichaelScofield deleted the feat/mysql-use-catalog branch January 12, 2023 03:24
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* feat: handle "USE <catalog>-<schema>" in MySQL

* fix: resolve PR comments
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.

4 participants