ClickHouse/dbms/src/Functions/has.cpp

19 lines
376 B
C++
Raw Normal View History

2018-09-09 20:57:54 +00:00
#include <Functions/arrayIndex.h>
#include <Functions/FunctionFactory.h>
namespace DB
{
struct NameHas { static constexpr auto name = "has"; };
/// has(arr, x) - whether there is an element x in the array.
using FunctionHas = FunctionArrayIndex<IndexToOne, NameHas>;
void registerFunctionHas(FunctionFactory & factory)
{
factory.registerFunction<FunctionHas>();
}
}