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 show database and show tables #78
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe ShowDatabases
is a better match to ShowTables
compared with ShowDatabase
.
@dust1 Thanks a lot. You can check our comment reviews if you have time. No need in a hurry. 😜 |
|
Sorry for the inconvenience, I've adjust the threshold in #84 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dust1 Basically, this PR is good enough for merge expect some issues about naming. For example, it seems there are some ShowDatabse
or show_database
and maybe it is better to use ShowDatabases
and show_databases
which matches well with ShowTables
and show_tables
.
@waynexia hello, I have a strange problem, the github workflow err:
I can't find the cause of the problem, and when I run |
This is caused by #85 . I've rerun the CI (I suppose we need to keep rerun it till success before that issue got solved...😵
That makefile is for CI. In local env the command is |
@dust1 This pr is basically OK and we can merge it after the two final comments fixed! Thanks again for your contributions. |
thank you every reviewer too!😘 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks @dust1 ❤️ |
* feat: support show database and show tables * add: add unit test * fix: SHOW DATABASE to SHOW DATABASES. with others * fix: unit test * fix: edit reboot ci * edit: Description and function name modification * fix: reboot workflow * edit: define the get_default_catalog/get_default_schema error in this mod * edit: reboot workflow * edit: edit FromCreateError desc Co-authored-by: Ruihang Xia <waynestxia@gmail.com>
Which issue does this PR close?
Closes #66
Rationale for this change
What changes are included in this PR?
In order to satisfy the current three Show statements:
show create table
,show tables
andshow database
, I modified the Plan part whereshow create table
is located and combined it into aShowPlan
.Are there any user-facing changes?
For users, two new sql statements are added to find
schema
andtable
in ceresDB.Effect
SHOW TABLES
First, use
show tables
to view existing tables:show tables;
Next, use create table sql to create a new table:
Last view effect
show tables;
SHOW DATABASE
exec
show database;
How does this change test
add 2 unit test:
test_show_tables_statement_to_plan
test_show_database_statement_to_plan