From ba67e55e59500954a5cf63e5fe830202684f8dd3 Mon Sep 17 00:00:00 2001 From: xudong963 Date: Thu, 2 Oct 2025 14:21:16 +0800 Subject: [PATCH] Add notes for DataSinkExec --- datafusion/datasource/src/sink.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/datafusion/datasource/src/sink.rs b/datafusion/datasource/src/sink.rs index 13404bccac61..a8adb46b96ff 100644 --- a/datafusion/datasource/src/sink.rs +++ b/datafusion/datasource/src/sink.rs @@ -100,6 +100,11 @@ impl Debug for DataSinkExec { impl DataSinkExec { /// Create a plan to write to `sink` + /// Note: DataSinkExec requires its input to have a single partition. + /// If the input has multiple partitions, the physical optimizer will + /// automatically insert a Merge-related operator to merge them. + /// If you construct PhysicalPlan without going through the physical optimizer, + /// you must ensure that the input has a single partition. pub fn new( input: Arc, sink: Arc,