ozankabak commented on code in PR #14121: URL: https://github.com/apache/datafusion/pull/14121#discussion_r1915581273
########## datafusion/core/src/datasource/physical_plan/mod.rs: ########## @@ -63,14 +64,53 @@ use crate::{ }; use arrow::datatypes::{DataType, SchemaRef}; +use datafusion_common_runtime::SpawnedTask; +use datafusion_execution::{SendableRecordBatchStream, TaskContext}; use datafusion_physical_expr::expressions::Column; use datafusion_physical_expr::PhysicalSortExpr; use datafusion_physical_expr_common::sort_expr::LexOrdering; +use datafusion_physical_plan::insert::DataSink; +use async_trait::async_trait; use futures::StreamExt; use log::debug; use object_store::{path::Path, GetOptions, GetRange, ObjectMeta, ObjectStore}; +/// General behaviors for files that do `DataSink` operations +#[async_trait] +pub trait FileSink: DataSink { + /// Retrieves the file sink configuration. + fn config(&self) -> &FileSinkConfig; + + /// Spawns writer tasks and uses `tokio::join` to collect results. Review Comment: Agreed, let's do this @mertak-synnada -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org