aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authora-romanov <Anton.Romanov@ydb.tech>2023-05-18 17:23:24 +0300
committera-romanov <Anton.Romanov@ydb.tech>2023-05-18 17:23:24 +0300
commitc39a36479af7e431510dc43f8d8bb0c408bf66a6 (patch)
tree8ba504457c74171a4c801fb3cf007ffc584b027a
parent07f2e8c1b3fc830d01173a674f99b371c3f62f97 (diff)
downloadydb-c39a36479af7e431510dc43f8d8bb0c408bf66a6.tar.gz
YQL-15983 fix.
-rw-r--r--ydb/library/yql/ast/yql_constraint.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/ydb/library/yql/ast/yql_constraint.cpp b/ydb/library/yql/ast/yql_constraint.cpp
index 1f14e5d207..355cfa3580 100644
--- a/ydb/library/yql/ast/yql_constraint.cpp
+++ b/ydb/library/yql/ast/yql_constraint.cpp
@@ -41,6 +41,8 @@ const TTypeAnnotationNode* TConstraintNode::GetSubTypeByPath(const TPathType& pa
switch (type.GetKind()) {
case ETypeAnnotationKind::Optional:
return GetSubTypeByPath(path, *type.Cast<TOptionalExprType>()->GetItemType());
+ case ETypeAnnotationKind::List: // TODO: Remove later: temporary stub for single AsList in FlatMap and same cases.
+ return GetSubTypeByPath(path, *type.Cast<TListExprType>()->GetItemType());
case ETypeAnnotationKind::Struct:
if (const auto itemType = type.Cast<TStructExprType>()->FindItemType(path.front()))
return GetSubTypeByPath(tail(path), *itemType);
@@ -2146,6 +2148,20 @@ void Out<NYql::TConstraintNode::TPathType>(IOutputStream& out, const NYql::TCons
}
template<>
+void Out<NYql::TConstraintNode::TSetType>(IOutputStream& out, const NYql::TConstraintNode::TSetType& c) {
+ out.Write('{');
+ bool first = true;
+ for (const auto& path : c) {
+ if (first)
+ first = false;
+ else
+ out.Write(',');
+ out << path;
+ }
+ out.Write('}');
+}
+
+template<>
void Out<NYql::TConstraintNode>(IOutputStream& out, const NYql::TConstraintNode& c) {
c.Out(out);
}