summaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Functions/FunctionsStringArray.cpp
diff options
context:
space:
mode:
authorAlexSm <[email protected]>2024-01-04 15:09:05 +0100
committerGitHub <[email protected]>2024-01-04 15:09:05 +0100
commitdab291146f6cd7d35684e3a1150e5bb1c412982c (patch)
tree36ef35f6cacb6432845a4a33f940c95871036b32 /contrib/clickhouse/src/Functions/FunctionsStringArray.cpp
parent63660ad5e7512029fd0218e7a636580695a24e1f (diff)
Library import 5, delete go dependencies (#832)
* Library import 5, delete go dependencies * Fix yt client
Diffstat (limited to 'contrib/clickhouse/src/Functions/FunctionsStringArray.cpp')
-rw-r--r--contrib/clickhouse/src/Functions/FunctionsStringArray.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/contrib/clickhouse/src/Functions/FunctionsStringArray.cpp b/contrib/clickhouse/src/Functions/FunctionsStringArray.cpp
deleted file mode 100644
index e7519068f44..00000000000
--- a/contrib/clickhouse/src/Functions/FunctionsStringArray.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <Functions/FunctionFactory.h>
-#include <Functions/FunctionsStringArray.h>
-
-namespace DB
-{
-namespace ErrorCodes
-{
- extern const int ILLEGAL_TYPE_OF_ARGUMENT;
- extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH;
-}
-
-DataTypePtr FunctionArrayStringConcat::getReturnTypeImpl(const DataTypes & arguments) const
-{
- if (arguments.size() != 1 && arguments.size() != 2)
- throw Exception(ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH,
- "Number of arguments for function {} doesn't match: passed {}, should be 1 or 2.",
- getName(), arguments.size());
-
- const DataTypeArray * array_type = checkAndGetDataType<DataTypeArray>(arguments[0].get());
- if (!array_type)
- throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "First argument for function {} must be an array.", getName());
-
- if (arguments.size() == 2 && !isString(arguments[1]))
- throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, "Second argument for function {} must be constant string.", getName());
-
- return std::make_shared<DataTypeString>();
-}
-
-REGISTER_FUNCTION(StringArray)
-{
- factory.registerFunction<FunctionExtractAll>();
-
- factory.registerFunction<FunctionSplitByAlpha>();
- factory.registerAlias("splitByAlpha", FunctionSplitByAlpha::name);
- factory.registerFunction<FunctionSplitByNonAlpha>();
- factory.registerFunction<FunctionSplitByWhitespace>();
- factory.registerFunction<FunctionSplitByChar>();
- factory.registerFunction<FunctionSplitByString>();
- factory.registerFunction<FunctionSplitByRegexp>();
- factory.registerFunction<FunctionArrayStringConcat>();
-}
-
-}