alamb commented on code in PR #9815:
URL: https://github.com/apache/arrow-datafusion/pull/9815#discussion_r1550411884
##########
datafusion/sqllogictest/test_files/repartition.slt:
##########
@@ -123,7 +123,7 @@ Limit: skip=0, fetch=5
physical_plan
GlobalLimitExec: skip=0, fetch=5
--CoalescePartitionsExec
-----CoalesceBatchesExec: target_batch_size=8192
+----CoalesceBatchesExec: target_batch_size=8192 fetch= 5
------FilterExec: c3@2 > 0
--------RepartitionExec: partitioning=RoundRobinBatch(3), input_partitions=1
----------StreamingTableExec: partition_sizes=1, projection=[c1, c2, c3],
infinite_source=true
Review Comment:
Shouldn't we also push the limit to the `StreamingTableExec` as well?
##########
datafusion/physical-plan/src/coalesce_batches.rs:
##########
@@ -216,7 +238,8 @@ impl CoalesceBatchesStream {
match input_batch {
Poll::Ready(x) => match x {
Some(Ok(batch)) => {
- if batch.num_rows() >= self.target_batch_size
+ if (batch.num_rows() >= self.target_batch_size
Review Comment:
I think we need some tests of this new logic added to repartition exec
##########
datafusion/physical-plan/src/limit.rs:
##########
@@ -167,6 +167,10 @@ impl ExecutionPlan for GlobalLimitExec {
// GlobalLimitExec requires a single input partition
if 1 != self.input.output_partitioning().partition_count() {
+ println!(
Review Comment:
I think this println should be removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]