Skip to content

Commit d3ca16e

Browse files
authored
Add notes for DataSinkExec (#17873)
1 parent b170aae commit d3ca16e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

datafusion/datasource/src/sink.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ impl Debug for DataSinkExec {
100100

101101
impl DataSinkExec {
102102
/// Create a plan to write to `sink`
103+
/// Note: DataSinkExec requires its input to have a single partition.
104+
/// If the input has multiple partitions, the physical optimizer will
105+
/// automatically insert a Merge-related operator to merge them.
106+
/// If you construct PhysicalPlan without going through the physical optimizer,
107+
/// you must ensure that the input has a single partition.
103108
pub fn new(
104109
input: Arc<dyn ExecutionPlan>,
105110
sink: Arc<dyn DataSink>,

0 commit comments

Comments
 (0)