diff options
| author | achains <[email protected]> | 2025-09-23 15:38:31 +0300 |
|---|---|---|
| committer | achains <[email protected]> | 2025-09-23 16:23:09 +0300 |
| commit | 6e3513d8ec0b4f82b63c04f808d553e798c3ec5f (patch) | |
| tree | b4ae4cb7333fc85a7e5685e7f3c6d613965406a7 /yt/cpp/mapreduce/interface/serialize.cpp | |
| parent | 13183af1efa6b08ffa7a942d1282ee35f66094f2 (diff) | |
YT-26145: Revert visible changes for config serialization
<Message NOT for release notes>
* Changelog entry
Type: fix
Component: cpp-sdk
Revert breaking public changes in header files
commit_hash:e25a66243042b5961984505e6ecd67cb9f9f2635
Diffstat (limited to 'yt/cpp/mapreduce/interface/serialize.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/interface/serialize.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/yt/cpp/mapreduce/interface/serialize.cpp b/yt/cpp/mapreduce/interface/serialize.cpp index 869b39addb4..28a734a500b 100644 --- a/yt/cpp/mapreduce/interface/serialize.cpp +++ b/yt/cpp/mapreduce/interface/serialize.cpp @@ -572,40 +572,6 @@ void Deserialize(TTabletInfo& value, const TNode& node) DESERIALIZE_ITEM("barrier_timestamp", value.BarrierTimestamp) } -void Deserialize(TDuration& value, const TNode& node) -{ - switch (node.GetType()) { - case TNode::EType::Int64: { - auto ms = node.AsInt64(); - if (ms < 0) { - ythrow yexception() << "Duration cannot be negative"; - } - value = TDuration::MilliSeconds(static_cast<ui64>(ms)); - break; - } - - case TNode::EType::Uint64: - value = TDuration::MilliSeconds(node.AsUint64()); - break; - - case TNode::EType::Double: { - auto ms = node.AsDouble(); - if (ms < 0) { - ythrow yexception() << "Duration cannot be negative"; - } - value = TDuration::MicroSeconds(static_cast<ui64>(ms * 1'000.0)); - break; - } - - case TNode::EType::String: - value = TDuration::Parse(node.AsString()); - break; - - default: - ythrow yexception() << "Cannot parse duration from " << node.GetType(); - } -} - void Serialize(const NTi::TTypePtr& type, NYson::IYsonConsumer* consumer) { auto yson = NTi::NIo::SerializeYson(type.Get()); |
