mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-18 04:12:19 +00:00
19 lines
376 B
C++
19 lines
376 B
C++
#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>();
|
|
}
|
|
|
|
}
|