-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(sql): add DROP ALL TABLES #3438
Conversation
…rt socket writer (#3529)
[PR Coverage check]😍 pass : 84 / 85 (98.82%) file detail
|
// expected syntax: DROP TABLE [ IF EXISTS ] name [;] | ||
CharSequence tok = SqlUtil.fetchNext(lexer); | ||
if (tok == null || !SqlKeywords.isTableKeyword(tok)) { | ||
return unknownDropStatement(executionContext, tok); |
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.
This change broke enterprise version as both the unknownDropStatement
and unknownDropTableSuffix
methods were used there. @marregui could you check DropTableTest
there and fix it?
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.
I have created https://github.com/questdb/questdb-enterprise/pull/70 with a propossed fix
New supported syntax:
Each table (with the exception of tables with prefix
sys.
ortelemetry
) is treated with the same semantics as:so that non existing table names do not break the statement execution.
In case of failure (table is busy), an exception is thrown to communicate back to the client, however the method is greedy in that it will try to delete all the tables in the list, and report at the end in case of any failure.