Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mertak-synnada committed Aug 14, 2024
1 parent 4472e15 commit eb96912
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion datafusion/core/src/physical_optimizer/enforce_sorting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ mod tests {
" MemoryExec: partitions=1, partition_sizes=[0]",
];
let expected_optimized = [
"LocalLimitExec: fetch=2",
"GlobalLimitExec: skip=0, fetch=2",
" SortExec: expr=[non_nullable_col@1 ASC,nullable_col@0 ASC], preserve_partitioning=[false]",
" MemoryExec: partitions=1, partition_sizes=[0]",
];
Expand Down
8 changes: 4 additions & 4 deletions datafusion/core/tests/physical_optimizer/limit_pushdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ fn transforms_coalesce_batches_exec_into_fetching_version_and_removes_local_limi
LimitPushdown::new().optimize(global_limit, &ConfigOptions::new())?;

let expected = [
"LocalLimitExec: fetch=5",
"GlobalLimitExec: skip=0, fetch=5",
" CoalescePartitionsExec",
" CoalesceBatchesExec: target_batch_size=8192, fetch=5",
" FilterExec: c3@2 > 0",
Expand Down Expand Up @@ -163,7 +163,7 @@ fn pushes_global_limit_exec_through_projection_exec() -> datafusion_common::Resu

let expected = [
"ProjectionExec: expr=[c1@0 as c1, c2@1 as c2, c3@2 as c3]",
" LocalLimitExec: fetch=5",
" GlobalLimitExec: skip=0, fetch=5",
" FilterExec: c3@2 > 0",
" StreamingTableExec: partition_sizes=1, projection=[c1, c2, c3], infinite_source=true"
];
Expand Down Expand Up @@ -274,7 +274,7 @@ fn keeps_pushed_local_limit_exec_when_there_are_multiple_input_partitions(
LimitPushdown::new().optimize(global_limit, &ConfigOptions::new())?;

let expected = [
"LocalLimitExec: fetch=5",
"GlobalLimitExec: skip=0, fetch=5",
" CoalescePartitionsExec",
" FilterExec: c3@2 > 0",
" RepartitionExec: partitioning=RoundRobinBatch(8), input_partitions=1",
Expand Down Expand Up @@ -304,7 +304,7 @@ fn merges_local_limit_with_local_limit() -> datafusion_common::Result<()> {
let after_optimize =
LimitPushdown::new().optimize(parent_local_limit, &ConfigOptions::new())?;

let expected = ["LocalLimitExec: fetch=10", " EmptyExec"];
let expected = ["GlobalLimitExec: skip=0, fetch=10", " EmptyExec"];
assert_eq!(get_plan_string(&after_optimize), expected);

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/tests/sql/explain_analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async fn explain_analyze_baseline_metrics() {
);
assert_metrics!(
&formatted,
"LocalLimitExec: fetch=3, ",
"GlobalLimitExec: skip=0, fetch=3, ",
"metrics=[output_rows=3, elapsed_compute="
);
assert_metrics!(
Expand Down

0 comments on commit eb96912

Please sign in to comment.