ClickHouse/src/Functions/array/has.cpp
2020-04-03 18:14:31 +03:00

19 lines
366 B
C++

#include "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>();
}
}