mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 08:52:06 +00:00
8356d44c70
The "fast" mode of turbo base64 seem to go too fast on small strings,
disabling the AVX2 optimisation for small string fixes the problem.
See the test named 02113_base64encode_trailing_bytes.sql for an example
of a failing case (only applies when running on a CPU with the AVX2
instruction set).
Ref. 15e044269d/turbob64.h (L106-L111)
19 lines
477 B
C++
19 lines
477 B
C++
#include <Functions/FunctionBase64Conversion.h>
|
|
#if USE_BASE64
|
|
#include <Functions/FunctionFactory.h>
|
|
#include <DataTypes/DataTypeString.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
void registerFunctionBase64Decode(FunctionFactory & factory)
|
|
{
|
|
tb64ini(0, 0);
|
|
factory.registerFunction<FunctionBase64Conversion<Base64Decode>>();
|
|
|
|
/// MysQL compatibility alias.
|
|
factory.registerFunction<FunctionBase64Conversion<Base64Decode>>("FROM_BASE64", FunctionFactory::CaseInsensitive);
|
|
}
|
|
}
|
|
#endif
|