aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchertus <azuikov@ydb.tech>2023-02-17 17:05:17 +0300
committerchertus <azuikov@ydb.tech>2023-02-17 17:05:17 +0300
commit3e7759b1382ed1cfdf47c30c48eeeac42501191d (patch)
tree4d12874111555dbd5dec8b2869f52d6b8e271e86
parent9fdcc21abaf462034fe31a2eb8fe8e460be98f8a (diff)
downloadydb-3e7759b1382ed1cfdf47c30c48eeeac42501191d.tar.gz
passthrough string kernels
-rw-r--r--ydb/core/formats/program.cpp9
-rw-r--r--ydb/core/protos/ssa.proto3
-rw-r--r--ydb/core/tx/columnshard/columnshard_common.cpp6
-rw-r--r--ydb/library/arrow_kernels/operations.h3
4 files changed, 21 insertions, 0 deletions
diff --git a/ydb/core/formats/program.cpp b/ydb/core/formats/program.cpp
index b4cadbd9a1..23ea3d120b 100644
--- a/ydb/core/formats/program.cpp
+++ b/ydb/core/formats/program.cpp
@@ -123,6 +123,12 @@ const char * GetFunctionName(EOperation op) {
return "binary_length";
case EOperation::MatchSubstring:
return "match_substring";
+ case EOperation::MatchLike:
+ return "match_like";
+ case EOperation::StartsWith:
+ return "starts_with";
+ case EOperation::EndsWith:
+ return "ends_with";
case EOperation::Acosh:
return "acosh";
@@ -187,6 +193,9 @@ EOperation ValidateOperation(EOperation op, ui32 argsSize) {
case EOperation::Greater:
case EOperation::GreaterEqual:
case EOperation::MatchSubstring:
+ case EOperation::MatchLike:
+ case EOperation::StartsWith:
+ case EOperation::EndsWith:
case EOperation::And:
case EOperation::Or:
case EOperation::Xor:
diff --git a/ydb/core/protos/ssa.proto b/ydb/core/protos/ssa.proto
index de4eeabe0a..9ba916f1be 100644
--- a/ydb/core/protos/ssa.proto
+++ b/ydb/core/protos/ssa.proto
@@ -74,6 +74,9 @@ message TProgram {
FUNC_CAST_TO_BINARY = 29;
FUNC_CAST_TO_FIXED_SIZE_BINARY = 30;
FUNC_CAST_TO_TIMESTAMP = 31;
+ FUNC_STR_MATCH_LIKE = 32;
+ FUNC_STR_STARTS_WITH = 33;
+ FUNC_STR_ENDS_WITH = 34;
}
message TFunction {
diff --git a/ydb/core/tx/columnshard/columnshard_common.cpp b/ydb/core/tx/columnshard/columnshard_common.cpp
index f4c74b4d5c..d1a15b9b02 100644
--- a/ydb/core/tx/columnshard/columnshard_common.cpp
+++ b/ydb/core/tx/columnshard/columnshard_common.cpp
@@ -108,6 +108,12 @@ TAssign MakeFunction(const TContext& info, const std::string& name,
return TAssign(name, EOperation::BinaryLength, std::move(arguments));
case TId::FUNC_STR_MATCH:
return TAssign(name, EOperation::MatchSubstring, std::move(arguments));
+ case TId::FUNC_STR_MATCH_LIKE:
+ return TAssign(name, EOperation::MatchLike, std::move(arguments));
+ case TId::FUNC_STR_STARTS_WITH:
+ return TAssign(name, EOperation::StartsWith, std::move(arguments));
+ case TId::FUNC_STR_ENDS_WITH:
+ return TAssign(name, EOperation::EndsWith, std::move(arguments));
case TId::FUNC_BINARY_NOT:
return TAssign(name, EOperation::Invert, std::move(arguments));
case TId::FUNC_BINARY_AND:
diff --git a/ydb/library/arrow_kernels/operations.h b/ydb/library/arrow_kernels/operations.h
index 02f04ce75f..f9dafc4b50 100644
--- a/ydb/library/arrow_kernels/operations.h
+++ b/ydb/library/arrow_kernels/operations.h
@@ -52,6 +52,9 @@ enum class EOperation {
//
BinaryLength,
MatchSubstring,
+ MatchLike,
+ StartsWith,
+ EndsWith,
// math
Acosh,
Atanh,