Open
Conversation
Collaborator
|
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
zvonand
reviewed
Mar 12, 2025
src/Storages/StorageMerge.cpp
Outdated
|
|
||
| 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); |
Collaborator
There was a problem hiding this comment.
What happens if there is no table with given name?
Author
There was a problem hiding this comment.
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
31 tasks
Author
|
Not ready to merge, need rebase to 25.3 |
Write to Merge storage
6ca82ea to
2c09642
Compare
Author
|
Make a new cherry-pick from ClickHouse#77484 |
arthurpassos
previously approved these changes
Jun 5, 2025
Author
|
Was reverted in upstream - ClickHouse#82771 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
PR into upstream ClickHouse#77484