diff options
author | whatsername <whatsername@yandex-team.com> | 2024-03-21 12:38:52 +0300 |
---|---|---|
committer | whatsername <whatsername@yandex-team.com> | 2024-03-21 12:49:42 +0300 |
commit | f2d8ab4111c1f5dba066eb9df8a2ecd86cd8c192 (patch) | |
tree | 73ac9be80fb07e711b489a5ee6bcf2fcdda0f667 /yt/cpp/mapreduce/interface/common.cpp | |
parent | 345654a416ff6d02ba04db39de7e1965b47aa844 (diff) | |
download | ydb-f2d8ab4111c1f5dba066eb9df8a2ecd86cd8c192.tar.gz |
YT-18458: Introduce wide types into mapreduce interface
7ae047ef618cc44d7dd3e817dc27f2336d9e38c3
Diffstat (limited to 'yt/cpp/mapreduce/interface/common.cpp')
-rw-r--r-- | yt/cpp/mapreduce/interface/common.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/yt/cpp/mapreduce/interface/common.cpp b/yt/cpp/mapreduce/interface/common.cpp index 28f98713f6..0a46c0b583 100644 --- a/yt/cpp/mapreduce/interface/common.cpp +++ b/yt/cpp/mapreduce/interface/common.cpp @@ -192,6 +192,15 @@ static NTi::TTypePtr OldTypeToTypeV3(EValueType type) return NTi::Float(); case VT_JSON: return NTi::Json(); + + case VT_DATE32: + return NTi::Date32(); + case VT_DATETIME64: + return NTi::Datetime64(); + case VT_TIMESTAMP64: + return NTi::Timestamp64(); + case VT_INTERVAL64: + return NTi::Interval64(); } } @@ -254,6 +263,15 @@ static std::pair<EValueType, bool> Simplify(const NTi::TTypePtr& type) case ETypeName::Yson: return {VT_ANY, true}; + case ETypeName::Date32: + return {VT_DATE32, true}; + case ETypeName::Datetime64: + return {VT_DATETIME64, true}; + case ETypeName::Timestamp64: + return {VT_TIMESTAMP64, true}; + case ETypeName::Interval64: + return {VT_INTERVAL64, true}; + case ETypeName::Void: return {VT_VOID, false}; case ETypeName::Null: @@ -633,6 +651,15 @@ TString ToString(EValueType type) case VT_JSON: return "json"; + + case VT_DATE32: + return "date32"; + case VT_DATETIME64: + return "datetime64"; + case VT_TIMESTAMP64: + return "timestamp64"; + case VT_INTERVAL64: + return "interval64"; } ythrow yexception() << "Invalid value type " << static_cast<int>(type); } |