Skip to content

Commit

Permalink
qplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
vitstn committed Oct 24, 2024
1 parent 431d928 commit 11296fd
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class TResolver : public IUdfResolver {

TString SaveValue(const TFunction* f) const {
auto node = NYT::TNode()
("NormalizedName", f->NormalizedName)
("CallableType", TypeToYsonNode(f->CallableType));
if (f->NormalizedUserType && f->NormalizedUserType->GetKind() != ETypeAnnotationKind::Void) {
node("NormalizedUserType", TypeToYsonNode(f->NormalizedUserType));
Expand All @@ -131,6 +132,12 @@ class TResolver : public IUdfResolver {

void LoadValue(TFunction* f, const TString& value, TExprContext& ctx) const {
auto node = NYT::NodeFromYsonString(value);
if (node.HasKey("NormalizedName")) {
f->NormalizedName = node["NormalizedName"].AsString();
} else {
f->NormalizedName = f->Name;
}

f->CallableType = ParseTypeFromYson(node["CallableType"], ctx);
if (node.HasKey("NormalizedUserType")) {
f->NormalizedUserType = ParseTypeFromYson(node["NormalizedUserType"], ctx);
Expand Down

0 comments on commit 11296fd

Please sign in to comment.