From a95e0015dc2e854e6671185a6f34d34f609476aa Mon Sep 17 00:00:00 2001 From: chertus Date: Fri, 7 Jun 2019 21:11:50 +0300 Subject: [PATCH] fix build and tests --- dbms/src/Compression/CompressionCodecT64.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dbms/src/Compression/CompressionCodecT64.cpp b/dbms/src/Compression/CompressionCodecT64.cpp index 5fb7082a626..e982779f5bb 100644 --- a/dbms/src/Compression/CompressionCodecT64.cpp +++ b/dbms/src/Compression/CompressionCodecT64.cpp @@ -168,7 +168,9 @@ void revTranspose(const char * src, char * dst, UInt32 num_bits, UInt64 min, UIn memcpy(partial, res, 8 * sizeof(UInt64)); } - _T upper = min >> num_bits << num_bits; + _T upper = 0; + if (num_bits < 64) + upper = min >> num_bits << num_bits; auto * mx8 = reinterpret_cast(mx); @@ -378,7 +380,7 @@ void CompressionCodecT64::useInfoAboutType(DataTypePtr data_type) { type_idx = typeIdx(data_type); if (type_idx == TypeIndex::Nothing) - throw Exception("T64 codec is not supported for type " + data_type->getName(), ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE); + throw Exception("T64 codec is not supported for specified type", ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE); } } @@ -396,7 +398,7 @@ void registerCodecT64(CompressionCodecFactory & factory) auto type_idx = typeIdx(type); if (type && type_idx == TypeIndex::Nothing) - throw Exception("T64 codec is not supported for type " + type->getName(), ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE); + throw Exception("T64 codec is not supported for specified type", ErrorCodes::ILLEGAL_SYNTAX_FOR_CODEC_TYPE); return std::make_shared(type_idx); };