Skip to content

Commit 3d8610a

Browse files
committed
Require Debug for DataSource
1 parent ce14fbc commit 3d8610a

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

datafusion/datasource/src/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl MemoryExec {
346346
}
347347

348348
/// Data source configuration for reading in-memory batches of data
349-
#[derive(Clone)]
349+
#[derive(Clone, Debug)]
350350
pub struct MemorySourceConfig {
351351
/// The partitions to query
352352
partitions: Vec<Vec<RecordBatch>>,

datafusion/datasource/src/source.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use datafusion_physical_expr_common::sort_expr::LexOrdering;
3535

3636
/// Common behaviors in Data Sources for both from Files and Memory.
3737
/// See `DataSourceExec` for physical plan implementation
38-
pub trait DataSource: Send + Sync {
38+
pub trait DataSource: Send + Sync + Debug {
3939
fn open(
4040
&self,
4141
partition: usize,
@@ -66,12 +66,6 @@ pub trait DataSource: Send + Sync {
6666
) -> datafusion_common::Result<Option<Arc<dyn ExecutionPlan>>>;
6767
}
6868

69-
impl Debug for dyn DataSource {
70-
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
71-
write!(f, "DataSource: ")
72-
}
73-
}
74-
7569
/// Unified data source for file formats like JSON, CSV, AVRO, ARROW, PARQUET
7670
#[derive(Clone, Debug)]
7771
pub struct DataSourceExec {

0 commit comments

Comments
 (0)