diff --git a/src/io.rs b/src/io.rs index 2afa724..a6edc9b 100644 --- a/src/io.rs +++ b/src/io.rs @@ -77,7 +77,8 @@ pub fn dump_csv_to_stdout(ldf: LazyFrame) { } /// Write a Polars DataFrame to Parquet -pub fn write_parquet(ldf: LazyFrame, path: String) { +/// Not yet supported in standard executor +pub fn sink_parquet(ldf: LazyFrame, path: String) { // Selected compression not implemented yet let mut p = PathBuf::new(); p.push(path); @@ -93,3 +94,11 @@ pub fn write_parquet(ldf: LazyFrame, path: String) { ) .expect("Could not save"); } + +pub fn write_parquet(ldf: LazyFrame, path: String) { + // Selected compression not implemented yet + let mut file = std::fs::File::create(path).unwrap(); + ParquetWriter::new(&mut file) + .finish(&mut ldf.collect().expect("Could not collect")) + .unwrap(); +}