Try fix build.

This commit is contained in:
Nikolai Kochetov 2020-05-15 18:48:19 +03:00
parent af0328bf30
commit c4a07812f7
2 changed files with 2 additions and 6 deletions

View File

@ -73,12 +73,6 @@ public:
void executeImpl(Block & block, const ColumnNumbers & arguments, size_t result, size_t input_rows_count) override void executeImpl(Block & block, const ColumnNumbers & arguments, size_t result, size_t input_rows_count) override
{ {
if (arguments.size() < 2)
throw Exception(
"Number of arguments for function " + getName() + " doesn't match: passed " + toString(arguments.size())
+ ", should be at least 2.",
ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
/// Format function is not proven to be faster for two arguments. /// Format function is not proven to be faster for two arguments.
/// Actually there is overhead of 2 to 5 extra instructions for each string for checking empty strings in FormatImpl. /// Actually there is overhead of 2 to 5 extra instructions for each string for checking empty strings in FormatImpl.
/// Though, benchmarks are really close, for most examples we saw executeBinary is slightly faster (0-3%). /// Though, benchmarks are really close, for most examples we saw executeBinary is slightly faster (0-3%).
@ -122,6 +116,8 @@ private:
void executeFormatImpl(Block & block, const ColumnNumbers & arguments, const size_t result, size_t input_rows_count) void executeFormatImpl(Block & block, const ColumnNumbers & arguments, const size_t result, size_t input_rows_count)
{ {
assert(arguments.size() > 2);
auto c_res = ColumnString::create(); auto c_res = ColumnString::create();
std::vector<const ColumnString::Chars *> data(arguments.size()); std::vector<const ColumnString::Chars *> data(arguments.size());
std::vector<const ColumnString::Offsets *> offsets(arguments.size()); std::vector<const ColumnString::Offsets *> offsets(arguments.size());