Skip to content

Commit

Permalink
fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
irenjj committed Feb 15, 2025
1 parent 6ad7a62 commit ad83ec7
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 4 deletions.
20 changes: 16 additions & 4 deletions datafusion-examples/examples/planner_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

use datafusion::error::Result;
use datafusion::logical_expr::{LogicalPlan, PlanType};
use datafusion::physical_plan::displayable;
use datafusion::physical_plan::{displayable, DisplayFormatType};
use datafusion::physical_planner::DefaultPhysicalPlanner;
use datafusion::prelude::*;

Expand Down Expand Up @@ -78,7 +78,11 @@ async fn to_physical_plan_in_one_api_demo(
println!(
"Physical plan direct from logical plan:\n\n{}\n\n",
displayable(physical_plan.as_ref())
.to_stringified(false, PlanType::InitialPhysicalPlan)
.to_stringified(
false,
PlanType::InitialPhysicalPlan,
DisplayFormatType::Default
)
.plan
);

Expand Down Expand Up @@ -120,7 +124,11 @@ async fn to_physical_plan_step_by_step_demo(
println!(
"Final physical plan:\n\n{}\n\n",
displayable(physical_plan.as_ref())
.to_stringified(false, PlanType::InitialPhysicalPlan)
.to_stringified(
false,
PlanType::InitialPhysicalPlan,
DisplayFormatType::Default
)
.plan
);

Expand All @@ -135,7 +143,11 @@ async fn to_physical_plan_step_by_step_demo(
println!(
"Optimized physical plan:\n\n{}\n\n",
displayable(physical_plan.as_ref())
.to_stringified(false, PlanType::InitialPhysicalPlan)
.to_stringified(
false,
PlanType::InitialPhysicalPlan,
DisplayFormatType::Default
)
.plan
);

Expand Down
3 changes: 3 additions & 0 deletions datafusion/core/src/physical_planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2721,6 +2721,9 @@ mod tests {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "NoOpExecutionPlan")
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions datafusion/core/tests/custom_sources_cases/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ impl DisplayAs for CustomExecutionPlan {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "CustomExecutionPlan: projection={:#?}", self.projection)
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ impl DisplayAs for CustomPlan {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "CustomPlan: batch_size={}", self.batches.len(),)
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions datafusion/core/tests/custom_sources_cases/statistics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ impl DisplayAs for StatisticsValidation {
self.stats.num_rows,
)
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions datafusion/core/tests/physical_optimizer/join_selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,9 @@ impl DisplayAs for UnboundedExec {
self.batch_produce.is_none(),
)
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down Expand Up @@ -1020,6 +1023,9 @@ impl DisplayAs for StatisticsExec {
self.stats.num_rows,
)
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions datafusion/core/tests/user_defined/user_defined_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,9 @@ impl DisplayAs for TopKExec {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "TopKExec: k={}", self.k)
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions datafusion/physical-plan/src/aggregates/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1800,6 +1800,9 @@ mod tests {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "TestYieldingExec")
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions datafusion/physical-plan/src/sorts/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,9 @@ mod tests {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "UnboundableExec",).unwrap()
}
DisplayFormatType::TreeRender => {
write!(f, "").unwrap() // TODO(renjj): add display info
}
}
Ok(())
}
Expand Down
3 changes: 3 additions & 0 deletions datafusion/physical-plan/src/sorts/sort_preserving_merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1389,6 +1389,9 @@ mod tests {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "CongestedExec",).unwrap()
}
DisplayFormatType::TreeRender => {
write!(f, "").unwrap() // TODO(renjj): add display info
}
}
Ok(())
}
Expand Down
18 changes: 18 additions & 0 deletions datafusion/physical-plan/src/test/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ impl DisplayAs for MockExec {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "MockExec")
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down Expand Up @@ -337,6 +340,9 @@ impl DisplayAs for BarrierExec {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "BarrierExec")
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down Expand Up @@ -449,6 +455,9 @@ impl DisplayAs for ErrorExec {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "ErrorExec")
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down Expand Up @@ -535,6 +544,9 @@ impl DisplayAs for StatisticsExec {
self.stats.num_rows,
)
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down Expand Up @@ -630,6 +642,9 @@ impl DisplayAs for BlockingExec {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "BlockingExec",)
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down Expand Up @@ -772,6 +787,9 @@ impl DisplayAs for PanicExec {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "PanicExec",)
}
DisplayFormatType::TreeRender => {
write!(f, "") // TODO(renjj): add display info
}
}
}
}
Expand Down

0 comments on commit ad83ec7

Please sign in to comment.