-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-27193: Database names starting with '@' cause error during ALTER… #6371
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| CREATE DATABASE `@test`; | ||
| USE `@test`; | ||
| CREATE TABLE testtable (c1 INT); | ||
| ALTER TABLE testtable ADD COLUMNS (c2 INT); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of using the database and alter and drop table, can you run the query as mentioned in the JIRA as I see that the issue is seen when hive tries to parse dbName.tableName where the dbName has the special character Change queries to You should also create another table named testtable2 and try the following queries as well
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Neer393 The Jira was created I just have a doubt on below: ALTER TABLE Could you please let me know??
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It is deciphered as So just to make sure both with and without catalog name works, I have asked you to run both queries
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| DROP TABLE testtable; | ||
| DROP DATABASE `@test`; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| PREHOOK: query: CREATE DATABASE `@test` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same for this |
||
| PREHOOK: type: CREATEDATABASE | ||
| PREHOOK: Output: database:@test | ||
| POSTHOOK: query: CREATE DATABASE `@test` | ||
| POSTHOOK: type: CREATEDATABASE | ||
| POSTHOOK: Output: database:@test | ||
| PREHOOK: query: USE `@test` | ||
| PREHOOK: type: SWITCHDATABASE | ||
| PREHOOK: Input: database:@test | ||
| POSTHOOK: query: USE `@test` | ||
| POSTHOOK: type: SWITCHDATABASE | ||
| POSTHOOK: Input: database:@test | ||
| PREHOOK: query: CREATE TABLE testtable (c1 INT) | ||
| PREHOOK: type: CREATETABLE | ||
| PREHOOK: Output: @test@testtable | ||
| PREHOOK: Output: database:@test | ||
| POSTHOOK: query: CREATE TABLE testtable (c1 INT) | ||
| POSTHOOK: type: CREATETABLE | ||
| POSTHOOK: Output: @test@testtable | ||
| POSTHOOK: Output: database:@test | ||
| PREHOOK: query: ALTER TABLE testtable ADD COLUMNS (c2 INT) | ||
| PREHOOK: type: ALTERTABLE_ADDCOLS | ||
| PREHOOK: Input: @test@testtable | ||
| PREHOOK: Output: @test@testtable | ||
| POSTHOOK: query: ALTER TABLE testtable ADD COLUMNS (c2 INT) | ||
| POSTHOOK: type: ALTERTABLE_ADDCOLS | ||
| POSTHOOK: Input: @test@testtable | ||
| POSTHOOK: Output: @test@testtable | ||
| PREHOOK: query: DROP TABLE testtable | ||
| PREHOOK: type: DROPTABLE | ||
| PREHOOK: Input: @test@testtable | ||
| PREHOOK: Output: @test@testtable | ||
| POSTHOOK: query: DROP TABLE testtable | ||
| POSTHOOK: type: DROPTABLE | ||
| POSTHOOK: Input: @test@testtable | ||
| POSTHOOK: Output: @test@testtable | ||
| PREHOOK: query: DROP DATABASE `@test` | ||
| PREHOOK: type: DROPDATABASE | ||
| PREHOOK: Input: database:@test | ||
| PREHOOK: Output: database:@test | ||
| POSTHOOK: query: DROP DATABASE `@test` | ||
| POSTHOOK: type: DROPDATABASE | ||
| POSTHOOK: Input: database:@test | ||
| POSTHOOK: Output: database:@test | ||
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.
Please use meaningful test file names that can help understand the purpose of the qtest file in future