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: show create table only for base table #4099

Merged
merged 4 commits into from
Jun 4, 2024

Conversation

tisonkun
Copy link
Contributor

@tisonkun tisonkun commented Jun 3, 2024

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

This closes #3980.

Display:

$ curl -i -XPOST -H 'Content-Type: application/x-www-form-urlencoded' -d 'sql=SHOW CREATE TABLE numbers' http://localhost:4000/v1/sql
HTTP/1.1 400 Bad Request
Content-Length: 121
Connection: keep-alive
Content-Type: application/json
Date: Mon, 03 Jun 2024 15:04:04 GMT
Keep-Alive: timeout=4
Proxy-Connection: keep-alive
X-Greptime-Err-Code: 1001
X-Greptime-Execution-Time: 0

{"code":1001,"error":"Show create table only for base table. greptime.public.numbers is TEMPORARY","execution_time_ms":0}

and

mysql> SHOW CREATE TABLE information_schema.columns;
ERROR 1815 (HY000): Show create table only for base table. greptime.information_schema.columns is TEMPORARY

Checklist

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

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun requested a review from a team as a code owner June 3, 2024 15:05
@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Jun 3, 2024
Copy link
Contributor Author

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

I'm glad to add some tests but yet to know where to add. Perhaps a new sqlness case?

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.15%. Comparing base (dd06e10) to head (ee1c037).

Current head ee1c037 differs from pull request most recent head cc02217

Please upload reports for the commit cc02217 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4099      +/-   ##
==========================================
- Coverage   85.44%   85.15%   -0.30%     
==========================================
  Files         992      992              
  Lines      173500   173377     -123     
==========================================
- Hits       148245   147637     -608     
- Misses      25255    25740     +485     

Copy link
Contributor

@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

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Contributor Author

tisonkun commented Jun 4, 2024

Sqlness cases added.

@tisonkun tisonkun requested a review from sunng87 June 4, 2024 15:22
@sunng87 sunng87 added this pull request to the merge queue Jun 4, 2024
Merged via the queue into GreptimeTeam:main with commit 1850fe2 Jun 4, 2024
27 checks passed
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.

show create table doesn't work for numbers
3 participants