aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp
diff options
context:
space:
mode:
authorachulkov2 <achulkov2@yandex-team.com>2023-08-11 13:24:17 +0300
committerachulkov2 <achulkov2@yandex-team.com>2023-08-11 14:45:30 +0300
commitf2dd52a9b24467877c3de53794427a4f05bd60fd (patch)
treefe3af7328405a945e46948a54c0c806eb670b64d /yt/cpp
parent9e6050fec916ace48ca19e7025f3275eb1f10d60 (diff)
downloadydb-f2dd52a9b24467877c3de53794427a4f05bd60fd.tar.gz
Improve TRawBatchRequest::CanonizeYPath
Diffstat (limited to 'yt/cpp')
-rw-r--r--yt/cpp/mapreduce/raw_client/raw_batch_request.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/yt/cpp/mapreduce/raw_client/raw_batch_request.cpp b/yt/cpp/mapreduce/raw_client/raw_batch_request.cpp
index be81f5a21a..8ede410c38 100644
--- a/yt/cpp/mapreduce/raw_client/raw_batch_request.cpp
+++ b/yt/cpp/mapreduce/raw_client/raw_batch_request.cpp
@@ -552,17 +552,20 @@ TFuture<void> TRawBatchRequest::UpdateOperationParameters(
TFuture<TRichYPath> TRawBatchRequest::CanonizeYPath(const TRichYPath& path)
{
- if (path.Path_.find_first_of("<>{}[]") != TString::npos) {
+ TRichYPath result = path;
+ // Out of the symbols in the canonization branch below, only '<' can appear in the beggining of a valid rich YPath.
+ if (!result.Path_.StartsWith("<")) {
+ result.Path_ = AddPathPrefix(result.Path_, Config_->Prefix);
+ }
+
+ if (result.Path_.find_first_of("<>{}[]") != TString::npos) {
return AddRequest<TCanonizeYPathResponseParser>(
"parse_ypath",
- SerializeParamsForParseYPath(path),
+ SerializeParamsForParseYPath(result),
Nothing(),
- MakeIntrusive<TCanonizeYPathResponseParser>(Config_->Prefix, path));
- } else {
- TRichYPath result = path;
- result.Path_ = AddPathPrefix(result.Path_, Config_->Prefix);
- return NThreading::MakeFuture(result);
+ MakeIntrusive<TCanonizeYPathResponseParser>(Config_->Prefix, result));
}
+ return NThreading::MakeFuture(result);
}
TFuture<TVector<TTableColumnarStatistics>> TRawBatchRequest::GetTableColumnarStatistics(