diff options
author | a-romanov <Anton.Romanov@ydb.tech> | 2023-05-18 17:23:24 +0300 |
---|---|---|
committer | a-romanov <Anton.Romanov@ydb.tech> | 2023-05-18 17:23:24 +0300 |
commit | c39a36479af7e431510dc43f8d8bb0c408bf66a6 (patch) | |
tree | 8ba504457c74171a4c801fb3cf007ffc584b027a | |
parent | 07f2e8c1b3fc830d01173a674f99b371c3f62f97 (diff) | |
download | ydb-c39a36479af7e431510dc43f8d8bb0c408bf66a6.tar.gz |
YQL-15983 fix.
-rw-r--r-- | ydb/library/yql/ast/yql_constraint.cpp | 16 |
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); } |