aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-08-30 15:30:10 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-08-30 17:37:48 +0300
commit29e274a4ea4120f32e989dd3566b51362df6f7de (patch)
tree7a909dd0275140add197444c9065e2c45e16c775 /yt/cpp/mapreduce
parent9b34e4f5ca33d29cd33ff5c496601b956d09cd16 (diff)
downloadydb-29e274a4ea4120f32e989dd3566b51362df6f7de.tar.gz
Intermediate changes
Diffstat (limited to 'yt/cpp/mapreduce')
-rw-r--r--yt/cpp/mapreduce/client/skiff.cpp1
-rw-r--r--yt/cpp/mapreduce/interface/common.cpp8
-rw-r--r--yt/cpp/mapreduce/interface/common.h3
-rw-r--r--yt/cpp/mapreduce/interface/serialize.cpp2
4 files changed, 13 insertions, 1 deletions
diff --git a/yt/cpp/mapreduce/client/skiff.cpp b/yt/cpp/mapreduce/client/skiff.cpp
index f6e52f44e8..480ee4ef66 100644
--- a/yt/cpp/mapreduce/client/skiff.cpp
+++ b/yt/cpp/mapreduce/client/skiff.cpp
@@ -78,6 +78,7 @@ NSkiff::EWireType ValueTypeToSkiffType(EValueType valueType)
case VT_STRING:
case VT_UTF8:
case VT_JSON:
+ case VT_UUID:
return EWireType::String32;
case VT_ANY:
diff --git a/yt/cpp/mapreduce/interface/common.cpp b/yt/cpp/mapreduce/interface/common.cpp
index 0a46c0b583..831762fa95 100644
--- a/yt/cpp/mapreduce/interface/common.cpp
+++ b/yt/cpp/mapreduce/interface/common.cpp
@@ -201,6 +201,9 @@ static NTi::TTypePtr OldTypeToTypeV3(EValueType type)
return NTi::Timestamp64();
case VT_INTERVAL64:
return NTi::Interval64();
+
+ case VT_UUID:
+ return NTi::Uuid();
}
}
@@ -259,7 +262,7 @@ static std::pair<EValueType, bool> Simplify(const NTi::TTypePtr& type)
case ETypeName::Decimal:
return {VT_STRING, true};
case ETypeName::Uuid:
- break;
+ return {VT_UUID, true};
case ETypeName::Yson:
return {VT_ANY, true};
@@ -660,6 +663,9 @@ TString ToString(EValueType type)
return "timestamp64";
case VT_INTERVAL64:
return "interval64";
+
+ case VT_UUID:
+ return "uuid";
}
ythrow yexception() << "Invalid value type " << static_cast<int>(type);
}
diff --git a/yt/cpp/mapreduce/interface/common.h b/yt/cpp/mapreduce/interface/common.h
index 10988225dd..557f4ea6c4 100644
--- a/yt/cpp/mapreduce/interface/common.h
+++ b/yt/cpp/mapreduce/interface/common.h
@@ -412,6 +412,9 @@ enum EValueType : int
VT_TIMESTAMP64,
// Interval64, difference between two timestamps64 (signed)
VT_INTERVAL64,
+
+ // Universally unique identifier according to RFC-4122.
+ VT_UUID,
};
///
diff --git a/yt/cpp/mapreduce/interface/serialize.cpp b/yt/cpp/mapreduce/interface/serialize.cpp
index b195bf04d6..99f6f46b93 100644
--- a/yt/cpp/mapreduce/interface/serialize.cpp
+++ b/yt/cpp/mapreduce/interface/serialize.cpp
@@ -134,6 +134,8 @@ void Deserialize(EValueType& valueType, const TNode& node)
{"datetime64", VT_DATETIME64},
{"timestamp64", VT_TIMESTAMP64},
{"interval64", VT_INTERVAL64},
+
+ {"uuid", VT_UUID},
};
auto it = str2ValueType.find(nodeStr);