summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/interface/common.cpp
diff options
context:
space:
mode:
authorasamoylov22 <[email protected]>2025-02-28 10:12:12 +0300
committerasamoylov22 <[email protected]>2025-02-28 10:43:22 +0300
commit54f08bc197a13725ddf51da1c507d9ea82bedd53 (patch)
tree4a800420a963ade4fae11680bdaafaae84141137 /yt/cpp/mapreduce/interface/common.cpp
parent470831e624146d43911f84cb3fd27b8685f14e37 (diff)
Add equality operator to TReadRange
commit_hash:2d5c53592a60605013dc6de0e7030f2c80ec3ac3
Diffstat (limited to 'yt/cpp/mapreduce/interface/common.cpp')
-rw-r--r--yt/cpp/mapreduce/interface/common.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/yt/cpp/mapreduce/interface/common.cpp b/yt/cpp/mapreduce/interface/common.cpp
index 966be8341f4..7abbef91277 100644
--- a/yt/cpp/mapreduce/interface/common.cpp
+++ b/yt/cpp/mapreduce/interface/common.cpp
@@ -552,6 +552,28 @@ TKeyBound::TKeyBound(ERelation relation, TKey key)
, Key_(std::move(key))
{ }
+bool operator==(const TKeyBound& lhs, const TKeyBound& rhs) noexcept
+{
+ return lhs.Key() == rhs.Key() && lhs.Relation() == rhs.Relation();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+bool operator==(const TReadLimit& lhs, const TReadLimit& rhs) noexcept
+{
+ return lhs.Key_ == rhs.Key_ && lhs.RowIndex_ == rhs.RowIndex_ &&
+ lhs.Offset_ == rhs.Offset_ && lhs.TabletIndex_ == rhs.TabletIndex_ &&
+ lhs.KeyBound_ == rhs.KeyBound_;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+bool operator==(const TReadRange& lhs, const TReadRange& rhs) noexcept
+{
+ return lhs.LowerLimit_ == rhs.LowerLimit_ &&
+ lhs.UpperLimit_ == rhs.UpperLimit_ && lhs.Exact_ == rhs.Exact_;
+}
+
////////////////////////////////////////////////////////////////////////////////
TTableSchema CreateTableSchema(