Don't sink parquet for he moment
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Guillem Borrell 2023-01-17 17:54:48 +00:00
parent facae6af40
commit 99d58ff9c3

View file

@ -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();
}