aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlukyan <lukyan@yandex-team.com>2024-09-26 17:02:42 +0300
committerlukyan <lukyan@yandex-team.com>2024-09-26 17:14:35 +0300
commit47e779420bb80722978c1ffd518245bffd886a50 (patch)
tree16ab39e95649f6e5c4f1dc821c0fa4520388e1ab
parent6d72638d465dbbe1f35357c054b99811b3821f53 (diff)
downloadydb-47e779420bb80722978c1ffd518245bffd886a50.tar.gz
YT-21484: Consider partition sizes in coordination by sample keys
commit_hash:56feb3c28bc4d963431d8f70140fd2ae2406da78
-rw-r--r--yt/yt/client/api/client_common.h2
-rw-r--r--yt/yt/client/driver/command-inl.h8
-rw-r--r--yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto2
3 files changed, 12 insertions, 0 deletions
diff --git a/yt/yt/client/api/client_common.h b/yt/yt/client/api/client_common.h
index 873be58c0c2..a5569fb074a 100644
--- a/yt/yt/client/api/client_common.h
+++ b/yt/yt/client/api/client_common.h
@@ -144,6 +144,8 @@ struct TSelectRowsOptionsBase
ui64 RangeExpansionLimit = 200000;
//! Limits maximum parallel subqueries.
int MaxSubqueries = std::numeric_limits<int>::max();
+ //! Limits parallel subqueries by row count.
+ ui64 MinRowCountPerSubquery = 100'000;
//! Path in Cypress with UDFs.
std::optional<TString> UdfRegistryPath;
//! If |true| then logging is more verbose.
diff --git a/yt/yt/client/driver/command-inl.h b/yt/yt/client/driver/command-inl.h
index a27f748e715..4b595a57dfa 100644
--- a/yt/yt/client/driver/command-inl.h
+++ b/yt/yt/client/driver/command-inl.h
@@ -392,6 +392,14 @@ void TSelectRowsCommandBase<
.GreaterThan(0)
.Optional(/*init*/ false);
+ registrar.template ParameterWithUniversalAccessor<ui64>(
+ "min_row_count_per_subquery",
+ [] (TThis* command) -> auto& {
+ return command->Options.MinRowCountPerSubquery;
+ })
+ .GreaterThan(0)
+ .Optional(/*init*/ false);
+
registrar.template ParameterWithUniversalAccessor<std::optional<TString>>(
"udf_registry_path",
[] (TThis* command) -> auto& {
diff --git a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto
index 6ea6f097d5c..54321bcc964 100644
--- a/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto
+++ b/yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto
@@ -638,6 +638,7 @@ message TReqSelectRows
optional int32 execution_backend = 23; // EExecutionBackend
optional NYT.NTableClient.NProto.TVersionedReadOptions versioned_read_options = 25;
optional bool use_lookup_cache = 26;
+ optional int64 min_row_count_per_subquery = 27;
optional TSuppressableAccessTrackingOptions suppressable_access_tracking_options = 104;
@@ -836,6 +837,7 @@ message TReqExplainQuery
optional string execution_pool = 11;
optional bool new_range_inference = 12;
optional int32 syntax_version = 13 [default = 1];
+ optional int64 min_row_count_per_subquery = 14;
}
message TRspExplainQuery