Skip to content

Commit

Permalink
Fix build on main due to logical conflict (#6875)
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb authored Jul 7, 2023
1 parent f12f515 commit 6aeea6b
Showing 1 changed file with 29 additions and 43 deletions.
72 changes: 29 additions & 43 deletions datafusion/core/src/physical_plan/streaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ use log::debug;

use crate::datasource::physical_plan::{OutputOrderingDisplay, ProjectSchemaDisplay};
use crate::physical_plan::stream::RecordBatchStreamAdapter;
use crate::physical_plan::{
DisplayFormatType, ExecutionPlan, Partitioning, SendableRecordBatchStream,
};
use crate::physical_plan::{ExecutionPlan, Partitioning, SendableRecordBatchStream};
use datafusion_execution::TaskContext;

use super::{DisplayAs, DisplayFormatType};
Expand Down Expand Up @@ -106,7 +104,34 @@ impl DisplayAs for StreamingTableExec {
) -> std::fmt::Result {
match t {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(f, "StreamingTableExec")
write!(
f,
"StreamingTableExec: partition_sizes={:?}",
self.partitions.len(),
)?;
if !self.projected_schema.fields().is_empty() {
write!(
f,
", projection={}",
ProjectSchemaDisplay(&self.projected_schema)
)?;
}
if self.infinite {
write!(f, ", infinite_source=true")?;
}

self.projected_output_ordering
.as_deref()
.map_or(Ok(()), |ordering| {
if !ordering.is_empty() {
write!(
f,
", output_ordering={}",
OutputOrderingDisplay(ordering)
)?;
}
Ok(())
})
}
}
}
Expand Down Expand Up @@ -164,45 +189,6 @@ impl ExecutionPlan for StreamingTableExec {
})
}

fn fmt_as(
&self,
t: DisplayFormatType,
f: &mut std::fmt::Formatter,
) -> std::fmt::Result {
match t {
DisplayFormatType::Default | DisplayFormatType::Verbose => {
write!(
f,
"StreamingTableExec: partition_sizes={:?}",
self.partitions.len(),
)?;
if !self.projected_schema.fields().is_empty() {
write!(
f,
", projection={}",
ProjectSchemaDisplay(&self.projected_schema)
)?;
}
if self.infinite {
write!(f, ", infinite_source=true")?;
}

self.projected_output_ordering
.as_deref()
.map_or(Ok(()), |ordering| {
if !ordering.is_empty() {
write!(
f,
", output_ordering={}",
OutputOrderingDisplay(ordering)
)?;
}
Ok(())
})
}
}
}

fn statistics(&self) -> Statistics {
Default::default()
}
Expand Down

0 comments on commit 6aeea6b

Please sign in to comment.