nuno-faria commented on code in PR #19316:
URL: https://github.com/apache/datafusion/pull/19316#discussion_r2620618805


##########
datafusion/physical-plan/src/analyze.rs:
##########
@@ -271,19 +328,41 @@ fn create_output_batch(
     .map_err(DataFusionError::from)
 }
 
+fn export_auto_explain(batch: RecordBatch, output: &str) -> Result<()> {
+    let fd: &mut dyn Write = match output {
+        "stdout" => &mut io::stdout(),
+        "stderr" => &mut io::stderr(),
+        _ => &mut OpenOptions::new().create(true).append(true).open(output)?,

Review Comment:
   > Does this need some kind of synchronisation when a file path is used for 
the output ? Two or more DF sessions using the same config may try to write to 
the same file simultaneously.
   
   I think again the responsibility of this falls on the user. Is it common to 
use multiple sessions over the same config?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to