Use proper types for Field.

When a Field is inserted into a column, its type should be the same as
the column data type to avoid implicit reinterpret_cast. Change a
couple of usages where these types were different.
This commit is contained in:
Alexander Kuzmenkov 2019-10-01 13:01:55 +03:00
parent 6960b893fd
commit 4af8e76bdd
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ namespace DB
/// A struct which will be inserted as row into query_log table /// A struct which will be inserted as row into query_log table
struct QueryLogElement struct QueryLogElement
{ {
enum Type enum Type : UInt8 // Make it signed for compatibility with DataTypeEnum8
{ {
QUERY_START = 1, QUERY_START = 1,
QUERY_FINISH = 2, QUERY_FINISH = 2,

View File

@ -95,8 +95,8 @@ void StorageSystemParts::processNextStorage(MutableColumns & columns_, const Sto
columns_[i++]->insert(part->getMinDate()); columns_[i++]->insert(part->getMinDate());
columns_[i++]->insert(part->getMaxDate()); columns_[i++]->insert(part->getMaxDate());
columns_[i++]->insert(part->getMinTime()); columns_[i++]->insert(static_cast<UInt32>(part->getMinTime()));
columns_[i++]->insert(part->getMaxTime()); columns_[i++]->insert(static_cast<UInt32>(part->getMaxTime()));
columns_[i++]->insert(part->info.partition_id); columns_[i++]->insert(part->info.partition_id);
columns_[i++]->insert(part->info.min_block); columns_[i++]->insert(part->info.min_block);
columns_[i++]->insert(part->info.max_block); columns_[i++]->insert(part->info.max_block);