diff options
author | udovichenko-r <rvu@ydb.tech> | 2023-06-23 18:27:36 +0300 |
---|---|---|
committer | udovichenko-r <rvu@ydb.tech> | 2023-06-23 18:27:36 +0300 |
commit | ca821e2755b3f2f671c286bc46b6555bb478ef58 (patch) | |
tree | c62a6aec5f9a358be564024b0588dd50eb142e96 | |
parent | 12a7a365c8e3e2aadad38d0f654f302897f05c50 (diff) | |
download | ydb-ca821e2755b3f2f671c286bc46b6555bb478ef58.tar.gz |
[yql] Reset some fields in type annotation context on fallback
YQL-16128
-rw-r--r-- | ydb/library/yql/core/facade/yql_facade.cpp | 1 | ||||
-rw-r--r-- | ydb/library/yql/core/yql_type_annotation.cpp | 10 | ||||
-rw-r--r-- | ydb/library/yql/core/yql_type_annotation.h | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/ydb/library/yql/core/facade/yql_facade.cpp b/ydb/library/yql/core/facade/yql_facade.cpp index c4db14e367..7872f74a29 100644 --- a/ydb/library/yql/core/facade/yql_facade.cpp +++ b/ydb/library/yql/core/facade/yql_facade.cpp @@ -1095,6 +1095,7 @@ TFuture<IGraphTransformer::TStatus> TProgram::AsyncTransformWithFallback(bool ap for (auto source : TypeCtx_->DataSources) { source->Reset(); } + TypeCtx_->Reset(); CleanupLastSession(); std::function<void(const TIssuePtr& issue)> toInfo = [&](const TIssuePtr& issue) { diff --git a/ydb/library/yql/core/yql_type_annotation.cpp b/ydb/library/yql/core/yql_type_annotation.cpp index 5a76e4f3a7..275813e7bf 100644 --- a/ydb/library/yql/core/yql_type_annotation.cpp +++ b/ydb/library/yql/core/yql_type_annotation.cpp @@ -47,6 +47,16 @@ bool TTypeAnnotationContext::DoInitialize(TExprContext& ctx) { return true; } +void TTypeAnnotationContext::Reset() { + UdfImports.clear(); + UdfModules.clear(); + NodeToOperationId.clear(); + EvaluationInProgress = 0; + ExpectedTypes.clear(); + ExpectedConstraints.clear(); + ExpectedColumnOrders.clear(); +} + TString FormatColumnOrder(const TMaybe<TColumnOrder>& columnOrder) { TStringStream ss; if (columnOrder) { diff --git a/ydb/library/yql/core/yql_type_annotation.h b/ydb/library/yql/core/yql_type_annotation.h index 01c388d1b3..be99440e41 100644 --- a/ydb/library/yql/core/yql_type_annotation.h +++ b/ydb/library/yql/core/yql_type_annotation.h @@ -308,6 +308,8 @@ struct TTypeAnnotationContext: public TThrRefBase { bool IsConstraintCheckEnabled() const { return DisableConstraintCheck.find(TConstraint::Name()) == DisableConstraintCheck.end(); } + + void Reset(); }; template <> inline |