-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
clickhouse-copier with slightly different schema of the target table #9159
Comments
Could you please provide us more informative stacktrace? |
@nikitamikhaylov Here is anonymized stacktrace and table DDL. I don't have any materialized or alias columns. clickhouse-copier stack trace:
Table definition on old cluster: CREATE TABLE <db>.<table>
(
Column1 String,
Column2 UInt32,
Column3 Date,
Column4 DateTime,
Column5 UInt16,
Column6 String,
Column7 String,
Column8 String,
Column9 String,
Column10 String,
Column11 String,
Column12 Decimal(3, 1),
Column13 DateTime,
Column14 UInt16
)
ENGINE = MergeTree()
PARTITION BY (toYYYYMMDD(Column3), Column3)
PRIMARY KEY (Column1, Column2, Column3, Column4, Column6, Column7, Column8, Column9)
ORDER BY (Column1, Column2, Column3, Column4, Column6, Column7, Column8, Column9)
SETTINGS index_granularity = 8192 table definition on new cluster: CREATE TABLE <db>.<table> (
Column1 LowCardinality(String) CODEC(LZ4),
Column2 UInt16 CODEC(LZ4),
Column3 Date CODEC(DoubleDelta, LZ4),
Column4 DateTime CODEC(DoubleDelta, LZ4),
Column5 UInt16 CODEC(LZ4),
Column6 LowCardinality(String) CODEC(ZSTD),
Column7 LowCardinality(String) CODEC(ZSTD),
Column8 LowCardinality(String) CODEC(ZSTD),
Column9 LowCardinality(String) CODEC(ZSTD),
Column10 String CODEC(ZSTD(6)),
Column11 LowCardinality(String) CODEC(LZ4),
Column12 Decimal(3,1) CODEC(LZ4),
Column13 DateTime CODEC(DoubleDelta, LZ4),
Column14 UInt16 CODEC(LZ4)
) ENGINE = MergeTree()
PARTITION BY toYYYYMMDD(Column3)
ORDER BY (Column9, Column1, Column2, Column3, Column4); |
@vpanfilov Try to install package clickhouse-common-static-dbg to get normal stacktrace. |
Sorry, but I can't provide more detailed stack trace. But I am pretty sure that the actual error (Block structure mismatch in RemoteBlockOutputStream stream: different types) is triggered here: ClickHouse/dbms/src/Core/Block.cpp Lines 479 to 481 in 575ddef
Actual column structures are present in clickhouse-copier log above. I created a markdown table from it:
|
This will be fixed in #23518 |
Hello.
I am trying to use clickhouse-copier to migrate some tables to new Clickhouse cluster. But at the same time I want to alter some column types (for example, replace String with LowCardinality(String) . So I manually created all destination tables with new types and wrote a test task for clickhouse-copier.
But clickhouse-copier tasks are failing with error:
while ordinary
INSERT INTO db.table SELECT * FROM remote(...) WHERE ...
queries are working fine.Can I use clickhouse-copier with different (but compatible) column types on source and destination clusters?
Source cluster: Clickhouse 18.16.1
Destination cluster: Clickhouse 19.16.11.47
The text was updated successfully, but these errors were encountered: