Skip to content

Commit ad83ec7

Browse files
committed
fix compile errors
1 parent 6ad7a62 commit ad83ec7

File tree

11 files changed

+64
-4
lines changed

11 files changed

+64
-4
lines changed

datafusion-examples/examples/planner_api.rs

+16-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
use datafusion::error::Result;
1919
use datafusion::logical_expr::{LogicalPlan, PlanType};
20-
use datafusion::physical_plan::displayable;
20+
use datafusion::physical_plan::{displayable, DisplayFormatType};
2121
use datafusion::physical_planner::DefaultPhysicalPlanner;
2222
use datafusion::prelude::*;
2323

@@ -78,7 +78,11 @@ async fn to_physical_plan_in_one_api_demo(
7878
println!(
7979
"Physical plan direct from logical plan:\n\n{}\n\n",
8080
displayable(physical_plan.as_ref())
81-
.to_stringified(false, PlanType::InitialPhysicalPlan)
81+
.to_stringified(
82+
false,
83+
PlanType::InitialPhysicalPlan,
84+
DisplayFormatType::Default
85+
)
8286
.plan
8387
);
8488

@@ -120,7 +124,11 @@ async fn to_physical_plan_step_by_step_demo(
120124
println!(
121125
"Final physical plan:\n\n{}\n\n",
122126
displayable(physical_plan.as_ref())
123-
.to_stringified(false, PlanType::InitialPhysicalPlan)
127+
.to_stringified(
128+
false,
129+
PlanType::InitialPhysicalPlan,
130+
DisplayFormatType::Default
131+
)
124132
.plan
125133
);
126134

@@ -135,7 +143,11 @@ async fn to_physical_plan_step_by_step_demo(
135143
println!(
136144
"Optimized physical plan:\n\n{}\n\n",
137145
displayable(physical_plan.as_ref())
138-
.to_stringified(false, PlanType::InitialPhysicalPlan)
146+
.to_stringified(
147+
false,
148+
PlanType::InitialPhysicalPlan,
149+
DisplayFormatType::Default
150+
)
139151
.plan
140152
);
141153

datafusion/core/src/physical_planner.rs

+3
Original file line numberDiff line numberDiff line change
@@ -2721,6 +2721,9 @@ mod tests {
27212721
DisplayFormatType::Default | DisplayFormatType::Verbose => {
27222722
write!(f, "NoOpExecutionPlan")
27232723
}
2724+
DisplayFormatType::TreeRender => {
2725+
write!(f, "") // TODO(renjj): add display info
2726+
}
27242727
}
27252728
}
27262729
}

datafusion/core/tests/custom_sources_cases/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ impl DisplayAs for CustomExecutionPlan {
138138
DisplayFormatType::Default | DisplayFormatType::Verbose => {
139139
write!(f, "CustomExecutionPlan: projection={:#?}", self.projection)
140140
}
141+
DisplayFormatType::TreeRender => {
142+
write!(f, "") // TODO(renjj): add display info
143+
}
141144
}
142145
}
143146
}

datafusion/core/tests/custom_sources_cases/provider_filter_pushdown.rs

+3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ impl DisplayAs for CustomPlan {
9292
DisplayFormatType::Default | DisplayFormatType::Verbose => {
9393
write!(f, "CustomPlan: batch_size={}", self.batches.len(),)
9494
}
95+
DisplayFormatType::TreeRender => {
96+
write!(f, "") // TODO(renjj): add display info
97+
}
9598
}
9699
}
97100
}

datafusion/core/tests/custom_sources_cases/statistics.rs

+3
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ impl DisplayAs for StatisticsValidation {
141141
self.stats.num_rows,
142142
)
143143
}
144+
DisplayFormatType::TreeRender => {
145+
write!(f, "") // TODO(renjj): add display info
146+
}
144147
}
145148
}
146149
}

datafusion/core/tests/physical_optimizer/join_selection.rs

+6
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,9 @@ impl DisplayAs for UnboundedExec {
925925
self.batch_produce.is_none(),
926926
)
927927
}
928+
DisplayFormatType::TreeRender => {
929+
write!(f, "") // TODO(renjj): add display info
930+
}
928931
}
929932
}
930933
}
@@ -1020,6 +1023,9 @@ impl DisplayAs for StatisticsExec {
10201023
self.stats.num_rows,
10211024
)
10221025
}
1026+
DisplayFormatType::TreeRender => {
1027+
write!(f, "") // TODO(renjj): add display info
1028+
}
10231029
}
10241030
}
10251031
}

datafusion/core/tests/user_defined/user_defined_plan.rs

+3
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,9 @@ impl DisplayAs for TopKExec {
700700
DisplayFormatType::Default | DisplayFormatType::Verbose => {
701701
write!(f, "TopKExec: k={}", self.k)
702702
}
703+
DisplayFormatType::TreeRender => {
704+
write!(f, "") // TODO(renjj): add display info
705+
}
703706
}
704707
}
705708
}

datafusion/physical-plan/src/aggregates/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1800,6 +1800,9 @@ mod tests {
18001800
DisplayFormatType::Default | DisplayFormatType::Verbose => {
18011801
write!(f, "TestYieldingExec")
18021802
}
1803+
DisplayFormatType::TreeRender => {
1804+
write!(f, "") // TODO(renjj): add display info
1805+
}
18031806
}
18041807
}
18051808
}

datafusion/physical-plan/src/sorts/sort.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1102,6 +1102,9 @@ mod tests {
11021102
DisplayFormatType::Default | DisplayFormatType::Verbose => {
11031103
write!(f, "UnboundableExec",).unwrap()
11041104
}
1105+
DisplayFormatType::TreeRender => {
1106+
write!(f, "").unwrap() // TODO(renjj): add display info
1107+
}
11051108
}
11061109
Ok(())
11071110
}

datafusion/physical-plan/src/sorts/sort_preserving_merge.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,9 @@ mod tests {
13891389
DisplayFormatType::Default | DisplayFormatType::Verbose => {
13901390
write!(f, "CongestedExec",).unwrap()
13911391
}
1392+
DisplayFormatType::TreeRender => {
1393+
write!(f, "").unwrap() // TODO(renjj): add display info
1394+
}
13921395
}
13931396
Ok(())
13941397
}

datafusion/physical-plan/src/test/exec.rs

+18
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ impl DisplayAs for MockExec {
175175
DisplayFormatType::Default | DisplayFormatType::Verbose => {
176176
write!(f, "MockExec")
177177
}
178+
DisplayFormatType::TreeRender => {
179+
write!(f, "") // TODO(renjj): add display info
180+
}
178181
}
179182
}
180183
}
@@ -337,6 +340,9 @@ impl DisplayAs for BarrierExec {
337340
DisplayFormatType::Default | DisplayFormatType::Verbose => {
338341
write!(f, "BarrierExec")
339342
}
343+
DisplayFormatType::TreeRender => {
344+
write!(f, "") // TODO(renjj): add display info
345+
}
340346
}
341347
}
342348
}
@@ -449,6 +455,9 @@ impl DisplayAs for ErrorExec {
449455
DisplayFormatType::Default | DisplayFormatType::Verbose => {
450456
write!(f, "ErrorExec")
451457
}
458+
DisplayFormatType::TreeRender => {
459+
write!(f, "") // TODO(renjj): add display info
460+
}
452461
}
453462
}
454463
}
@@ -535,6 +544,9 @@ impl DisplayAs for StatisticsExec {
535544
self.stats.num_rows,
536545
)
537546
}
547+
DisplayFormatType::TreeRender => {
548+
write!(f, "") // TODO(renjj): add display info
549+
}
538550
}
539551
}
540552
}
@@ -630,6 +642,9 @@ impl DisplayAs for BlockingExec {
630642
DisplayFormatType::Default | DisplayFormatType::Verbose => {
631643
write!(f, "BlockingExec",)
632644
}
645+
DisplayFormatType::TreeRender => {
646+
write!(f, "") // TODO(renjj): add display info
647+
}
633648
}
634649
}
635650
}
@@ -772,6 +787,9 @@ impl DisplayAs for PanicExec {
772787
DisplayFormatType::Default | DisplayFormatType::Verbose => {
773788
write!(f, "PanicExec",)
774789
}
790+
DisplayFormatType::TreeRender => {
791+
write!(f, "") // TODO(renjj): add display info
792+
}
775793
}
776794
}
777795
}

0 commit comments

Comments
 (0)