Skip to content

Interface for physical plan invariant checking. #13986

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

Merged
merged 12 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions datafusion/core/src/physical_optimizer/join_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ impl PhysicalOptimizerRule for JoinSelection {
fn schema_check(&self) -> bool {
true
}

/// [`JoinSelection`] is expected to produce invalid plans.
fn executable_check(&self, _previous_plan_is_valid: bool) -> bool {
false
}
}

/// Tries to create a [`HashJoinExec`] in [`PartitionMode::CollectLeft`] when possible.
Expand Down
5 changes: 5 additions & 0 deletions datafusion/core/src/physical_optimizer/sanity_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ impl PhysicalOptimizerRule for SanityCheckPlan {
fn schema_check(&self) -> bool {
true
}

/// [`SanityCheckPlan`] confirms the plan is executable.
fn executable_check(&self, _previous_plan_is_valid: bool) -> bool {
true
}
}

/// This function propagates finiteness information and rejects any plan with
Expand Down
Loading
Loading