diff options
author | hiddenpath <hiddenpath@yandex-team.com> | 2025-01-11 21:53:09 +0300 |
---|---|---|
committer | hiddenpath <hiddenpath@yandex-team.com> | 2025-01-11 22:07:49 +0300 |
commit | 849c2c67c7a818b682a11f6e92f7ff4a07e1a1cf (patch) | |
tree | a8bd2e5989b9fc4f5da36c4bdd558884a7b81620 | |
parent | 4f4c1325f996d43c055f75ae04c3fb1d88efa87f (diff) | |
download | ydb-849c2c67c7a818b682a11f6e92f7ff4a07e1a1cf.tar.gz |
Do not explicitly require config fields in GetColumnarStatistics and PartitionTable methods as they being optional in proto schema
commit_hash:4b57b599379f2a9a6034d96f0608d8cc0c5e4b77
-rw-r--r-- | yt/yt/client/api/rpc_proxy/client_impl.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/yt/yt/client/api/rpc_proxy/client_impl.cpp b/yt/yt/client/api/rpc_proxy/client_impl.cpp index 5c90b89d18..6ace94bcb9 100644 --- a/yt/yt/client/api/rpc_proxy/client_impl.cpp +++ b/yt/yt/client/api/rpc_proxy/client_impl.cpp @@ -1715,9 +1715,13 @@ TFuture<std::vector<TColumnarStatistics>> TClient::GetColumnarStatistics( req->set_fetcher_mode(static_cast<NProto::EColumnarStatisticsFetcherMode>(options.FetcherMode)); - ToProto(req->mutable_fetch_chunk_spec_config(), options.FetchChunkSpecConfig); + if (options.FetchChunkSpecConfig) { + ToProto(req->mutable_fetch_chunk_spec_config(), options.FetchChunkSpecConfig); + } - ToProto(req->mutable_fetcher_config(), options.FetcherConfig); + if (options.FetcherConfig) { + ToProto(req->mutable_fetcher_config(), options.FetcherConfig); + } req->set_enable_early_finish(options.EnableEarlyFinish); @@ -1745,12 +1749,18 @@ TFuture<NApi::TMultiTablePartitions> TClient::PartitionTables( req->add_paths(ToString(path)); } - ToProto(req->mutable_fetch_chunk_spec_config(), options.FetchChunkSpecConfig); + if (options.FetchChunkSpecConfig) { + ToProto(req->mutable_fetch_chunk_spec_config(), options.FetchChunkSpecConfig); + } - ToProto(req->mutable_fetcher_config(), options.FetcherConfig); + if (options.FetcherConfig) { + ToProto(req->mutable_fetcher_config(), options.FetcherConfig); + } - req->mutable_chunk_slice_fetcher_config()->set_max_slices_per_fetch( - options.ChunkSliceFetcherConfig->MaxSlicesPerFetch); + if (options.ChunkSliceFetcherConfig) { + req->mutable_chunk_slice_fetcher_config()->set_max_slices_per_fetch( + options.ChunkSliceFetcherConfig->MaxSlicesPerFetch); + } req->set_partition_mode(static_cast<NProto::EPartitionTablesMode>(options.PartitionMode)); |