aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzverevgeny <zverevgeny@ydb.tech>2023-10-03 20:34:28 +0300
committerzverevgeny <zverevgeny@ydb.tech>2023-10-03 21:00:27 +0300
commit3a63610601211a234bbe414d4cadcc06b19019f5 (patch)
tree365e7679652b5125ce6705d6382bb720912d2519
parent52ca7521ffe85103d273de3ae3899ae676a3baa8 (diff)
downloadydb-3a63610601211a234bbe414d4cadcc06b19019f5.tar.gz
YQL-16443 move EMatchRecognizeStreamingMode out from TTypeAnnotationContext
-rw-r--r--ydb/library/yql/core/yql_opt_match_recognize.cpp6
-rw-r--r--ydb/library/yql/core/yql_type_annotation.h11
-rw-r--r--ydb/library/yql/providers/config/yql_config_provider.cpp6
3 files changed, 12 insertions, 11 deletions
diff --git a/ydb/library/yql/core/yql_opt_match_recognize.cpp b/ydb/library/yql/core/yql_opt_match_recognize.cpp
index 6350e42868..356fd67c2c 100644
--- a/ydb/library/yql/core/yql_opt_match_recognize.cpp
+++ b/ydb/library/yql/core/yql_opt_match_recognize.cpp
@@ -10,14 +10,14 @@ using namespace NNodes;
namespace {
bool IsStreaming(const TExprNode::TPtr& input, const TTypeAnnotationContext& typeAnnCtx) {
- if (TTypeAnnotationContext::EMatchRecognizeStreamingMode::Disable == typeAnnCtx.MatchRecognizeStreaming){
+ if (EMatchRecognizeStreamingMode::Disable == typeAnnCtx.MatchRecognizeStreaming){
return false;
}
- if (TTypeAnnotationContext::EMatchRecognizeStreamingMode::Force == typeAnnCtx.MatchRecognizeStreaming){
+ if (EMatchRecognizeStreamingMode::Force == typeAnnCtx.MatchRecognizeStreaming){
return true;
}
- YQL_ENSURE(TTypeAnnotationContext::EMatchRecognizeStreamingMode::Auto == typeAnnCtx.MatchRecognizeStreaming, "Internal logic error");
+ YQL_ENSURE(EMatchRecognizeStreamingMode::Auto == typeAnnCtx.MatchRecognizeStreaming, "Internal logic error");
bool hasPq = false;
NYql::VisitExpr(input, [&hasPq](const TExprNode::TPtr& node){
diff --git a/ydb/library/yql/core/yql_type_annotation.h b/ydb/library/yql/core/yql_type_annotation.h
index 1049da8143..b3717833c5 100644
--- a/ydb/library/yql/core/yql_type_annotation.h
+++ b/ydb/library/yql/core/yql_type_annotation.h
@@ -182,6 +182,12 @@ enum class ECostBasedOptimizerType {
Native /* "native" */
};
+enum class EMatchRecognizeStreamingMode {
+ Disable,
+ Auto,
+ Force,
+};
+
struct TUdfCachedInfo {
const TTypeAnnotationNode* FunctionType = nullptr;
const TTypeAnnotationNode* RunConfigType = nullptr;
@@ -244,11 +250,6 @@ struct TTypeAnnotationContext: public TThrRefBase {
IArrowResolver::TPtr ArrowResolver;
ECostBasedOptimizerType CostBasedOptimizer = ECostBasedOptimizerType::Disable;
bool MatchRecognize = false;
- enum class EMatchRecognizeStreamingMode {
- Disable,
- Auto,
- Force,
- };
EMatchRecognizeStreamingMode MatchRecognizeStreaming = EMatchRecognizeStreamingMode::Force;
i64 TimeOrderRecoverDelay = -10'000'000; //microseconds
i64 TimeOrderRecoverAhead = 10'000'000; //microseconds
diff --git a/ydb/library/yql/providers/config/yql_config_provider.cpp b/ydb/library/yql/providers/config/yql_config_provider.cpp
index 9507a7328b..0d3ad2331d 100644
--- a/ydb/library/yql/providers/config/yql_config_provider.cpp
+++ b/ydb/library/yql/providers/config/yql_config_provider.cpp
@@ -874,11 +874,11 @@ namespace {
}
const auto& arg = args[0];
if (arg == "disable") {
- Types.MatchRecognizeStreaming = TTypeAnnotationContext::EMatchRecognizeStreamingMode::Disable;
+ Types.MatchRecognizeStreaming = EMatchRecognizeStreamingMode::Disable;
} else if (arg == "auto") {
- Types.MatchRecognizeStreaming = TTypeAnnotationContext::EMatchRecognizeStreamingMode::Auto;
+ Types.MatchRecognizeStreaming = EMatchRecognizeStreamingMode::Auto;
} else if (arg == "force") {
- Types.MatchRecognizeStreaming = TTypeAnnotationContext::EMatchRecognizeStreamingMode::Force;
+ Types.MatchRecognizeStreaming = EMatchRecognizeStreamingMode::Force;
} else {
ctx.AddError(TIssue(pos, TStringBuilder() << "Expected `disable|auto|force', but got: " << args[0]));
return false;