ClickHouse/src/Functions/array/hasSubstr.cpp
Alexander Kazakov 0510911559
Merge pull request #11071 (#11874)
* Add's hasSubstr  array function

* Add's example in the english doc of hasSubStr

* Updates conditions to avoid prematurely calling isEqual

* Remove feathericons

Authored-by: Ryad ZENINE <ryad.zenine@contentsquare.com>
2020-06-23 17:42:19 +03:00

23 lines
572 B
C++

#include "hasAllAny.h"
#include <Functions/FunctionFactory.h>
#include <Functions/GatherUtils/GatherUtils.h>
namespace DB
{
class FunctionArrayHasSubstr : public FunctionArrayHasAllAny
{
public:
static constexpr auto name = "hasSubstr";
static FunctionPtr create(const Context &) { return std::make_shared<FunctionArrayHasSubstr>(); }
FunctionArrayHasSubstr() : FunctionArrayHasAllAny(GatherUtils::ArraySearchType::Substr, name) {}
};
void registerFunctionHasSubstr(FunctionFactory & factory)
{
factory.registerFunction<FunctionArrayHasSubstr>();
}
}