aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorssmike <ssmike@ydb.tech>2023-07-10 13:02:45 +0300
committerssmike <ssmike@ydb.tech>2023-07-10 13:02:45 +0300
commite110593b0aa96daf210e4e36f1fd4687490d1db3 (patch)
treea49b131c2ad6fbb2c3e47808ce34d189d21b57e1
parentd2c766aee36d119869d022fac5b9b01bb93fd965 (diff)
downloadydb-e110593b0aa96daf210e4e36f1fd4687490d1db3.tar.gz
add rows limit
-rw-r--r--ydb/core/kqp/runtime/kqp_read_actor.cpp1
-rw-r--r--ydb/core/protos/tx_datashard.proto3
2 files changed, 4 insertions, 0 deletions
diff --git a/ydb/core/kqp/runtime/kqp_read_actor.cpp b/ydb/core/kqp/runtime/kqp_read_actor.cpp
index 3267aa6d45..160fd2cc26 100644
--- a/ydb/core/kqp/runtime/kqp_read_actor.cpp
+++ b/ydb/core/kqp/runtime/kqp_read_actor.cpp
@@ -848,6 +848,7 @@ public:
record.SetReverse(Settings.GetReverse());
if (limit) {
record.SetMaxRows(*limit);
+ record.SetTotalRowsLimit(*limit);
}
record.SetMaxBytes(Min<ui64>(record.GetMaxBytes(), BufSize));
diff --git a/ydb/core/protos/tx_datashard.proto b/ydb/core/protos/tx_datashard.proto
index 7b42f2f32f..82b31b4de4 100644
--- a/ydb/core/protos/tx_datashard.proto
+++ b/ydb/core/protos/tx_datashard.proto
@@ -1651,6 +1651,9 @@ message TEvRead {
// When specified requests are handled in reverse order as well as range reads
optional bool Reverse = 10;
+ // Limits total number of rows which iterator can read.
+ optional uint64 TotalRowsLimit = 12;
+
// Request must contain either keys, queries or program
// mixed requests are not supported