Skip to content

Commit a63cc00

Browse files
author
Vadim Averin
committed
Fix a bug in additional YPath attrs deserialization
1 parent 7fcfa07 commit a63cc00

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

ydb/library/yql/providers/yt/gateway/lib/yt_helpers.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,16 @@ TMaybe<TString> SerializeRichYPathAttrs(const NYT::TRichYPath& richPath) {
158158

159159
void DeserializeRichYPathAttrs(const TString& serializedAttrs, NYT::TRichYPath& richPath) {
160160
NYT::TNode attrsNode = NYT::NodeFromYsonString(serializedAttrs);
161-
auto originalYPath = richPath.Path_;
162-
NYT::TNode pathNode = "";
161+
162+
NYT::TNode oldNode;
163+
NYT::TNodeBuilder oldNodeBuilder(&oldNode);
164+
NYT::Serialize(richPath, &oldNodeBuilder);
165+
auto oldAttrsNode = oldNode.Attributes();
166+
167+
NYT::TNode pathNode = richPath.Path_;
168+
NYT::MergeNodes(attrsNode, oldAttrsNode);
163169
pathNode.Attributes() = attrsNode;
164170
NYT::Deserialize(richPath, pathNode);
165-
richPath.Path_ = originalYPath;
166171
}
167172

168173
IYtGateway::TCanonizedPath CanonizedPath(const TString& path) {

0 commit comments

Comments
 (0)