Browse Source

Intermediate changes

robot-piglet 1 year ago
parent
commit
15e6154017

+ 2 - 0
yt/yt/client/api/client_common.h

@@ -153,6 +153,8 @@ struct TSelectRowsOptionsBase
     bool NewRangeInference = true;
     //! Enables canonical SQL behaviour for relational operators, i.e. null </=/> value -> null.
     bool UseCanonicalNullRelations = false;
+    //! Merge versioned rows from different stores when reading.
+    bool MergeVersionedRows = true;
 };
 
 struct TSelectRowsOptions

+ 1 - 0
yt/yt/client/api/rpc_proxy/client_base.cpp

@@ -1003,6 +1003,7 @@ TFuture<TSelectRowsResult> TClientBase::SelectRows(
     ToProto(req->mutable_suppressable_access_tracking_options(), options);
     req->set_replica_consistency(static_cast<NProto::EReplicaConsistency>(options.ReplicaConsistency));
     req->set_use_canonical_null_relations(options.UseCanonicalNullRelations);
+    req->set_merge_versioned_rows(options.MergeVersionedRows);
 
     return req->Invoke().Apply(BIND([] (const TApiServiceProxy::TRspSelectRowsPtr& rsp) {
         TSelectRowsResult result;

+ 7 - 0
yt/yt/client/driver/command-inl.h

@@ -419,6 +419,13 @@ void TSelectRowsCommandBase<
             return command->Options.UseCanonicalNullRelations;
         })
         .Optional(/*init*/ false);
+
+    registrar.template ParameterWithUniversalAccessor<bool>(
+        "merge_versioned_rows",
+        [] (TThis* command) -> auto& {
+            return command->Options.MergeVersionedRows;
+        })
+        .Optional(/*init*/ false);
 }
 
 ////////////////////////////////////////////////////////////////////////////////

+ 1 - 0
yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto

@@ -589,6 +589,7 @@ message TReqSelectRows
     optional bytes placeholder_values = 18; // YSON
     optional bool new_range_inference = 19;
     optional bool use_canonical_null_relations = 20;
+    optional bool merge_versioned_rows = 21;
 
     optional TSuppressableAccessTrackingOptions suppressable_access_tracking_options = 104;
 }