aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanilalexeev <danilalexeev@yandex-team.com>2024-12-03 15:27:55 +0300
committerdanilalexeev <danilalexeev@yandex-team.com>2024-12-03 15:45:06 +0300
commit52a4610df24d92b5eddc972e906fcd7e1fc110d0 (patch)
tree610b0c66c01dec5978a780f94344ec5f73337760
parent903fce90e7bb74cc7e086b68fc07ffe02d4818e3 (diff)
downloadydb-52a4610df24d92b5eddc972e906fcd7e1fc110d0.tar.gz
YT-23446: Support list with attributes in Sequoia
commit_hash:c91ebfc854a347d99aee712698e687ac6f21c7fc
-rw-r--r--yt/yt/core/ytree/node_detail.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/yt/yt/core/ytree/node_detail.cpp b/yt/yt/core/ytree/node_detail.cpp
index 5660cc43e71..4c319860749 100644
--- a/yt/yt/core/ytree/node_detail.cpp
+++ b/yt/yt/core/ytree/node_detail.cpp
@@ -313,14 +313,17 @@ void TMapNodeMixin::ListSelf(
? FromProto<TAttributeFilter>(request->attributes())
: TAttributeFilter();
- auto limit = request->has_limit()
- ? std::make_optional(request->limit())
- : std::nullopt;
+ auto limit = YT_PROTO_OPTIONAL(*request, limit);
context->SetRequestInfo("Limit: %v, AttributeFilter: %v",
limit,
attributeFilter);
+ if (limit && limit < 0) {
+ THROW_ERROR_EXCEPTION("Limit is negative")
+ << TErrorAttribute("limit", limit);
+ }
+
TAsyncYsonWriter writer;
auto children = GetChildren();