Skip to content

Commit 6aeea6b

Browse files
authored
Fix build on main due to logical conflict (#6875)
1 parent f12f515 commit 6aeea6b

1 file changed

Lines changed: 29 additions & 43 deletions

File tree

datafusion/core/src/physical_plan/streaming.rs

Lines changed: 29 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ use log::debug;
3030

3131
use crate::datasource::physical_plan::{OutputOrderingDisplay, ProjectSchemaDisplay};
3232
use crate::physical_plan::stream::RecordBatchStreamAdapter;
33-
use crate::physical_plan::{
34-
DisplayFormatType, ExecutionPlan, Partitioning, SendableRecordBatchStream,
35-
};
33+
use crate::physical_plan::{ExecutionPlan, Partitioning, SendableRecordBatchStream};
3634
use datafusion_execution::TaskContext;
3735

3836
use super::{DisplayAs, DisplayFormatType};
@@ -106,7 +104,34 @@ impl DisplayAs for StreamingTableExec {
106104
) -> std::fmt::Result {
107105
match t {
108106
DisplayFormatType::Default | DisplayFormatType::Verbose => {
109-
write!(f, "StreamingTableExec")
107+
write!(
108+
f,
109+
"StreamingTableExec: partition_sizes={:?}",
110+
self.partitions.len(),
111+
)?;
112+
if !self.projected_schema.fields().is_empty() {
113+
write!(
114+
f,
115+
", projection={}",
116+
ProjectSchemaDisplay(&self.projected_schema)
117+
)?;
118+
}
119+
if self.infinite {
120+
write!(f, ", infinite_source=true")?;
121+
}
122+
123+
self.projected_output_ordering
124+
.as_deref()
125+
.map_or(Ok(()), |ordering| {
126+
if !ordering.is_empty() {
127+
write!(
128+
f,
129+
", output_ordering={}",
130+
OutputOrderingDisplay(ordering)
131+
)?;
132+
}
133+
Ok(())
134+
})
110135
}
111136
}
112137
}
@@ -164,45 +189,6 @@ impl ExecutionPlan for StreamingTableExec {
164189
})
165190
}
166191

167-
fn fmt_as(
168-
&self,
169-
t: DisplayFormatType,
170-
f: &mut std::fmt::Formatter,
171-
) -> std::fmt::Result {
172-
match t {
173-
DisplayFormatType::Default | DisplayFormatType::Verbose => {
174-
write!(
175-
f,
176-
"StreamingTableExec: partition_sizes={:?}",
177-
self.partitions.len(),
178-
)?;
179-
if !self.projected_schema.fields().is_empty() {
180-
write!(
181-
f,
182-
", projection={}",
183-
ProjectSchemaDisplay(&self.projected_schema)
184-
)?;
185-
}
186-
if self.infinite {
187-
write!(f, ", infinite_source=true")?;
188-
}
189-
190-
self.projected_output_ordering
191-
.as_deref()
192-
.map_or(Ok(()), |ordering| {
193-
if !ordering.is_empty() {
194-
write!(
195-
f,
196-
", output_ordering={}",
197-
OutputOrderingDisplay(ordering)
198-
)?;
199-
}
200-
Ok(())
201-
})
202-
}
203-
}
204-
}
205-
206192
fn statistics(&self) -> Statistics {
207193
Default::default()
208194
}

0 commit comments

Comments
 (0)