Document functions

This commit is contained in:
ltrk2 2023-01-17 07:12:06 -08:00
parent 65b9c69c90
commit 9d798ea1bc
3 changed files with 14 additions and 7 deletions

View File

@ -12,11 +12,16 @@ struct NameHasToken
}; };
using FunctionHasToken = DB::FunctionsStringSearch<DB::HasTokenImpl<NameHasToken, DB::VolnitskyCaseSensitiveToken, false>>; using FunctionHasToken = DB::FunctionsStringSearch<DB::HasTokenImpl<NameHasToken, DB::VolnitskyCaseSensitiveToken, false>>;
using FunctionHasTokenOrNull = DB::FunctionsStringSearch<DB::HasTokenImpl<NameHasToken, DB::VolnitskyCaseSensitiveToken, false>, DB::ExecutionErrorPolicy::Null>; using FunctionHasTokenOrNull
= DB::FunctionsStringSearch<DB::HasTokenImpl<NameHasToken, DB::VolnitskyCaseSensitiveToken, false>, DB::ExecutionErrorPolicy::Null>;
} }
REGISTER_FUNCTION(HasToken) REGISTER_FUNCTION(HasToken)
{ {
factory.registerFunction<FunctionHasToken>(); factory.registerFunction<FunctionHasToken>(
factory.registerFunction<FunctionHasTokenOrNull>(); {"Performs lookup of needle in haystack using tokenbf_v1 index."}, DB::FunctionFactory::CaseSensitive);
factory.registerFunction<FunctionHasTokenOrNull>(
{"Performs lookup of needle in haystack using tokenbf_v1 index. Returns null if needle is ill-formed."},
DB::FunctionFactory::CaseSensitive);
} }

View File

@ -20,6 +20,10 @@ using FunctionHasTokenCaseInsensitiveOrNull = DB::FunctionsStringSearch<
REGISTER_FUNCTION(HasTokenCaseInsensitive) REGISTER_FUNCTION(HasTokenCaseInsensitive)
{ {
factory.registerFunction<FunctionHasTokenCaseInsensitive>(); factory.registerFunction<FunctionHasTokenCaseInsensitive>(
factory.registerFunction<FunctionHasTokenCaseInsensitiveOrNull>(); {"Performs case insensitive lookup of needle in haystack using tokenbf_v1 index."}, DB::FunctionFactory::CaseInsensitive);
factory.registerFunction<FunctionHasTokenCaseInsensitiveOrNull>(
{"Performs case insensitive lookup of needle in haystack using tokenbf_v1 index. Returns null if needle is ill-formed."},
DB::FunctionFactory::CaseInsensitive);
} }

View File

@ -344,8 +344,6 @@ hasAny
hasColumnInTable hasColumnInTable
hasSubstr hasSubstr
hasThreadFuzzer hasThreadFuzzer
hasToken
hasTokenCaseInsensitive
hashid hashid
hex hex
hiveHash hiveHash