Repository navigation
feat: let custom ExecutionPlan nodes restrict themselves to a task's partitions #2721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4c9545d
03c13f1
ad87057
29493d9
7b4f699
c21e1d1
aef82ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -669,9 +669,11 @@ fn can_stay_inline(plan: &Arc<dyn ExecutionPlan>) -> bool { | |
|
|
||
| /// Whether per-task restriction can reduce `plan` to zero partitions. An empty | ||
| /// slice means "this task polls nothing here", so a branch that still reports a | ||
| /// partition afterwards is one that cannot be restricted away. | ||
| /// partition afterwards, or that the rewriter refuses, cannot be restricted | ||
| /// away. No resolver is passed, so a node Ballista does not know gets a stage | ||
| /// of its own. | ||
| fn restricts_to_nothing(plan: &Arc<dyn ExecutionPlan>) -> bool { | ||
| restrict_plan_to_partitions(plan.clone(), &[]) | ||
| restrict_plan_to_partitions(plan.clone(), &[], None) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed that passing
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Filed #2841. |
||
| .is_ok_and(|p| p.properties().output_partitioning().partition_count() == 0) | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that the guide points custom nodes at
slice_by_global_partition, its out-of-bounds error reaches users. As aDataFusionError::Internalit renders with "This issue was likely caused by a bug in DataFusion's code. Please help us ... file a bug report" (hit this from a resolver-backed node). Could it, andsingle_child, useplan_err!likechecked_restriction/ensure_leaf_runs_whole?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
slice_by_global_partitionandsingle_childnow returnplan_err!, in 29493d9.