mustafasrepo commented on code in PR #7129:
URL: https://github.com/apache/arrow-datafusion/pull/7129#discussion_r1277715398
##########
datafusion/core/src/physical_plan/aggregates/mod.rs:
##########
@@ -1885,6 +1933,134 @@ mod tests {
Ok(())
}
+ #[tokio::test]
+ async fn run_first_last_multi_partitions() -> Result<()> {
+ for use_coalesce_batches in [false, true] {
+ for is_first_acc in [false, true] {
+ first_last_multi_partitions(use_coalesce_batches,
is_first_acc).await?
+ }
+ }
+ Ok(())
+ }
+
+ // This function construct either physical plan below,
+ //
+ // "AggregateExec: mode=Final, gby=[a@0 as a], aggr=[FIRST_VALUE(b)]",
+ // " CoalesceBatchesExec: target_batch_size=1024",
+ // " CoalescePartitionsExec",
+ // " AggregateExec: mode=Partial, gby=[a@0 as a],
aggr=[FIRST_VALUE(b)], ordering_mode=None",
+ // " MemoryExec: partitions=4, partition_sizes=[1, 1, 1, 1]",
+ //
+ // or
+ //
+ // "AggregateExec: mode=Final, gby=[a@0 as a], aggr=[FIRST_VALUE(b)]",
+ // " CoalescePartitionsExec",
+ // " AggregateExec: mode=Partial, gby=[a@0 as a],
aggr=[FIRST_VALUE(b)], ordering_mode=None",
+ // " MemoryExec: partitions=4, partition_sizes=[1, 1, 1, 1]",
+ //
+ // and checks whether merge_batch for FIRST_VALUE AND LAST_VALUE
+ // works correctly.
+ async fn first_last_multi_partitions(
Review Comment:
This unit test is written to check for whether `merge_batch` method for
`first_value` and `last_value` works as expected.
--
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]