mmooyyii opened a new issue, #16240: URL: https://github.com/apache/datafusion/issues/16240
I want write a csv file only include headers; ``` use datafusion::config::CsvOptions; use datafusion::dataframe::DataFrameWriteOptions; use datafusion::error::Result; use datafusion::prelude::*; use std::path::Path; #[tokio::main] async fn main() -> Result<()> { let ctx = SessionContext::new(); let df = ctx.sql("SELECT 1 limit 0").await?; let mut cfg1 = DataFrameWriteOptions::new(); cfg1 = cfg1.with_single_file_output(true); let mut cfg2 = CsvOptions::default(); cfg2.has_header = Some(true); df.write_csv("/tmp/t.csv", cfg1, Some(cfg2)).await?; assert_eq!(Path::new("/tmp/t.csv").exists(), true); // panic! Ok(()) } ``` -- 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.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