This is an automated email from the ASF dual-hosted git repository.

dheres pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 69595a4845 modify emit() of TopK (#10030)
69595a4845 is described below

commit 69595a48458715aadffc56974665ebbafee35bd7
Author: JasonLi <[email protected]>
AuthorDate: Thu Apr 11 04:10:27 2024 +0800

    modify emit() of TopK (#10030)
---
 datafusion/physical-plan/src/topk/mod.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/datafusion/physical-plan/src/topk/mod.rs 
b/datafusion/physical-plan/src/topk/mod.rs
index 9120566273..6a77bfaf3c 100644
--- a/datafusion/physical-plan/src/topk/mod.rs
+++ b/datafusion/physical-plan/src/topk/mod.rs
@@ -208,7 +208,7 @@ impl TopK {
         // break into record batches as needed
         let mut batches = vec![];
         loop {
-            if batch.num_rows() < batch_size {
+            if batch.num_rows() <= batch_size {
                 batches.push(Ok(batch));
                 break;
             } else {

Reply via email to