better diagnostic in ReplicatedMergeTree

This commit is contained in:
Anton Popov 2021-09-21 22:39:30 +03:00
parent 1f74a98baf
commit 0fbfac056d

View File

@ -961,7 +961,9 @@ void StorageReplicatedMergeTree::checkTableStructure(const String & zookeeper_pr
const ColumnsDescription & old_columns = metadata_snapshot->getColumns();
if (columns_from_zk != old_columns)
{
throw Exception("Table columns structure in ZooKeeper is different from local table structure", ErrorCodes::INCOMPATIBLE_COLUMNS);
throw Exception(ErrorCodes::INCOMPATIBLE_COLUMNS,
"Table columns structure in ZooKeeper is different from local table structure. Local columns:\n"
"{}\nZookeeper columns:\n{}", old_columns.toString(), columns_from_zk.toString());
}
}