diff options
author | ermolovd <ermolovd@yandex-team.com> | 2023-08-09 11:29:59 +0300 |
---|---|---|
committer | ermolovd <ermolovd@yandex-team.com> | 2023-08-09 12:55:34 +0300 |
commit | 3f3b51f52a4aa04dd85c2d5da91e8d4db2b64444 (patch) | |
tree | f78a857132be75d336f9a0621cf76a2b967a89ba /yt/cpp | |
parent | db046becbe9b9ee859ebc395410df2b251b01990 (diff) | |
download | ydb-3f3b51f52a4aa04dd85c2d5da91e8d4db2b64444.tar.gz |
YT-19445: do not write sort_by if it's empty
Diffstat (limited to 'yt/cpp')
-rw-r--r-- | yt/cpp/mapreduce/client/operation.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yt/cpp/mapreduce/client/operation.cpp b/yt/cpp/mapreduce/client/operation.cpp index fc1600c240..a14a8b330c 100644 --- a/yt/cpp/mapreduce/client/operation.cpp +++ b/yt/cpp/mapreduce/client/operation.cpp @@ -1144,7 +1144,9 @@ void DoExecuteReduce( operationIo.OutputFormat, fluent); }) - .Item("sort_by").Value(spec.SortBy_) + .DoIf(!spec.SortBy_.Parts_.empty(), [&] (TFluentMap fluent) { + fluent.Item("sort_by").Value(spec.SortBy_); + }) .Item("reduce_by").Value(spec.ReduceBy_) .DoIf(spec.JoinBy_.Defined(), [&] (TFluentMap fluent) { fluent.Item("join_by").Value(spec.JoinBy_.GetRef()); |