mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Better exception messages for some String-related functions
This commit is contained in:
parent
f983381e45
commit
2c6b9aa174
@ -19,11 +19,12 @@ namespace ErrorCodes
|
|||||||
/// NOTE: Intersecting substrings in haystack accounted only once, i.e.:
|
/// NOTE: Intersecting substrings in haystack accounted only once, i.e.:
|
||||||
///
|
///
|
||||||
/// countSubstrings('aaaa', 'aa') == 2
|
/// countSubstrings('aaaa', 'aa') == 2
|
||||||
template <typename Impl>
|
template <typename Name, typename Impl>
|
||||||
struct CountSubstringsImpl
|
struct CountSubstringsImpl
|
||||||
{
|
{
|
||||||
static constexpr bool use_default_implementation_for_constants = false;
|
static constexpr bool use_default_implementation_for_constants = false;
|
||||||
static constexpr bool supports_start_pos = true;
|
static constexpr bool supports_start_pos = true;
|
||||||
|
static constexpr auto name = Name::name;
|
||||||
|
|
||||||
using ResultType = UInt64;
|
using ResultType = UInt64;
|
||||||
|
|
||||||
@ -225,7 +226,7 @@ struct CountSubstringsImpl
|
|||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
static void vectorFixedConstant(Args &&...)
|
static void vectorFixedConstant(Args &&...)
|
||||||
{
|
{
|
||||||
throw Exception("Functions 'position' don't support FixedString haystack argument", ErrorCodes::ILLEGAL_COLUMN);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Function '{}' doesn't support FixedString haystack argument", name);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -28,13 +28,13 @@ namespace ErrorCodes
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename Impl, typename Name, size_t LimitArgs>
|
template <typename Impl, size_t LimitArgs>
|
||||||
class FunctionsMultiStringFuzzySearch : public IFunction
|
class FunctionsMultiStringFuzzySearch : public IFunction
|
||||||
{
|
{
|
||||||
static_assert(LimitArgs > 0);
|
static_assert(LimitArgs > 0);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static constexpr auto name = Name::name;
|
static constexpr auto name = Impl::name;
|
||||||
static FunctionPtr create(ContextPtr context)
|
static FunctionPtr create(ContextPtr context)
|
||||||
{
|
{
|
||||||
if (Impl::is_using_hyperscan && !context->getSettingsRef().allow_hyperscan)
|
if (Impl::is_using_hyperscan && !context->getSettingsRef().allow_hyperscan)
|
||||||
|
@ -41,13 +41,13 @@ namespace ErrorCodes
|
|||||||
|
|
||||||
/// The argument limiting raises from Volnitsky searcher -- it is performance crucial to save only one byte for pattern number.
|
/// The argument limiting raises from Volnitsky searcher -- it is performance crucial to save only one byte for pattern number.
|
||||||
/// But some other searchers use this function, for example, multiMatchAny -- hyperscan does not have such restrictions
|
/// But some other searchers use this function, for example, multiMatchAny -- hyperscan does not have such restrictions
|
||||||
template <typename Impl, typename Name, size_t LimitArgs = std::numeric_limits<UInt8>::max()>
|
template <typename Impl, size_t LimitArgs = std::numeric_limits<UInt8>::max()>
|
||||||
class FunctionsMultiStringSearch : public IFunction
|
class FunctionsMultiStringSearch : public IFunction
|
||||||
{
|
{
|
||||||
static_assert(LimitArgs > 0);
|
static_assert(LimitArgs > 0);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static constexpr auto name = Name::name;
|
static constexpr auto name = Impl::name;
|
||||||
static FunctionPtr create(ContextPtr context)
|
static FunctionPtr create(ContextPtr context)
|
||||||
{
|
{
|
||||||
if (Impl::is_using_hyperscan && !context->getSettingsRef().allow_hyperscan)
|
if (Impl::is_using_hyperscan && !context->getSettingsRef().allow_hyperscan)
|
||||||
|
@ -46,11 +46,11 @@ namespace ErrorCodes
|
|||||||
extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
|
extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Impl, typename Name>
|
template <typename Impl>
|
||||||
class FunctionsStringSearch : public IFunction
|
class FunctionsStringSearch : public IFunction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static constexpr auto name = Name::name;
|
static constexpr auto name = Impl::name;
|
||||||
static FunctionPtr create(ContextPtr) { return std::make_shared<FunctionsStringSearch>(); }
|
static FunctionPtr create(ContextPtr) { return std::make_shared<FunctionsStringSearch>(); }
|
||||||
|
|
||||||
String getName() const override { return name; }
|
String getName() const override { return name; }
|
||||||
@ -80,7 +80,7 @@ public:
|
|||||||
DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override
|
DataTypePtr getReturnTypeImpl(const DataTypes & arguments) const override
|
||||||
{
|
{
|
||||||
if (arguments.size() < 2 || 3 < arguments.size())
|
if (arguments.size() < 2 || 3 < arguments.size())
|
||||||
throw Exception("Number of arguments for function " + String(Name::name) + " doesn't match: passed "
|
throw Exception("Number of arguments for function " + getName() + " doesn't match: passed "
|
||||||
+ toString(arguments.size()) + ", should be 2 or 3.",
|
+ toString(arguments.size()) + ", should be 2 or 3.",
|
||||||
ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
|
ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
|
||||||
|
|
||||||
|
@ -74,13 +74,14 @@ struct ExtractNumericType
|
|||||||
* If a field was not found or an incorrect value is associated with the field,
|
* If a field was not found or an incorrect value is associated with the field,
|
||||||
* then the default value used - 0.
|
* then the default value used - 0.
|
||||||
*/
|
*/
|
||||||
template <typename ParamExtractor>
|
template <typename Name, typename ParamExtractor>
|
||||||
struct ExtractParamImpl
|
struct ExtractParamImpl
|
||||||
{
|
{
|
||||||
using ResultType = typename ParamExtractor::ResultType;
|
using ResultType = typename ParamExtractor::ResultType;
|
||||||
|
|
||||||
static constexpr bool use_default_implementation_for_constants = true;
|
static constexpr bool use_default_implementation_for_constants = true;
|
||||||
static constexpr bool supports_start_pos = false;
|
static constexpr bool supports_start_pos = false;
|
||||||
|
static constexpr auto name = Name::name;
|
||||||
|
|
||||||
/// It is assumed that `res` is the correct size and initialized with zeros.
|
/// It is assumed that `res` is the correct size and initialized with zeros.
|
||||||
static void vectorConstant(
|
static void vectorConstant(
|
||||||
@ -91,7 +92,7 @@ struct ExtractParamImpl
|
|||||||
PaddedPODArray<ResultType> & res)
|
PaddedPODArray<ResultType> & res)
|
||||||
{
|
{
|
||||||
if (start_pos != nullptr)
|
if (start_pos != nullptr)
|
||||||
throw Exception("Functions 'visitParamHas' and 'visitParamExtract*' doesn't support start_pos argument", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
|
throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Function '{}' doesn't support start_pos argument", name);
|
||||||
|
|
||||||
/// We are looking for a parameter simply as a substring of the form "name"
|
/// We are looking for a parameter simply as a substring of the form "name"
|
||||||
needle = "\"" + needle + "\":";
|
needle = "\"" + needle + "\":";
|
||||||
@ -131,18 +132,18 @@ struct ExtractParamImpl
|
|||||||
|
|
||||||
template <typename... Args> static void vectorVector(Args &&...)
|
template <typename... Args> static void vectorVector(Args &&...)
|
||||||
{
|
{
|
||||||
throw Exception("Functions 'visitParamHas' and 'visitParamExtract*' doesn't support non-constant needle argument", ErrorCodes::ILLEGAL_COLUMN);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Function '{}' doesn't support non-constant needle argument", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename... Args> static void constantVector(Args &&...)
|
template <typename... Args> static void constantVector(Args &&...)
|
||||||
{
|
{
|
||||||
throw Exception("Functions 'visitParamHas' and 'visitParamExtract*' doesn't support non-constant needle argument", ErrorCodes::ILLEGAL_COLUMN);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Function '{}' doesn't support non-constant needle argument", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
static void vectorFixedConstant(Args &&...)
|
static void vectorFixedConstant(Args &&...)
|
||||||
{
|
{
|
||||||
throw Exception("Functions 'visitParamHas' don't support FixedString haystack argument", ErrorCodes::ILLEGAL_COLUMN);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Function '{}' doesn't support FixedString haystack argument", name);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,13 +14,14 @@ namespace ErrorCodes
|
|||||||
|
|
||||||
/** Token search the string, means that needle must be surrounded by some separator chars, like whitespace or puctuation.
|
/** Token search the string, means that needle must be surrounded by some separator chars, like whitespace or puctuation.
|
||||||
*/
|
*/
|
||||||
template <typename TokenSearcher, bool negate_result = false>
|
template <typename Name, typename TokenSearcher, bool negate_result = false>
|
||||||
struct HasTokenImpl
|
struct HasTokenImpl
|
||||||
{
|
{
|
||||||
using ResultType = UInt8;
|
using ResultType = UInt8;
|
||||||
|
|
||||||
static constexpr bool use_default_implementation_for_constants = true;
|
static constexpr bool use_default_implementation_for_constants = true;
|
||||||
static constexpr bool supports_start_pos = false;
|
static constexpr bool supports_start_pos = false;
|
||||||
|
static constexpr auto name = Name::name;
|
||||||
|
|
||||||
static void vectorConstant(
|
static void vectorConstant(
|
||||||
const ColumnString::Chars & data,
|
const ColumnString::Chars & data,
|
||||||
@ -30,7 +31,7 @@ struct HasTokenImpl
|
|||||||
PaddedPODArray<UInt8> & res)
|
PaddedPODArray<UInt8> & res)
|
||||||
{
|
{
|
||||||
if (start_pos != nullptr)
|
if (start_pos != nullptr)
|
||||||
throw Exception("Function 'hasToken' does not support start_pos argument", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
|
throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Function '{}' does not support start_pos argument", name);
|
||||||
|
|
||||||
if (offsets.empty())
|
if (offsets.empty())
|
||||||
return;
|
return;
|
||||||
@ -72,20 +73,20 @@ struct HasTokenImpl
|
|||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
static void vectorVector(Args &&...)
|
static void vectorVector(Args &&...)
|
||||||
{
|
{
|
||||||
throw Exception("Function 'hasToken' does not support non-constant needle argument", ErrorCodes::ILLEGAL_COLUMN);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Function '{}' doesn't support non-constant needle argument", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Search different needles in single haystack.
|
/// Search different needles in single haystack.
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
static void constantVector(Args &&...)
|
static void constantVector(Args &&...)
|
||||||
{
|
{
|
||||||
throw Exception("Function 'hasToken' does not support non-constant needle argument", ErrorCodes::ILLEGAL_COLUMN);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Function '{}' doesn't support non-constant needle argument", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
static void vectorFixedConstant(Args &&...)
|
static void vectorFixedConstant(Args &&...)
|
||||||
{
|
{
|
||||||
throw Exception("Functions 'hasToken' don't support FixedString haystack argument", ErrorCodes::ILLEGAL_COLUMN);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Function '{}' doesn't support FixedString haystack argument", name);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,11 +73,12 @@ static inline bool likePatternIsStrstr(const String & pattern, String & res)
|
|||||||
* NOTE: We want to run regexp search for whole columns by one call (as implemented in function 'position')
|
* NOTE: We want to run regexp search for whole columns by one call (as implemented in function 'position')
|
||||||
* but for that, regexp engine must support \0 bytes and their interpretation as string boundaries.
|
* but for that, regexp engine must support \0 bytes and their interpretation as string boundaries.
|
||||||
*/
|
*/
|
||||||
template <bool like, bool revert = false, bool case_insensitive = false>
|
template <typename Name, bool like, bool revert = false, bool case_insensitive = false>
|
||||||
struct MatchImpl
|
struct MatchImpl
|
||||||
{
|
{
|
||||||
static constexpr bool use_default_implementation_for_constants = true;
|
static constexpr bool use_default_implementation_for_constants = true;
|
||||||
static constexpr bool supports_start_pos = false;
|
static constexpr bool supports_start_pos = false;
|
||||||
|
static constexpr auto name = Name::name;
|
||||||
|
|
||||||
using ResultType = UInt8;
|
using ResultType = UInt8;
|
||||||
|
|
||||||
@ -93,7 +94,8 @@ struct MatchImpl
|
|||||||
PaddedPODArray<UInt8> & res)
|
PaddedPODArray<UInt8> & res)
|
||||||
{
|
{
|
||||||
if (start_pos != nullptr)
|
if (start_pos != nullptr)
|
||||||
throw Exception("Functions 'like' and 'match' don't support start_pos argument", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
|
throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT,
|
||||||
|
"Function '{}' doesn't support start_pos argument", name);
|
||||||
|
|
||||||
if (offsets.empty())
|
if (offsets.empty())
|
||||||
return;
|
return;
|
||||||
@ -406,14 +408,14 @@ struct MatchImpl
|
|||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
static void vectorVector(Args &&...)
|
static void vectorVector(Args &&...)
|
||||||
{
|
{
|
||||||
throw Exception("Functions 'like' and 'match' don't support non-constant needle argument", ErrorCodes::ILLEGAL_COLUMN);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Function '{}' doesn't support non-constant needle argument", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Search different needles in single haystack.
|
/// Search different needles in single haystack.
|
||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
static void constantVector(Args &&...)
|
static void constantVector(Args &&...)
|
||||||
{
|
{
|
||||||
throw Exception("Functions 'like' and 'match' don't support non-constant needle argument", ErrorCodes::ILLEGAL_COLUMN);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Function '{}' doesn't support non-constant needle argument", name);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace ErrorCodes
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename Type, bool MultiSearchDistance>
|
template <typename Name, typename Type, bool MultiSearchDistance>
|
||||||
struct MultiMatchAllIndicesImpl
|
struct MultiMatchAllIndicesImpl
|
||||||
{
|
{
|
||||||
using ResultType = Type;
|
using ResultType = Type;
|
||||||
@ -37,6 +37,8 @@ struct MultiMatchAllIndicesImpl
|
|||||||
/// Variable for understanding, if we used offsets for the output, most
|
/// Variable for understanding, if we used offsets for the output, most
|
||||||
/// likely to determine whether the function returns ColumnVector of ColumnArray.
|
/// likely to determine whether the function returns ColumnVector of ColumnArray.
|
||||||
static constexpr bool is_column_array = true;
|
static constexpr bool is_column_array = true;
|
||||||
|
static constexpr auto name = Name::name;
|
||||||
|
|
||||||
static auto getReturnType()
|
static auto getReturnType()
|
||||||
{
|
{
|
||||||
return std::make_shared<DataTypeArray>(std::make_shared<DataTypeUInt64>());
|
return std::make_shared<DataTypeArray>(std::make_shared<DataTypeUInt64>());
|
||||||
|
@ -29,7 +29,7 @@ namespace ErrorCodes
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <typename Type, bool FindAny, bool FindAnyIndex, bool MultiSearchDistance>
|
template <typename Name, typename Type, bool FindAny, bool FindAnyIndex, bool MultiSearchDistance>
|
||||||
struct MultiMatchAnyImpl
|
struct MultiMatchAnyImpl
|
||||||
{
|
{
|
||||||
static_assert(static_cast<int>(FindAny) + static_cast<int>(FindAnyIndex) == 1);
|
static_assert(static_cast<int>(FindAny) + static_cast<int>(FindAnyIndex) == 1);
|
||||||
@ -38,6 +38,8 @@ struct MultiMatchAnyImpl
|
|||||||
/// Variable for understanding, if we used offsets for the output, most
|
/// Variable for understanding, if we used offsets for the output, most
|
||||||
/// likely to determine whether the function returns ColumnVector of ColumnArray.
|
/// likely to determine whether the function returns ColumnVector of ColumnArray.
|
||||||
static constexpr bool is_column_array = false;
|
static constexpr bool is_column_array = false;
|
||||||
|
static constexpr auto name = Name::name;
|
||||||
|
|
||||||
static auto getReturnType()
|
static auto getReturnType()
|
||||||
{
|
{
|
||||||
return std::make_shared<DataTypeNumber<ResultType>>();
|
return std::make_shared<DataTypeNumber<ResultType>>();
|
||||||
@ -120,7 +122,7 @@ struct MultiMatchAnyImpl
|
|||||||
memset(accum.data(), 0, accum.size());
|
memset(accum.data(), 0, accum.size());
|
||||||
for (size_t j = 0; j < needles.size(); ++j)
|
for (size_t j = 0; j < needles.size(); ++j)
|
||||||
{
|
{
|
||||||
MatchImpl<false, false>::vectorConstant(haystack_data, haystack_offsets, needles[j].toString(), nullptr, accum);
|
MatchImpl<Name, false, false>::vectorConstant(haystack_data, haystack_offsets, needles[j].toString(), nullptr, accum);
|
||||||
for (size_t i = 0; i < res.size(); ++i)
|
for (size_t i = 0; i < res.size(); ++i)
|
||||||
{
|
{
|
||||||
if constexpr (FindAny)
|
if constexpr (FindAny)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
|
|
||||||
template <typename Impl>
|
template <typename Name, typename Impl>
|
||||||
struct MultiSearchFirstIndexImpl
|
struct MultiSearchFirstIndexImpl
|
||||||
{
|
{
|
||||||
using ResultType = UInt64;
|
using ResultType = UInt64;
|
||||||
@ -15,6 +15,8 @@ struct MultiSearchFirstIndexImpl
|
|||||||
/// Variable for understanding, if we used offsets for the output, most
|
/// Variable for understanding, if we used offsets for the output, most
|
||||||
/// likely to determine whether the function returns ColumnVector of ColumnArray.
|
/// likely to determine whether the function returns ColumnVector of ColumnArray.
|
||||||
static constexpr bool is_column_array = false;
|
static constexpr bool is_column_array = false;
|
||||||
|
static constexpr auto name = Name::name;
|
||||||
|
|
||||||
static auto getReturnType() { return std::make_shared<DataTypeNumber<ResultType>>(); }
|
static auto getReturnType() { return std::make_shared<DataTypeNumber<ResultType>>(); }
|
||||||
|
|
||||||
static void vectorConstant(
|
static void vectorConstant(
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
|
|
||||||
template <typename Impl>
|
template <typename Name, typename Impl>
|
||||||
struct MultiSearchFirstPositionImpl
|
struct MultiSearchFirstPositionImpl
|
||||||
{
|
{
|
||||||
using ResultType = UInt64;
|
using ResultType = UInt64;
|
||||||
@ -15,6 +15,8 @@ struct MultiSearchFirstPositionImpl
|
|||||||
/// Variable for understanding, if we used offsets for the output, most
|
/// Variable for understanding, if we used offsets for the output, most
|
||||||
/// likely to determine whether the function returns ColumnVector of ColumnArray.
|
/// likely to determine whether the function returns ColumnVector of ColumnArray.
|
||||||
static constexpr bool is_column_array = false;
|
static constexpr bool is_column_array = false;
|
||||||
|
static constexpr auto name = Name::name;
|
||||||
|
|
||||||
static auto getReturnType() { return std::make_shared<DataTypeNumber<ResultType>>(); }
|
static auto getReturnType() { return std::make_shared<DataTypeNumber<ResultType>>(); }
|
||||||
|
|
||||||
static void vectorConstant(
|
static void vectorConstant(
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
|
|
||||||
template <typename Impl>
|
template <typename Name, typename Impl>
|
||||||
struct MultiSearchImpl
|
struct MultiSearchImpl
|
||||||
{
|
{
|
||||||
using ResultType = UInt8;
|
using ResultType = UInt8;
|
||||||
@ -15,6 +15,8 @@ struct MultiSearchImpl
|
|||||||
/// Variable for understanding, if we used offsets for the output, most
|
/// Variable for understanding, if we used offsets for the output, most
|
||||||
/// likely to determine whether the function returns ColumnVector of ColumnArray.
|
/// likely to determine whether the function returns ColumnVector of ColumnArray.
|
||||||
static constexpr bool is_column_array = false;
|
static constexpr bool is_column_array = false;
|
||||||
|
static constexpr auto name = Name::name;
|
||||||
|
|
||||||
static auto getReturnType() { return std::make_shared<DataTypeNumber<ResultType>>(); }
|
static auto getReturnType() { return std::make_shared<DataTypeNumber<ResultType>>(); }
|
||||||
|
|
||||||
static void vectorConstant(
|
static void vectorConstant(
|
||||||
|
@ -175,11 +175,12 @@ struct PositionCaseInsensitiveUTF8
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <typename Impl>
|
template <typename Name, typename Impl>
|
||||||
struct PositionImpl
|
struct PositionImpl
|
||||||
{
|
{
|
||||||
static constexpr bool use_default_implementation_for_constants = false;
|
static constexpr bool use_default_implementation_for_constants = false;
|
||||||
static constexpr bool supports_start_pos = true;
|
static constexpr bool supports_start_pos = true;
|
||||||
|
static constexpr auto name = Name::name;
|
||||||
|
|
||||||
using ResultType = UInt64;
|
using ResultType = UInt64;
|
||||||
|
|
||||||
@ -408,7 +409,7 @@ struct PositionImpl
|
|||||||
template <typename... Args>
|
template <typename... Args>
|
||||||
static void vectorFixedConstant(Args &&...)
|
static void vectorFixedConstant(Args &&...)
|
||||||
{
|
{
|
||||||
throw Exception("Functions 'position' don't support FixedString haystack argument", ErrorCodes::ILLEGAL_COLUMN);
|
throw Exception(ErrorCodes::ILLEGAL_COLUMN, "Function '{}' doesn't support FixedString haystack argument", name);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ struct NameCountSubstrings
|
|||||||
static constexpr auto name = "countSubstrings";
|
static constexpr auto name = "countSubstrings";
|
||||||
};
|
};
|
||||||
|
|
||||||
using FunctionCountSubstrings = FunctionsStringSearch<CountSubstringsImpl<PositionCaseSensitiveASCII>, NameCountSubstrings>;
|
using FunctionCountSubstrings = FunctionsStringSearch<CountSubstringsImpl<NameCountSubstrings, PositionCaseSensitiveASCII>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ struct NameCountSubstringsCaseInsensitive
|
|||||||
static constexpr auto name = "countSubstringsCaseInsensitive";
|
static constexpr auto name = "countSubstringsCaseInsensitive";
|
||||||
};
|
};
|
||||||
|
|
||||||
using FunctionCountSubstringsCaseInsensitive = FunctionsStringSearch<CountSubstringsImpl<PositionCaseInsensitiveASCII>, NameCountSubstringsCaseInsensitive>;
|
using FunctionCountSubstringsCaseInsensitive = FunctionsStringSearch<CountSubstringsImpl<NameCountSubstringsCaseInsensitive, PositionCaseInsensitiveASCII>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@ struct NameCountSubstringsCaseInsensitiveUTF8
|
|||||||
static constexpr auto name = "countSubstringsCaseInsensitiveUTF8";
|
static constexpr auto name = "countSubstringsCaseInsensitiveUTF8";
|
||||||
};
|
};
|
||||||
|
|
||||||
using FunctionCountSubstringsCaseInsensitiveUTF8 = FunctionsStringSearch<CountSubstringsImpl<PositionCaseInsensitiveUTF8>, NameCountSubstringsCaseInsensitiveUTF8>;
|
using FunctionCountSubstringsCaseInsensitiveUTF8 = FunctionsStringSearch<
|
||||||
|
CountSubstringsImpl<NameCountSubstringsCaseInsensitiveUTF8, PositionCaseInsensitiveUTF8>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ struct NameHasToken
|
|||||||
static constexpr auto name = "hasToken";
|
static constexpr auto name = "hasToken";
|
||||||
};
|
};
|
||||||
|
|
||||||
using FunctionHasToken = FunctionsStringSearch<HasTokenImpl<VolnitskyCaseSensitiveToken, false>, NameHasToken>;
|
using FunctionHasToken = FunctionsStringSearch<HasTokenImpl<NameHasToken, VolnitskyCaseSensitiveToken, false>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ struct NameHasTokenCaseInsensitive
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionHasTokenCaseInsensitive
|
using FunctionHasTokenCaseInsensitive
|
||||||
= FunctionsStringSearch<HasTokenImpl<VolnitskyCaseInsensitiveToken, false>, NameHasTokenCaseInsensitive>;
|
= FunctionsStringSearch<HasTokenImpl<NameHasTokenCaseInsensitive, VolnitskyCaseInsensitiveToken, false>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ struct NameILike
|
|||||||
static constexpr auto name = "ilike";
|
static constexpr auto name = "ilike";
|
||||||
};
|
};
|
||||||
|
|
||||||
using ILikeImpl = MatchImpl<true, false, /*case-insensitive*/true>;
|
using ILikeImpl = MatchImpl<NameILike, true, false, /*case-insensitive*/true>;
|
||||||
using FunctionILike = FunctionsStringSearch<ILikeImpl, NameILike>;
|
using FunctionILike = FunctionsStringSearch<ILikeImpl>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ struct NameLike
|
|||||||
static constexpr auto name = "like";
|
static constexpr auto name = "like";
|
||||||
};
|
};
|
||||||
|
|
||||||
using LikeImpl = MatchImpl</*SQL LIKE */ true, /*revert*/false>;
|
using LikeImpl = MatchImpl<NameLike, /*SQL LIKE */ true, /*revert*/false>;
|
||||||
using FunctionLike = FunctionsStringSearch<LikeImpl, NameLike>;
|
using FunctionLike = FunctionsStringSearch<LikeImpl>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ struct NameMatch
|
|||||||
static constexpr auto name = "match";
|
static constexpr auto name = "match";
|
||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMatch = FunctionsStringSearch<MatchImpl<false>, NameMatch>;
|
using FunctionMatch = FunctionsStringSearch<MatchImpl<NameMatch, false>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,8 +14,7 @@ struct NameMultiFuzzyMatchAllIndices
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiFuzzyMatchAllIndices = FunctionsMultiStringFuzzySearch<
|
using FunctionMultiFuzzyMatchAllIndices = FunctionsMultiStringFuzzySearch<
|
||||||
MultiMatchAllIndicesImpl<UInt64, true>,
|
MultiMatchAllIndicesImpl<NameMultiFuzzyMatchAllIndices, UInt64, true>,
|
||||||
NameMultiFuzzyMatchAllIndices,
|
|
||||||
std::numeric_limits<UInt32>::max()>;
|
std::numeric_limits<UInt32>::max()>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@ struct NameMultiFuzzyMatchAny
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiFuzzyMatchAny = FunctionsMultiStringFuzzySearch<
|
using FunctionMultiFuzzyMatchAny = FunctionsMultiStringFuzzySearch<
|
||||||
MultiMatchAnyImpl<UInt8, true, false, true>,
|
MultiMatchAnyImpl<NameMultiFuzzyMatchAny, UInt8, true, false, true>,
|
||||||
NameMultiFuzzyMatchAny,
|
|
||||||
std::numeric_limits<UInt32>::max()>;
|
std::numeric_limits<UInt32>::max()>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@ struct NameMultiFuzzyMatchAnyIndex
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiFuzzyMatchAnyIndex = FunctionsMultiStringFuzzySearch<
|
using FunctionMultiFuzzyMatchAnyIndex = FunctionsMultiStringFuzzySearch<
|
||||||
MultiMatchAnyImpl<UInt64, false, true, true>,
|
MultiMatchAnyImpl<NameMultiFuzzyMatchAnyIndex, UInt64, false, true, true>,
|
||||||
NameMultiFuzzyMatchAnyIndex,
|
|
||||||
std::numeric_limits<UInt32>::max()>;
|
std::numeric_limits<UInt32>::max()>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@ struct NameMultiMatchAllIndices
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiMatchAllIndices = FunctionsMultiStringSearch<
|
using FunctionMultiMatchAllIndices = FunctionsMultiStringSearch<
|
||||||
MultiMatchAllIndicesImpl<UInt64, false>,
|
MultiMatchAllIndicesImpl<NameMultiMatchAllIndices, UInt64, false>,
|
||||||
NameMultiMatchAllIndices,
|
|
||||||
std::numeric_limits<UInt32>::max()>;
|
std::numeric_limits<UInt32>::max()>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@ struct NameMultiMatchAny
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiMatchAny = FunctionsMultiStringSearch<
|
using FunctionMultiMatchAny = FunctionsMultiStringSearch<
|
||||||
MultiMatchAnyImpl<UInt8, true, false, false>,
|
MultiMatchAnyImpl<NameMultiMatchAny, UInt8, true, false, false>,
|
||||||
NameMultiMatchAny,
|
|
||||||
std::numeric_limits<UInt32>::max()>;
|
std::numeric_limits<UInt32>::max()>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,7 @@ struct NameMultiMatchAnyIndex
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiMatchAnyIndex = FunctionsMultiStringSearch<
|
using FunctionMultiMatchAnyIndex = FunctionsMultiStringSearch<
|
||||||
MultiMatchAnyImpl<UInt64, false, true, false>,
|
MultiMatchAnyImpl<NameMultiMatchAnyIndex, UInt64, false, true, false>,
|
||||||
NameMultiMatchAnyIndex,
|
|
||||||
std::numeric_limits<UInt32>::max()>;
|
std::numeric_limits<UInt32>::max()>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ struct NameMultiSearchAny
|
|||||||
static constexpr auto name = "multiSearchAny";
|
static constexpr auto name = "multiSearchAny";
|
||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiSearch = FunctionsMultiStringSearch<MultiSearchImpl<PositionCaseSensitiveASCII>, NameMultiSearchAny>;
|
using FunctionMultiSearch = FunctionsMultiStringSearch<MultiSearchImpl<NameMultiSearchAny, PositionCaseSensitiveASCII>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ struct NameMultiSearchAnyCaseInsensitive
|
|||||||
static constexpr auto name = "multiSearchAnyCaseInsensitive";
|
static constexpr auto name = "multiSearchAnyCaseInsensitive";
|
||||||
};
|
};
|
||||||
using FunctionMultiSearchCaseInsensitive
|
using FunctionMultiSearchCaseInsensitive
|
||||||
= FunctionsMultiStringSearch<MultiSearchImpl<PositionCaseInsensitiveASCII>, NameMultiSearchAnyCaseInsensitive>;
|
= FunctionsMultiStringSearch<MultiSearchImpl<NameMultiSearchAnyCaseInsensitive, PositionCaseInsensitiveASCII>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ struct NameMultiSearchAnyCaseInsensitiveUTF8
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiSearchCaseInsensitiveUTF8
|
using FunctionMultiSearchCaseInsensitiveUTF8
|
||||||
= FunctionsMultiStringSearch<MultiSearchImpl<PositionCaseInsensitiveUTF8>, NameMultiSearchAnyCaseInsensitiveUTF8>;
|
= FunctionsMultiStringSearch<MultiSearchImpl<NameMultiSearchAnyCaseInsensitiveUTF8, PositionCaseInsensitiveUTF8>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ struct NameMultiSearchAnyUTF8
|
|||||||
{
|
{
|
||||||
static constexpr auto name = "multiSearchAnyUTF8";
|
static constexpr auto name = "multiSearchAnyUTF8";
|
||||||
};
|
};
|
||||||
using FunctionMultiSearchUTF8 = FunctionsMultiStringSearch<MultiSearchImpl<PositionCaseSensitiveUTF8>, NameMultiSearchAnyUTF8>;
|
using FunctionMultiSearchUTF8 = FunctionsMultiStringSearch<MultiSearchImpl<NameMultiSearchAnyUTF8, PositionCaseSensitiveUTF8>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ struct NameMultiSearchFirstIndex
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiSearchFirstIndex
|
using FunctionMultiSearchFirstIndex
|
||||||
= FunctionsMultiStringSearch<MultiSearchFirstIndexImpl<PositionCaseSensitiveASCII>, NameMultiSearchFirstIndex>;
|
= FunctionsMultiStringSearch<MultiSearchFirstIndexImpl<NameMultiSearchFirstIndex, PositionCaseSensitiveASCII>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ struct NameMultiSearchFirstIndexCaseInsensitive
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiSearchFirstIndexCaseInsensitive
|
using FunctionMultiSearchFirstIndexCaseInsensitive
|
||||||
= FunctionsMultiStringSearch<MultiSearchFirstIndexImpl<PositionCaseInsensitiveASCII>, NameMultiSearchFirstIndexCaseInsensitive>;
|
= FunctionsMultiStringSearch<MultiSearchFirstIndexImpl<NameMultiSearchFirstIndexCaseInsensitive, PositionCaseInsensitiveASCII>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ struct NameMultiSearchFirstIndexCaseInsensitiveUTF8
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiSearchFirstIndexCaseInsensitiveUTF8
|
using FunctionMultiSearchFirstIndexCaseInsensitiveUTF8
|
||||||
= FunctionsMultiStringSearch<MultiSearchFirstIndexImpl<PositionCaseInsensitiveUTF8>, NameMultiSearchFirstIndexCaseInsensitiveUTF8>;
|
= FunctionsMultiStringSearch<MultiSearchFirstIndexImpl<NameMultiSearchFirstIndexCaseInsensitiveUTF8, PositionCaseInsensitiveUTF8>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ struct NameMultiSearchFirstIndexUTF8
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiSearchFirstIndexUTF8
|
using FunctionMultiSearchFirstIndexUTF8
|
||||||
= FunctionsMultiStringSearch<MultiSearchFirstIndexImpl<PositionCaseSensitiveUTF8>, NameMultiSearchFirstIndexUTF8>;
|
= FunctionsMultiStringSearch<MultiSearchFirstIndexImpl<NameMultiSearchFirstIndexUTF8, PositionCaseSensitiveUTF8>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ struct NameMultiSearchFirstPosition
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiSearchFirstPosition
|
using FunctionMultiSearchFirstPosition
|
||||||
= FunctionsMultiStringSearch<MultiSearchFirstPositionImpl<PositionCaseSensitiveASCII>, NameMultiSearchFirstPosition>;
|
= FunctionsMultiStringSearch<MultiSearchFirstPositionImpl<NameMultiSearchFirstPosition, PositionCaseSensitiveASCII>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ struct NameMultiSearchFirstPositionCaseInsensitive
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiSearchFirstPositionCaseInsensitive
|
using FunctionMultiSearchFirstPositionCaseInsensitive
|
||||||
= FunctionsMultiStringSearch<MultiSearchFirstPositionImpl<PositionCaseInsensitiveASCII>, NameMultiSearchFirstPositionCaseInsensitive>;
|
= FunctionsMultiStringSearch<MultiSearchFirstPositionImpl<NameMultiSearchFirstPositionCaseInsensitive, PositionCaseInsensitiveASCII>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,8 +15,7 @@ struct NameMultiSearchFirstPositionCaseInsensitiveUTF8
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiSearchFirstPositionCaseInsensitiveUTF8 = FunctionsMultiStringSearch<
|
using FunctionMultiSearchFirstPositionCaseInsensitiveUTF8 = FunctionsMultiStringSearch<
|
||||||
MultiSearchFirstPositionImpl<PositionCaseInsensitiveUTF8>,
|
MultiSearchFirstPositionImpl<NameMultiSearchFirstPositionCaseInsensitiveUTF8, PositionCaseInsensitiveUTF8>>;
|
||||||
NameMultiSearchFirstPositionCaseInsensitiveUTF8>;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ struct NameMultiSearchFirstPositionUTF8
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionMultiSearchFirstPositionUTF8
|
using FunctionMultiSearchFirstPositionUTF8
|
||||||
= FunctionsMultiStringSearch<MultiSearchFirstPositionImpl<PositionCaseSensitiveUTF8>, NameMultiSearchFirstPositionUTF8>;
|
= FunctionsMultiStringSearch<MultiSearchFirstPositionImpl<NameMultiSearchFirstPositionUTF8, PositionCaseSensitiveUTF8>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ struct NameNotILike
|
|||||||
static constexpr auto name = "notILike";
|
static constexpr auto name = "notILike";
|
||||||
};
|
};
|
||||||
|
|
||||||
using NotILikeImpl = MatchImpl<true, true, /*case-insensitive*/true>;
|
using NotILikeImpl = MatchImpl<NameNotILike, true, true, /*case-insensitive*/true>;
|
||||||
using FunctionNotILike = FunctionsStringSearch<NotILikeImpl, NameNotILike>;
|
using FunctionNotILike = FunctionsStringSearch<NotILikeImpl>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ struct NameNotLike
|
|||||||
static constexpr auto name = "notLike";
|
static constexpr auto name = "notLike";
|
||||||
};
|
};
|
||||||
|
|
||||||
using FunctionNotLike = FunctionsStringSearch<MatchImpl<true, true>, NameNotLike>;
|
using FunctionNotLike = FunctionsStringSearch<MatchImpl<NameNotLike, true, true>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ struct NamePosition
|
|||||||
static constexpr auto name = "position";
|
static constexpr auto name = "position";
|
||||||
};
|
};
|
||||||
|
|
||||||
using FunctionPosition = FunctionsStringSearch<PositionImpl<PositionCaseSensitiveASCII>, NamePosition>;
|
using FunctionPosition = FunctionsStringSearch<PositionImpl<NamePosition, PositionCaseSensitiveASCII>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ struct NamePositionCaseInsensitive
|
|||||||
static constexpr auto name = "positionCaseInsensitive";
|
static constexpr auto name = "positionCaseInsensitive";
|
||||||
};
|
};
|
||||||
|
|
||||||
using FunctionPositionCaseInsensitive = FunctionsStringSearch<PositionImpl<PositionCaseInsensitiveASCII>, NamePositionCaseInsensitive>;
|
using FunctionPositionCaseInsensitive = FunctionsStringSearch<PositionImpl<NamePositionCaseInsensitive, PositionCaseInsensitiveASCII>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ struct NamePositionCaseInsensitiveUTF8
|
|||||||
};
|
};
|
||||||
|
|
||||||
using FunctionPositionCaseInsensitiveUTF8
|
using FunctionPositionCaseInsensitiveUTF8
|
||||||
= FunctionsStringSearch<PositionImpl<PositionCaseInsensitiveUTF8>, NamePositionCaseInsensitiveUTF8>;
|
= FunctionsStringSearch<PositionImpl<NamePositionCaseInsensitiveUTF8, PositionCaseInsensitiveUTF8>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ struct NamePositionUTF8
|
|||||||
static constexpr auto name = "positionUTF8";
|
static constexpr auto name = "positionUTF8";
|
||||||
};
|
};
|
||||||
|
|
||||||
using FunctionPositionUTF8 = FunctionsStringSearch<PositionImpl<PositionCaseSensitiveUTF8>, NamePositionUTF8>;
|
using FunctionPositionUTF8 = FunctionsStringSearch<PositionImpl<NamePositionUTF8, PositionCaseSensitiveUTF8>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,10 +17,10 @@ struct ExtractBool
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct NameVisitParamExtractBool { static constexpr auto name = "visitParamExtractBool"; };
|
struct NameVisitParamExtractBool { static constexpr auto name = "visitParamExtractBool"; };
|
||||||
using FunctionVisitParamExtractBool = FunctionsStringSearch<ExtractParamImpl<ExtractBool>, NameVisitParamExtractBool>;
|
using FunctionVisitParamExtractBool = FunctionsStringSearch<ExtractParamImpl<NameVisitParamExtractBool, ExtractBool>>;
|
||||||
|
|
||||||
struct NameSimpleJSONExtractBool { static constexpr auto name = "simpleJSONExtractBool"; };
|
struct NameSimpleJSONExtractBool { static constexpr auto name = "simpleJSONExtractBool"; };
|
||||||
using FunctionSimpleJSONExtractBool = FunctionsStringSearch<ExtractParamImpl<ExtractBool>, NameSimpleJSONExtractBool>;
|
using FunctionSimpleJSONExtractBool = FunctionsStringSearch<ExtractParamImpl<NameSimpleJSONExtractBool, ExtractBool>>;
|
||||||
|
|
||||||
void registerFunctionVisitParamExtractBool(FunctionFactory & factory)
|
void registerFunctionVisitParamExtractBool(FunctionFactory & factory)
|
||||||
{
|
{
|
||||||
|
@ -7,10 +7,10 @@ namespace DB
|
|||||||
{
|
{
|
||||||
|
|
||||||
struct NameVisitParamExtractFloat { static constexpr auto name = "visitParamExtractFloat"; };
|
struct NameVisitParamExtractFloat { static constexpr auto name = "visitParamExtractFloat"; };
|
||||||
using FunctionVisitParamExtractFloat = FunctionsStringSearch<ExtractParamImpl<ExtractNumericType<Float64>>, NameVisitParamExtractFloat>;
|
using FunctionVisitParamExtractFloat = FunctionsStringSearch<ExtractParamImpl<NameVisitParamExtractFloat, ExtractNumericType<Float64>>>;
|
||||||
|
|
||||||
struct NameSimpleJSONExtractFloat { static constexpr auto name = "simpleJSONExtractFloat"; };
|
struct NameSimpleJSONExtractFloat { static constexpr auto name = "simpleJSONExtractFloat"; };
|
||||||
using FunctionSimpleJSONExtractFloat = FunctionsStringSearch<ExtractParamImpl<ExtractNumericType<Float64>>, NameSimpleJSONExtractFloat>;
|
using FunctionSimpleJSONExtractFloat = FunctionsStringSearch<ExtractParamImpl<NameSimpleJSONExtractFloat, ExtractNumericType<Float64>>>;
|
||||||
|
|
||||||
void registerFunctionVisitParamExtractFloat(FunctionFactory & factory)
|
void registerFunctionVisitParamExtractFloat(FunctionFactory & factory)
|
||||||
{
|
{
|
||||||
|
@ -7,10 +7,10 @@ namespace DB
|
|||||||
{
|
{
|
||||||
|
|
||||||
struct NameVisitParamExtractInt { static constexpr auto name = "visitParamExtractInt"; };
|
struct NameVisitParamExtractInt { static constexpr auto name = "visitParamExtractInt"; };
|
||||||
using FunctionVisitParamExtractInt = FunctionsStringSearch<ExtractParamImpl<ExtractNumericType<Int64>>, NameVisitParamExtractInt>;
|
using FunctionVisitParamExtractInt = FunctionsStringSearch<ExtractParamImpl<NameVisitParamExtractInt, ExtractNumericType<Int64>>>;
|
||||||
|
|
||||||
struct NameSimpleJSONExtractInt { static constexpr auto name = "simpleJSONExtractInt"; };
|
struct NameSimpleJSONExtractInt { static constexpr auto name = "simpleJSONExtractInt"; };
|
||||||
using FunctionSimpleJSONExtractInt = FunctionsStringSearch<ExtractParamImpl<ExtractNumericType<Int64>>, NameSimpleJSONExtractInt>;
|
using FunctionSimpleJSONExtractInt = FunctionsStringSearch<ExtractParamImpl<NameSimpleJSONExtractInt, ExtractNumericType<Int64>>>;
|
||||||
|
|
||||||
void registerFunctionVisitParamExtractInt(FunctionFactory & factory)
|
void registerFunctionVisitParamExtractInt(FunctionFactory & factory)
|
||||||
{
|
{
|
||||||
|
@ -7,10 +7,10 @@ namespace DB
|
|||||||
{
|
{
|
||||||
|
|
||||||
struct NameVisitParamExtractUInt { static constexpr auto name = "visitParamExtractUInt"; };
|
struct NameVisitParamExtractUInt { static constexpr auto name = "visitParamExtractUInt"; };
|
||||||
using FunctionVisitParamExtractUInt = FunctionsStringSearch<ExtractParamImpl<ExtractNumericType<UInt64>>, NameVisitParamExtractUInt>;
|
using FunctionVisitParamExtractUInt = FunctionsStringSearch<ExtractParamImpl<NameVisitParamExtractUInt, ExtractNumericType<UInt64>>>;
|
||||||
|
|
||||||
struct NameSimpleJSONExtractUInt { static constexpr auto name = "simpleJSONExtractUInt"; };
|
struct NameSimpleJSONExtractUInt { static constexpr auto name = "simpleJSONExtractUInt"; };
|
||||||
using FunctionSimpleJSONExtractUInt = FunctionsStringSearch<ExtractParamImpl<ExtractNumericType<UInt64>>, NameSimpleJSONExtractUInt>;
|
using FunctionSimpleJSONExtractUInt = FunctionsStringSearch<ExtractParamImpl<NameSimpleJSONExtractUInt, ExtractNumericType<UInt64>>>;
|
||||||
|
|
||||||
|
|
||||||
void registerFunctionVisitParamExtractUInt(FunctionFactory & factory)
|
void registerFunctionVisitParamExtractUInt(FunctionFactory & factory)
|
||||||
|
@ -17,10 +17,10 @@ struct HasParam
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct NameVisitParamHas { static constexpr auto name = "visitParamHas"; };
|
struct NameVisitParamHas { static constexpr auto name = "visitParamHas"; };
|
||||||
using FunctionVisitParamHas = FunctionsStringSearch<ExtractParamImpl<HasParam>, NameVisitParamHas>;
|
using FunctionVisitParamHas = FunctionsStringSearch<ExtractParamImpl<NameVisitParamHas, HasParam>>;
|
||||||
|
|
||||||
struct NameSimpleJSONHas { static constexpr auto name = "simpleJSONHas"; };
|
struct NameSimpleJSONHas { static constexpr auto name = "simpleJSONHas"; };
|
||||||
using FunctionSimpleJSONHas = FunctionsStringSearch<ExtractParamImpl<HasParam>, NameSimpleJSONHas>;
|
using FunctionSimpleJSONHas = FunctionsStringSearch<ExtractParamImpl<NameSimpleJSONHas, HasParam>>;
|
||||||
|
|
||||||
void registerFunctionVisitParamHas(FunctionFactory & factory)
|
void registerFunctionVisitParamHas(FunctionFactory & factory)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user