diff options
author | cherepashka <cherepashka@yandex-team.com> | 2023-11-10 11:27:41 +0300 |
---|---|---|
committer | cherepashka <cherepashka@yandex-team.com> | 2023-11-10 11:51:02 +0300 |
commit | 54675e4b9824579d19358a06c4f1aa1c77e9e4d8 (patch) | |
tree | 76f4e80351a448bca848f64867344c35d495500f | |
parent | 377258f0c845be7c51a2b9a95c9d3555b72054e9 (diff) | |
download | ydb-54675e4b9824579d19358a06c4f1aa1c77e9e4d8.tar.gz |
YT-20351: yson scalars
Added scalars in prime implementation
Test for sequoia scalars
-rw-r--r-- | yt/yt/client/object_client/helpers.cpp | 11 | ||||
-rw-r--r-- | yt/yt/client/object_client/helpers.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/yt/yt/client/object_client/helpers.cpp b/yt/yt/client/object_client/helpers.cpp index e90a1d48972..902cdc29061 100644 --- a/yt/yt/client/object_client/helpers.cpp +++ b/yt/yt/client/object_client/helpers.cpp @@ -13,6 +13,17 @@ NYPath::TYPath FromObjectId(TObjectId id) return TString(ObjectIdPathPrefix) + ToString(id); } +bool IsScalarType(EObjectType type) +{ + return + type == EObjectType::StringNode || + type == EObjectType::Int64Node || + type == EObjectType::Uint64Node || + type == EObjectType::DoubleNode || + type == EObjectType::ListNode || + type == EObjectType::BooleanNode; +} + bool IsVersionedType(EObjectType type) { return diff --git a/yt/yt/client/object_client/helpers.h b/yt/yt/client/object_client/helpers.h index 3c57fa58e7b..57849c77901 100644 --- a/yt/yt/client/object_client/helpers.h +++ b/yt/yt/client/object_client/helpers.h @@ -18,6 +18,9 @@ namespace NYT::NObjectClient { //! |#|-prefix. extern const TStringBuf ObjectIdPathPrefix; +//! Function for temporary use: to gradually allow types supported in Sequoia. +bool IsScalarType(NObjectClient::EObjectType type); + //! Creates the YPath pointing to an object with a given #id. NYPath::TYPath FromObjectId(TObjectId id); |