diff options
author | sabdenovch <sabdenovch@yandex-team.com> | 2023-08-29 16:09:53 +0300 |
---|---|---|
committer | sabdenovch <sabdenovch@yandex-team.com> | 2023-08-29 21:03:59 +0300 |
commit | 40b1b7863a53543d2f46b95ef2c954837bd9cee1 (patch) | |
tree | 5057f906ff9c5e85909ee38690030ffa6819fdfc | |
parent | fc8bbca64a71cfe55f6877690cf6f421ab1536fd (diff) | |
download | ydb-40b1b7863a53543d2f46b95ef2c954837bd9cee1.tar.gz |
YT-19500: IS [NOT] NULL keywords added and an option for canonical null relations implemented
IS [NOT] NULL keywords and canonical Null relations implementation, see YT-19500
-rw-r--r-- | yt/yt/client/api/client_common.h | 2 | ||||
-rw-r--r-- | yt/yt/client/api/rpc_proxy/client_base.cpp | 3 | ||||
-rw-r--r-- | yt/yt/client/driver/table_commands.cpp | 2 | ||||
-rw-r--r-- | yt/yt_proto/yt/client/api/rpc_proxy/proto/api_service.proto | 1 |
4 files changed, 8 insertions, 0 deletions
diff --git a/yt/yt/client/api/client_common.h b/yt/yt/client/api/client_common.h index 730fc63ce30..6ee35ad28e4 100644 --- a/yt/yt/client/api/client_common.h +++ b/yt/yt/client/api/client_common.h @@ -151,6 +151,8 @@ struct TSelectRowsOptionsBase // COMPAT(lukyan) //! Use fixed and rewritten range inference. bool NewRangeInference = false; + //! Enables canonical sql behaviour for relational operators, i.e. null </=/> value -> null. + bool UseCanonicalNullRelations = false; }; struct TSelectRowsOptions diff --git a/yt/yt/client/api/rpc_proxy/client_base.cpp b/yt/yt/client/api/rpc_proxy/client_base.cpp index fdf04b64906..cbeb4a3c5eb 100644 --- a/yt/yt/client/api/rpc_proxy/client_base.cpp +++ b/yt/yt/client/api/rpc_proxy/client_base.cpp @@ -942,6 +942,9 @@ TFuture<TSelectRowsResult> TClientBase::SelectRows( req->set_memory_limit_per_node(options.MemoryLimitPerNode); ToProto(req->mutable_suppressable_access_tracking_options(), options); req->set_replica_consistency(static_cast<NProto::EReplicaConsistency>(options.ReplicaConsistency)); + if (options.UseCanonicalNullRelations) { + req->set_use_canonical_null_relations(options.UseCanonicalNullRelations); + } return req->Invoke().Apply(BIND([] (const TApiServiceProxy::TRspSelectRowsPtr& rsp) { TSelectRowsResult result; diff --git a/yt/yt/client/driver/table_commands.cpp b/yt/yt/client/driver/table_commands.cpp index 71e8d252ea8..9b002b07154 100644 --- a/yt/yt/client/driver/table_commands.cpp +++ b/yt/yt/client/driver/table_commands.cpp @@ -651,6 +651,8 @@ TSelectRowsCommand::TSelectRowsCommand() .Optional(); RegisterParameter("placeholder_values", PlaceholderValues) .Optional(); + RegisterParameter("use_canonical_null_relations", Options.UseCanonicalNullRelations) + .Optional(); } bool TSelectRowsCommand::HasResponseParameters() const 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 bb55dc5f05b..79615ae6a86 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 @@ -587,6 +587,7 @@ message TReqSelectRows optional EReplicaConsistency replica_consistency = 17; optional bytes placeholder_values = 18; // YSON optional bool new_range_inference = 19; + optional bool use_canonical_null_relations = 20; optional TSuppressableAccessTrackingOptions suppressable_access_tracking_options = 104; } |