diff options
author | fedor-miron <fedor-miron@yandex-team.com> | 2023-09-05 14:40:38 +0300 |
---|---|---|
committer | fedor-miron <fedor-miron@yandex-team.com> | 2023-09-05 14:56:06 +0300 |
commit | 214fbbe0fe66c73c1aadbf3a61140ac59569b764 (patch) | |
tree | 52409538dbf877ca0e575b6d6cd82ff845d8a566 /yt/cpp | |
parent | d61c519131bad6ab54eaedcd218f55ee403bb83f (diff) | |
download | ydb-214fbbe0fe66c73c1aadbf3a61140ac59569b764.tar.gz |
YQL-16444: fix empty prefix for yt batch list
Diffstat (limited to 'yt/cpp')
-rw-r--r-- | yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp b/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp index 1936266d0d..30f0fb3b9d 100644 --- a/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp +++ b/yt/cpp/mapreduce/raw_client/rpc_parameters_serialization.cpp @@ -34,7 +34,13 @@ static void SetOperationIdParam(TNode* node, const TOperationId& operationId) static void SetPathParam(TNode* node, const TString& pathPrefix, const TYPath& path) { - (*node)["path"] = AddPathPrefix(path, pathPrefix); + TYPath updatedPath = AddPathPrefix(path, pathPrefix); + // Translate "//" to "/" + // Translate "//some/constom/prefix/from/config/" to "//some/constom/prefix/from/config" + if (path.empty() && updatedPath.EndsWith('/')) { + updatedPath.pop_back(); + } + (*node)["path"] = std::move(updatedPath); } static TNode SerializeAttributeFilter(const TAttributeFilter& attributeFilter) |