Jefffrey commented on issue #4986:
URL: https://github.com/apache/datafusion/issues/4986#issuecomment-3827541246

   The existing API is a bit confusing on what it really does; given this 
example program:
   
   ```rust
   let df = ctx.sql("select 1 as a").await?;
   df.write_csv(
       "test.csv",
       DataFrameWriteOptions::default().with_insert_operation(InsertOp::Append),
       None,
   )
   .await?;
   ```
   
   - `Append` is already the default, just setting here to be explicit
   
   Each time we run this, it will seemingly overwrite the CSV file, even though 
it is an append operation. If we replace `Append` with `Overwrite` or `Replace` 
it'll throw an error about it not being implemented.
   
   I don't know what the target state should look like and what these APIs 
should do, so some research/analysis would be good, but I can say as it is the 
API does seem a bit confusing. I haven't tested `write_parquet` or `write_json` 
but it's worth reviewing those too.
   
   


-- 
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