未验证 提交 9a3701cc 编写于 作者: A alexey-milovidov 提交者: GitHub

Update StorageBuffer.cpp

上级 33eb6426
...@@ -565,7 +565,7 @@ void StorageBuffer::writeBlockToDestination(const Block & block, StoragePtr tabl ...@@ -565,7 +565,7 @@ void StorageBuffer::writeBlockToDestination(const Block & block, StoragePtr tabl
if (!table) if (!table)
{ {
LOG_ERROR(log, "Destination table " << destination_database << "." << destination_table << " doesn't exist. Block of data is discarded."); LOG_ERROR(log, "Destination table " << backQuoteIfNeed(destination_database) << "." << backQuoteIfNeed(destination_table) << " doesn't exist. Block of data is discarded.");
return; return;
} }
...@@ -587,8 +587,8 @@ void StorageBuffer::writeBlockToDestination(const Block & block, StoragePtr tabl ...@@ -587,8 +587,8 @@ void StorageBuffer::writeBlockToDestination(const Block & block, StoragePtr tabl
auto column = block.getByName(dst_col.name); auto column = block.getByName(dst_col.name);
if (!column.type->equals(*dst_col.type)) if (!column.type->equals(*dst_col.type))
{ {
LOG_WARNING(log, "Destination table " << destination_database << "." << destination_table LOG_WARNING(log, "Destination table " << backQuoteIfNeed(destination_database) << "." << backQuoteIfNeed(destination_table)
<< " have different type of column " << column.name << " (" << " have different type of column " << backQuoteIfNeed(column.name) << " ("
<< column.type->getName() << " != " << dst_col.type->getName() << column.type->getName() << " != " << dst_col.type->getName()
<< "). Block of data is converted."); << "). Block of data is converted.");
column.column = castColumn(column, dst_col.type, context); column.column = castColumn(column, dst_col.type, context);
...@@ -601,14 +601,14 @@ void StorageBuffer::writeBlockToDestination(const Block & block, StoragePtr tabl ...@@ -601,14 +601,14 @@ void StorageBuffer::writeBlockToDestination(const Block & block, StoragePtr tabl
if (block_to_write.columns() == 0) if (block_to_write.columns() == 0)
{ {
LOG_ERROR(log, "Destination table " << destination_database << "." << destination_table LOG_ERROR(log, "Destination table " << backQuoteIfNeed(destination_database) << "." << backQuoteIfNeed(destination_table)
<< " have no common columns with block in buffer. Block of data is discarded."); << " have no common columns with block in buffer. Block of data is discarded.");
return; return;
} }
if (block_to_write.columns() != block.columns()) if (block_to_write.columns() != block.columns())
LOG_WARNING(log, "Not all columns from block in buffer exist in destination table " LOG_WARNING(log, "Not all columns from block in buffer exist in destination table "
<< destination_database << "." << destination_table << ". Some columns are discarded."); << backQuoteIfNeed(destination_database) << "." << backQuoteIfNeed(destination_table) << ". Some columns are discarded.");
auto list_of_columns = std::make_shared<ASTExpressionList>(); auto list_of_columns = std::make_shared<ASTExpressionList>();
insert->columns = list_of_columns; insert->columns = list_of_columns;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册