removed polars example because it wouldn't compile anymore, even when updating to latest version. It also massively reduced the number of downloaded crates
This commit is contained in:
parent
2a89d061a0
commit
d246c54cd9
1086
src/main/rust/Cargo.lock
generated
1086
src/main/rust/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,6 @@ bstr = "1.9.1"
|
|||||||
fast-float = "0.2.0"
|
fast-float = "0.2.0"
|
||||||
memchr = "2.7.4"
|
memchr = "2.7.4"
|
||||||
memmap2 = "0.9.4"
|
memmap2 = "0.9.4"
|
||||||
polars = { version = "0.36.2", features = ["csv", "lazy", "nightly", "streaming"]}
|
|
||||||
rayon = "1.10.0"
|
rayon = "1.10.0"
|
||||||
rustc-hash = "2.0.0"
|
rustc-hash = "2.0.0"
|
||||||
libc = "0.2.155"
|
libc = "0.2.155"
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
fn main() {
|
|
||||||
// let _ = run_polars();
|
|
||||||
}
|
|
@ -4,7 +4,6 @@ pub mod multi_threaded;
|
|||||||
pub mod multi_threaded_smol;
|
pub mod multi_threaded_smol;
|
||||||
pub mod multi_threaded_structured;
|
pub mod multi_threaded_structured;
|
||||||
pub mod phcs;
|
pub mod phcs;
|
||||||
pub mod polars;
|
|
||||||
pub mod reference_impl;
|
pub mod reference_impl;
|
||||||
pub mod single_thread;
|
pub mod single_thread;
|
||||||
pub mod smol;
|
pub mod smol;
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
use polars::prelude::*;
|
|
||||||
use std::time::Instant;
|
|
||||||
use std::vec;
|
|
||||||
|
|
||||||
pub fn run_polars() -> Result<DataFrame, PolarsError> {
|
|
||||||
let now = Instant::now();
|
|
||||||
|
|
||||||
let f1: Field = Field::new("station", DataType::String);
|
|
||||||
let f2: Field = Field::new("measure", DataType::Float64);
|
|
||||||
let sc: Schema = Schema::from_iter(vec![f1, f2]);
|
|
||||||
|
|
||||||
let q = LazyCsvReader::new("../../../measurements.txt")
|
|
||||||
.has_header(false)
|
|
||||||
.with_schema(Some(Arc::new(sc)))
|
|
||||||
.with_separator(b';')
|
|
||||||
.finish()?
|
|
||||||
.group_by(vec![col("station")])
|
|
||||||
.agg(vec![
|
|
||||||
col("measure").alias("min").min(),
|
|
||||||
col("measure").alias("mean").mean(),
|
|
||||||
col("measure").alias("max").max(),
|
|
||||||
])
|
|
||||||
.sort("station", Default::default())
|
|
||||||
.with_streaming(true);
|
|
||||||
|
|
||||||
let df = q.collect()?;
|
|
||||||
|
|
||||||
println!("Time={} μs", now.elapsed().as_micros());
|
|
||||||
|
|
||||||
Ok(df)
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user