-
Notifications
You must be signed in to change notification settings - Fork 4
Write to Merge storage #683
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: antalya
Are you sure you want to change the base?
Conversation
This is an automated comment for commit 485c050 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page
Successful checks
|
c4e70ac
to
7033c57
Compare
|
||
auto database = DatabaseCatalog::instance().getDatabase(table_to_write->database); | ||
auto table = database->getTable(table_to_write->table, context_); | ||
return table->write(query, metadata_snapshot, context_, async_insert); |
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.
What happens if there is no table with given name?
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.
Error "Table ... does not exists". The same as in attempt to write directly in that non-existed table.
CREATE TABLE test03373_db.test03373_merge_wr_1 (key UInt32, value UInt32) ENGINE=Merge(test03373_db, 'test03373_table_\d+', test03373_table_2);
INSERT INTO test03373_db.test03373_merge_wr_1 VALUES (1,1)
Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Table test03373_db.test03373_table_2 does not exist. Maybe you meant test03373_db.test03373_merge_ro?. (UNKNOWN_TABLE)
INSERT INTO test03373_db.test03373_table_2 VALUES (1,1)
Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Table test03373_db.test03373_table_2 does not exist. Maybe you meant test03373_db.test03373_merge_ro?. (UNKNOWN_TABLE)
826e0f3
to
39ae16c
Compare
485c050
to
d449a9a
Compare
…dation Validate access to underlying tables for Merge engine
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Allow to write to Merge table engine
Documentation entry for user-facing changes
Add ability to write into one of source tables of Merge engine.
Added new optional parameter 'table_to_write':
In this case query
works as
If first parameter 'db_name' is not regular expression, 'table_to_write' can contain only table name, than database is taken from first parameter.
If 'db_name' is regexp, 'table_to_write' must contain full table name with database.