Skip to content

Commit f1b1bd8

Browse files
committed
fix ut: test_no_pushdown_through_aggregates & test_plan_with_order_preserving_variants_preserves_fetch
1 parent deaf2e2 commit f1b1bd8

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

datafusion/core/tests/physical_optimizer/filter_pushdown/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ fn test_no_pushdown_through_aggregates() {
276276
Ok:
277277
- FilterExec: b@1 = bar
278278
- CoalesceBatchesExec: target_batch_size=100
279-
- AggregateExec: mode=Final, gby=[a@0 as a, b@1 as b], aggr=[cnt]
279+
- AggregateExec: mode=Final, gby=[a@0 as a, b@1 as b], aggr=[cnt], ordering_mode=PartiallySorted([0])
280280
- CoalesceBatchesExec: target_batch_size=10
281281
- DataSourceExec: file_groups={1 group: [[test.paqruet]]}, projection=[a, b, c], file_type=test, pushdown_supported=true, predicate=a@0 = foo
282282
"

datafusion/physical-optimizer/src/enforce_sorting/replace_with_order_preserving_variants.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,6 @@ pub fn plan_with_order_preserving_variants(
139139
return Ok(sort_input);
140140
} else if is_coalesce_partitions(&sort_input.plan) && is_spm_better {
141141
let child = &sort_input.children[0].plan;
142-
let mut fetch = fetch;
143-
if let Some(coalesce_fetch) = sort_input.plan.fetch() {
144-
// Get the min fetch between the `fetch` and the coalesce's fetch:
145-
fetch = Some(coalesce_fetch.min(fetch.unwrap_or(usize::MAX)))
146-
};
147142
if let Some(ordering) = child.output_ordering() {
148143
let mut fetch = fetch;
149144
if let Some(coalesce_fetch) = sort_input.plan.fetch() {

0 commit comments

Comments
 (0)