diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index ffb7330c..1c445bb8 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -14,7 +14,7 @@ jobs: - name: Install latest Rust nightly uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2024-09-19 + toolchain: nightly-2024-10-28 components: rustfmt, clippy - name: Install ghp-import uses: actions/setup-python@v5 diff --git a/.github/workflows/test-js.yaml b/.github/workflows/test-js.yaml index be91e4cc..f8bb523f 100644 --- a/.github/workflows/test-js.yaml +++ b/.github/workflows/test-js.yaml @@ -20,7 +20,7 @@ jobs: - name: Install latest Rust nightly uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2024-09-19 + toolchain: nightly-2024-10-28 components: rustfmt, clippy - name: Check yarn version run: yarn --version @@ -46,7 +46,7 @@ jobs: - name: Install latest Rust nightly uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2024-09-19 + toolchain: nightly-2024-10-28 components: rustfmt, clippy - name: Bun version uses: oven-sh/setup-bun@v1 diff --git a/Cargo.toml b/Cargo.toml index 17127bad..f1fd9b76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,19 +15,19 @@ crate-type = ["cdylib", "lib"] [dependencies] ahash = "0.8.11" bincode = "1.3.3" -napi = { version = "2.16.9", default-features = false, features = [ +napi = { version = "2.16.13", default-features = false, features = [ "napi8", "serde-json", ] } -napi-derive = { version = "2.16.11", default-features = false } -polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "54218e7e35e3defd4b0801e820c56eea6b91e525", default-features = false } -polars-io = { git = "https://github.com/pola-rs/polars.git", rev = "54218e7e35e3defd4b0801e820c56eea6b91e525", default-features = false } -polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "54218e7e35e3defd4b0801e820c56eea6b91e525", default-features = false } +napi-derive = { version = "2.16.12", default-features = false } +polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "2dce3d3b5c80ae7522a3435f844fac8fed9dc9e8", default-features = false } +polars-io = { git = "https://github.com/pola-rs/polars.git", rev = "2dce3d3b5c80ae7522a3435f844fac8fed9dc9e8", default-features = false } +polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "2dce3d3b5c80ae7522a3435f844fac8fed9dc9e8", default-features = false } thiserror = "1" smartstring = { version = "1" } serde_json = { version = "1" } either = "1.13.0" -hashbrown = {version = "=0.14.5", features = ["raw"]} +hashbrown = { version = "0.15.0", features = ["rayon", "serde"] } [dependencies.polars] features = [ @@ -86,7 +86,6 @@ features = [ "to_dummies", "ipc", "ipc_streaming", - "avro", "list_eval", "arg_where", "timezones", @@ -163,7 +162,7 @@ features = [ "azure" ] git = "https://github.com/pola-rs/polars.git" -rev = "54218e7e35e3defd4b0801e820c56eea6b91e525" +rev = "2dce3d3b5c80ae7522a3435f844fac8fed9dc9e8" [build-dependencies] napi-build = "2.1.3" diff --git a/__tests__/expr.test.ts b/__tests__/expr.test.ts index 49cd9ba8..3385a58d 100644 --- a/__tests__/expr.test.ts +++ b/__tests__/expr.test.ts @@ -1647,7 +1647,7 @@ describe("expr.lst", () => { test("head", () => { const s0 = pl.Series("a", [[3, 5, 6, 7, 8]]); let actual = s0.lst.head(1); - let expected = pl.Series("a", [3]); + let expected = pl.Series("a", [[3]]); expect(actual.seriesEqual(expected)); actual = s0.lst.head(); expected = pl.Series("a", [3, 5, 6, 7, 8]); @@ -1656,7 +1656,7 @@ describe("expr.lst", () => { test("tail", () => { const s0 = pl.Series("a", [[3, 5, 6, 7, 8]]); let actual = s0.lst.tail(1); - let expected = pl.Series("a", [8]); + let expected = pl.Series("a", [[8]]); expect(actual.seriesEqual(expected)); actual = s0.lst.tail(); expected = pl.Series("a", [3, 5, 6, 7, 8]); diff --git a/__tests__/io.test.ts b/__tests__/io.test.ts index 14de9db3..c6035be5 100644 --- a/__tests__/io.test.ts +++ b/__tests__/io.test.ts @@ -404,20 +404,20 @@ describe("avro", () => { const actual = pl.readAvro(buf); expect(actual).toFrameEqual(expected); }); - test("read", () => { - const df = pl.readAvro(avropath); - expect(df.shape).toEqual({ height: 27, width: 4 }); + test("read:avro", () => { + const df = pl.readAvro(avropath, { nRows: 4 }); + expect(df.shape).toEqual({ height: 4, width: 4 }); }); - test("read:buffer", () => { + test("read:avro:buffer", () => { const buff = fs.readFileSync(avropath); - const df = pl.readAvro(buff); - expect(df.shape).toEqual({ height: 27, width: 4 }); + const df = pl.readAvro(buff, { nRows: 4 }); + expect(df.shape).toEqual({ height: 4, width: 4 }); }); - test("read:compressed", () => { - const csvDF = pl.readCSV(csvpath); + test("read:avro:compressed", () => { + const csvDF = pl.readCSV(csvpath, { nRows: 4 }); csvDF.writeAvro(avropath, { compression: "snappy" }); - const df = pl.readAvro(avropath); + const df = pl.readAvro(avropath, { nRows: 4 }); expect(df).toFrameEqual(csvDF); }); diff --git a/biome.json b/biome.json index d20ba357..31f57759 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.9.3/schema.json", + "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", "linter": { "enabled": true, "rules": { diff --git a/package.json b/package.json index 2ac54a06..cf8e831f 100644 --- a/package.json +++ b/package.json @@ -54,11 +54,11 @@ "precommit": "yarn lint && yarn test" }, "devDependencies": { - "@biomejs/biome": "=1.9.3", + "@biomejs/biome": "=1.9.4", "@napi-rs/cli": "^2.18.4", "@types/chance": "^1.1.6", - "@types/jest": "^29.5.13", - "@types/node": "^22.7.5", + "@types/jest": "^29.5.14", + "@types/node": "^22.8.6", "chance": "^1.1.12", "jest": "^29.7.0", "source-map-support": "^0.5.21", diff --git a/polars/io.ts b/polars/io.ts index 37ea88ef..e711953d 100644 --- a/polars/io.ts +++ b/polars/io.ts @@ -22,7 +22,6 @@ export interface ReadCsvOptions { encoding: "utf8" | "utf8-lossy"; numThreads: number; dtypes: Record; - sampleSize: number; lowMemory: boolean; commentChar: string; quoteChar: string; @@ -44,7 +43,6 @@ const readCsvDefaultOptions: Partial = { ignoreErrors: true, chunkSize: 10000, skipRows: 0, - sampleSize: 1024, sep: ",", rechunk: false, encoding: "utf8", diff --git a/rust-toolchain b/rust-toolchain index 41ef6a6e..f6b410d6 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-09-19 \ No newline at end of file +nightly-2024-10-28 \ No newline at end of file diff --git a/src/conversion.rs b/src/conversion.rs index 222a4460..fc276e70 100644 --- a/src/conversion.rs +++ b/src/conversion.rs @@ -6,7 +6,6 @@ use polars::frame::NullStrategy; use polars::prelude::*; use polars_core::series::ops::NullBehavior; use polars_io::RowIndex; -use std::any::Any; use std::collections::HashMap; #[derive(Debug)] @@ -165,6 +164,9 @@ impl<'a> ToNapiValue for Wrap> { AnyValue::Decimal(_, _) => { Err(napi::Error::from_reason("Decimal is not a supported type in javascript, please convert to string or number before collecting to js")) } + AnyValue::CategoricalOwned(_,_,_) => todo!(), + AnyValue::DatetimeOwned(_,_,_) => todo!(), + AnyValue::EnumOwned(_,_,_) => todo!(), } } } @@ -293,9 +295,9 @@ impl FromNapiValue for Wrap { } } -impl TypeName for Wrap { +impl TypeName for Wrap { fn type_name() -> &'static str { - "QuantileInterpolOptions" + "QuantileMethod" } fn value_type() -> ValueType { @@ -303,15 +305,15 @@ impl TypeName for Wrap { } } -impl FromNapiValue for Wrap { +impl FromNapiValue for Wrap { unsafe fn from_napi_value(env: sys::napi_env, napi_val: sys::napi_value) -> JsResult { let interpolation = String::from_napi_value(env, napi_val)?; let interpol = match interpolation.as_ref() { - "nearest" => QuantileInterpolOptions::Nearest, - "lower" => QuantileInterpolOptions::Lower, - "higher" => QuantileInterpolOptions::Higher, - "midpoint" => QuantileInterpolOptions::Midpoint, - "linear" => QuantileInterpolOptions::Linear, + "nearest" => QuantileMethod::Nearest, + "lower" => QuantileMethod::Lower, + "higher" => QuantileMethod::Higher, + "midpoint" => QuantileMethod::Midpoint, + "linear" => QuantileMethod::Linear, _ => return Err(napi::Error::from_reason("not supported".to_owned())), }; Ok(Wrap(interpol)) @@ -524,9 +526,9 @@ impl From for RollingOptionsFixedWindow { weights: o.weights, min_periods: o.min_periods as usize, center: o.center, - fn_params: Some(Arc::new(RollingVarParams { + fn_params: Some(RollingFnParams::Var(RollingVarParams { ddof: o.ddof.unwrap_or(1), - }) as Arc), + })), ..Default::default() } } @@ -800,7 +802,9 @@ impl FromNapiValue for Wrap { unsafe fn from_napi_value(env: sys::napi_env, napi_val: sys::napi_value) -> napi::Result { let obj = Object::from_napi_value(env, napi_val)?; let descending = obj.get::<_, bool>("descending")?.unwrap(); - let nulls_last = obj.get::<_, bool>("nulls_last")?.map_or(obj.get::<_, bool>("nullsLast")?.unwrap_or(false), |n| n); + let nulls_last = obj + .get::<_, bool>("nulls_last")? + .map_or(obj.get::<_, bool>("nullsLast")?.unwrap_or(false), |n| n); let multithreaded = obj.get::<_, bool>("multithreaded")?.unwrap(); let maintain_order: bool = obj.get::<_, bool>("maintain_order")?.unwrap(); let options = SortOptions { @@ -1007,9 +1011,14 @@ impl FromNapiValue for Wrap { if let Ok(s) = String::from_napi_value(env, napi_val) { Ok(Wrap(NullValues::AllColumnsSingle(s.into()))) } else if let Ok(s) = Vec::::from_napi_value(env, napi_val) { - Ok(Wrap(NullValues::AllColumns(s.into_iter().map(PlSmallStr::from_string).collect()))) + Ok(Wrap(NullValues::AllColumns( + s.into_iter().map(PlSmallStr::from_string).collect(), + ))) } else if let Ok(s) = HashMap::::from_napi_value(env, napi_val) { - let null_values = s.into_iter().map(|a| (PlSmallStr::from_string(a.0), PlSmallStr::from_string(a.1))).collect::>(); + let null_values = s + .into_iter() + .map(|a| (PlSmallStr::from_string(a.0), PlSmallStr::from_string(a.1))) + .collect::>(); Ok(Wrap(NullValues::Named(null_values))) } else { Err( @@ -1024,9 +1033,14 @@ impl ToNapiValue for Wrap { unsafe fn to_napi_value(env: sys::napi_env, val: Self) -> napi::Result { match val.0 { NullValues::AllColumnsSingle(s) => String::to_napi_value(env, s.to_string()), - NullValues::AllColumns(arr) => Vec::::to_napi_value(env, arr.iter().map(|x| x.to_string()).collect()), + NullValues::AllColumns(arr) => { + Vec::::to_napi_value(env, arr.iter().map(|x| x.to_string()).collect()) + } NullValues::Named(obj) => { - let o: HashMap = obj.into_iter().map(|s| (s.0.to_string(), s.1.to_string())).collect::>(); + let o: HashMap = obj + .into_iter() + .map(|s| (s.0.to_string(), s.1.to_string())) + .collect::>(); HashMap::::to_napi_value(env, o) } } @@ -1057,7 +1071,7 @@ impl FromJsUnknown for AnyValue<'_> { let d: JsDate = unsafe { val.cast() }; let d = d.value_of()?; let d = d as i64; - Ok(AnyValue::Datetime(d, TimeUnit::Milliseconds, &None)) + Ok(AnyValue::Datetime(d, TimeUnit::Milliseconds, None)) } else { Err(JsPolarsErr::Other("Unsupported Data type".to_owned()).into()) } @@ -1236,7 +1250,10 @@ where I: IntoIterator, S: AsRef, { - container.into_iter().map(|s| PlSmallStr::from_str(s.as_ref())).collect() + container + .into_iter() + .map(|s| PlSmallStr::from_str(s.as_ref())) + .collect() } pub(crate) fn strings_to_selector(container: I) -> Vec diff --git a/src/dataframe.rs b/src/dataframe.rs index 445fe698..174eba4e 100644 --- a/src/dataframe.rs +++ b/src/dataframe.rs @@ -31,12 +31,12 @@ impl From for JsDataFrame { } } -pub(crate) fn to_series_collection(ps: Array) -> Vec { +pub(crate) fn to_series_collection(ps: Array) -> Vec { let len = ps.len(); (0..len) .map(|idx| { let item: &JsSeries = ps.get(idx).unwrap().unwrap(); - item.series.clone() + item.series.clone().into() }) .collect() } @@ -67,7 +67,6 @@ pub struct ReadCsvOptions { pub num_threads: Option, pub path: Option, pub dtypes: Option>>, - pub sample_size: u32, pub chunk_size: u32, pub comment_char: Option, pub null_values: Option>, @@ -97,7 +96,13 @@ fn mmap_reader_to_df<'a>( .projection .map(|p: Vec| p.into_iter().map(|p| p as usize).collect()); - let quote_char = options.quote_char.map_or(None, |q| if q.is_empty() { None } else { Some(q.as_bytes()[0]) } ); + let quote_char = options.quote_char.map_or(None, |q| { + if q.is_empty() { + None + } else { + Some(q.as_bytes()[0]) + } + }); let encoding = match options.encoding.as_ref() { "utf8" => CsvEncoding::Utf8, @@ -124,13 +129,16 @@ fn mmap_reader_to_df<'a>( .with_ignore_errors(options.ignore_errors) .with_rechunk(options.rechunk) .with_chunk_size(options.chunk_size as usize) - .with_columns(options.columns.map(|x| x.into_iter().map(PlSmallStr::from_string).collect())) + .with_columns( + options + .columns + .map(|x| x.into_iter().map(PlSmallStr::from_string).collect()), + ) .with_n_threads(options.num_threads.map(|i| i as usize)) .with_schema_overwrite(overwrite_dtype.map(Arc::new)) .with_schema(options.schema.map(|schema| Arc::new(schema.0))) .with_low_memory(options.low_memory) .with_row_index(row_count) - .with_sample_size(options.sample_size as usize) .with_skip_rows_after_header(options.skip_rows_after_header as usize) .with_raise_if_empty(options.raise_if_empty) .with_parse_options( @@ -508,10 +516,10 @@ impl JsDataFrame { #[napi(constructor)] pub fn from_columns(columns: Array) -> napi::Result { let len = columns.len(); - let cols: Vec = (0..len) + let cols: Vec = (0..len) .map(|idx| { let item: &JsSeries = columns.get(idx).unwrap().unwrap(); - item.series.clone() + item.series.clone().into() }) .collect(); @@ -628,8 +636,7 @@ impl JsDataFrame { let df = self .df - .join - ( + .join( &other.df, left_on, right_on, @@ -645,7 +652,13 @@ impl JsDataFrame { #[napi(catch_unwind)] pub fn get_columns(&self) -> Vec { - let cols = self.df.get_columns(); + let cols: Vec = self + .df + .get_columns() + .iter() + .map(Column::as_materialized_series) + .cloned() + .collect(); to_jsseries_collection(cols.to_vec()) } @@ -657,9 +670,7 @@ impl JsDataFrame { #[napi(setter, js_name = "columns", catch_unwind)] pub fn set_columns(&mut self, names: Vec<&str>) -> napi::Result<()> { - self.df - .set_column_names(names) - .map_err(JsPolarsErr::from)?; + self.df.set_column_names(names).map_err(JsPolarsErr::from)?; Ok(()) } @@ -728,7 +739,9 @@ impl JsDataFrame { #[napi(catch_unwind)] pub fn drop_in_place(&mut self, name: String) -> napi::Result { let s = self.df.drop_in_place(&name).map_err(JsPolarsErr::from)?; - Ok(JsSeries { series: s }) + Ok(JsSeries { + series: s.take_materialized_series(), + }) } #[napi(catch_unwind)] pub fn drop_nulls(&self, subset: Option>) -> napi::Result { @@ -748,7 +761,7 @@ impl JsDataFrame { pub fn select_at_idx(&self, idx: i64) -> Option { self.df .select_at_idx(idx as usize) - .map(|s| JsSeries::new(s.clone())) + .map(|s| JsSeries::new(s.clone().take_materialized_series())) } #[napi(catch_unwind)] @@ -760,7 +773,7 @@ impl JsDataFrame { let series = self .df .column(&name) - .map(|s| JsSeries::new(s.clone())) + .map(|s| JsSeries::new(s.clone().take_materialized_series())) .map_err(JsPolarsErr::from)?; Ok(series) } @@ -958,13 +971,13 @@ impl JsDataFrame { id_vars: Vec, value_vars: Vec, variable_name: Option, - value_name: Option + value_name: Option, ) -> napi::Result { let args = UnpivotArgsIR { on: strings_to_pl_smallstr(value_vars), index: strings_to_pl_smallstr(id_vars), variable_name: variable_name.map(|s| s.into()), - value_name: value_name.map(|s| s.into()) + value_name: value_name.map(|s| s.into()), }; let df = self.df.unpivot2(args).map_err(JsPolarsErr::from)?; @@ -1030,13 +1043,13 @@ impl JsDataFrame { #[napi(catch_unwind)] pub fn hmax(&self) -> napi::Result> { let s = self.df.max_horizontal().map_err(JsPolarsErr::from)?; - Ok(s.map(|s| s.into())) + Ok(s.map(|s| s.take_materialized_series().into())) } #[napi(catch_unwind)] pub fn hmin(&self) -> napi::Result> { let s = self.df.min_horizontal().map_err(JsPolarsErr::from)?; - Ok(s.map(|s| s.into())) + Ok(s.map(|s| s.take_materialized_series().into())) } #[napi(catch_unwind)] @@ -1748,13 +1761,13 @@ unsafe fn coerce_js_anyvalue<'a>(val: JsUnknown, dtype: DataType) -> JsResult { - i64::from_js(val).map(|d| AnyValue::Datetime(d, TimeUnit::Milliseconds, &None)) + i64::from_js(val).map(|d| AnyValue::Datetime(d, TimeUnit::Milliseconds, None)) } (ValueType::Object, DataType::Datetime(_, _)) => { if val.is_date()? { let d: napi::JsDate = val.cast(); let d = d.value_of()?; - Ok(AnyValue::Datetime(d as i64, TimeUnit::Milliseconds, &None)) + Ok(AnyValue::Datetime(d as i64, TimeUnit::Milliseconds, None)) } else { Ok(AnyValue::Null) } diff --git a/src/datatypes.rs b/src/datatypes.rs index ad7884fb..8b20a3d8 100644 --- a/src/datatypes.rs +++ b/src/datatypes.rs @@ -178,7 +178,7 @@ impl<'a> FromNapiValue for Wrap> { } else if let Ok(d) = napi::JsDate::from_napi_value(env, napi_val) { let d = d.value_of()?; let dt = d as i64; - AnyValue::Datetime(dt, TimeUnit::Milliseconds, &None) + AnyValue::Datetime(dt, TimeUnit::Milliseconds, None) } else { return Err(Error::new( Status::InvalidArg, @@ -277,7 +277,7 @@ impl<'a> From for AnyValue<'a> { JsAnyValue::Float32(v) => AnyValue::Float32(v), JsAnyValue::Float64(v) => AnyValue::Float64(v), JsAnyValue::Date(v) => AnyValue::Date(v), - JsAnyValue::Datetime(v, w, _) => AnyValue::Datetime(v, w, &None), + JsAnyValue::Datetime(v, w, _) => AnyValue::Datetime(v, w, None), JsAnyValue::Duration(v, _) => AnyValue::Duration(v, TimeUnit::Milliseconds), JsAnyValue::Time(v) => AnyValue::Time(v), JsAnyValue::List(v) => AnyValue::List(v), diff --git a/src/functions.rs b/src/functions.rs index ee5afee9..c050b8ac 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -9,7 +9,8 @@ use polars_core::functions as pl_functions; #[napi(catch_unwind)] pub fn horizontal_concat(dfs: Vec<&JsDataFrame>) -> napi::Result { let dfs: Vec = dfs.iter().map(|df| df.df.clone()).collect(); - let df = pl_functions::concat_df_horizontal(&dfs, true).map_err(crate::error::JsPolarsErr::from)?; + let df = + pl_functions::concat_df_horizontal(&dfs, true).map_err(crate::error::JsPolarsErr::from)?; Ok(df.into()) } diff --git a/src/lazy/dataframe.rs b/src/lazy/dataframe.rs index 49089319..751d26fb 100644 --- a/src/lazy/dataframe.rs +++ b/src/lazy/dataframe.rs @@ -324,7 +324,7 @@ impl JsLazyFrame { strategy, left_by: left_by.map(strings_to_pl_smallstr), right_by: right_by.map(strings_to_pl_smallstr), - tolerance: tolerance.map(|t| t.0.into_static().unwrap()), + tolerance: tolerance.map(|t| t.0.into_static()), tolerance_str: tolerance_str.map(|s| s.into()), })) .suffix(suffix) @@ -372,7 +372,7 @@ impl JsLazyFrame { #[napi(catch_unwind)] pub fn rename(&mut self, existing: Vec, new_names: Vec) -> JsLazyFrame { let ldf = self.ldf.clone(); - ldf.rename(existing, new_names).into() + ldf.rename(existing, new_names, true).into() } #[napi(catch_unwind)] pub fn reverse(&self) -> JsLazyFrame { @@ -457,7 +457,7 @@ impl JsLazyFrame { pub fn quantile( &self, quantile: f64, - interpolation: Wrap, + interpolation: Wrap, ) -> napi::Result { let ldf = self.ldf.clone(); let out = ldf.quantile(lit(quantile), interpolation.0); @@ -479,7 +479,10 @@ impl JsLazyFrame { ) -> JsLazyFrame { let ldf = self.ldf.clone(); match maintain_order { - true => ldf.unique_stable(subset.map(|x| x.into_iter().map(PlSmallStr::from_string).collect()), keep.0), + true => ldf.unique_stable( + subset.map(|x| x.into_iter().map(PlSmallStr::from_string).collect()), + keep.0, + ), false => ldf.unique(subset, keep.0), } .into() @@ -512,7 +515,7 @@ impl JsLazyFrame { on: strings_to_selector(value_vars), index: strings_to_selector(id_vars), variable_name: variable_name.map(|s| s.into()), - value_name: value_name.map(|s| s.into()) + value_name: value_name.map(|s| s.into()), }; let ldf = self.ldf.clone(); ldf.unpivot(args).into() @@ -537,7 +540,8 @@ impl JsLazyFrame { #[napi(getter, js_name = "columns", catch_unwind)] pub fn columns(&mut self) -> napi::Result> { Ok(self - .ldf.collect_schema() + .ldf + .collect_schema() .map_err(JsPolarsErr::from)? .iter_names() .map(|s| s.as_str().into()) @@ -656,7 +660,13 @@ pub fn scan_csv(path: String, options: ScanCsvOptions) -> napi::Result napi::Result>, pub try_parse_hive_dates: Option, pub rechunk: Option, + pub schema: Option>, pub low_memory: Option, pub use_statistics: Option, pub cloud_options: Option>, pub retries: Option, pub include_file_paths: Option, + pub allow_missing_columns: Option, } #[napi(catch_unwind)] @@ -731,10 +747,10 @@ pub fn scan_parquet(path: String, options: ScanParquetOptions) -> napi::Result = if let Some(idn) = options.row_index_name { Some(RowIndex { name: idn.into(), - offset: options.row_index_offset.unwrap_or(0) + offset: options.row_index_offset.unwrap_or(0), }) - } else { - None + } else { + None }; let rechunk = options.rechunk.unwrap_or(false); @@ -760,6 +776,7 @@ pub fn scan_parquet(path: String, options: ScanParquetOptions) -> napi::Result napi::Result napi::Result, - ) -> JsExpr { + pub fn quantile(&self, quantile: &JsExpr, interpolation: Wrap) -> JsExpr { self.clone() .inner .quantile(quantile.inner.clone(), interpolation.0) @@ -450,7 +445,7 @@ impl JsExpr { self.clone() .inner .map( - move |s: Series| Ok(Some(s.gather_every(n as usize, offset as usize))), + move |s: Column| Ok(Some(s.gather_every(n as usize, offset as usize))), GetOutput::same_type(), ) .with_fmt("gather_every") @@ -674,10 +669,10 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_strip(&self) -> JsExpr { - let function = |s: Series| { + let function = |s: Column| { let ca = s.str()?; Ok(Some( - ca.apply(|s| Some(Cow::Borrowed(s?.trim()))).into_series(), + ca.apply(|s| Some(Cow::Borrowed(s?.trim()))).into_column(), )) }; self.clone() @@ -689,11 +684,11 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_rstrip(&self) -> JsExpr { - let function = |s: Series| { + let function = |s: Column| { let ca = s.str()?; Ok(Some( ca.apply(|s| Some(Cow::Borrowed(s?.trim_end()))) - .into_series(), + .into_column(), )) }; self.clone() @@ -705,11 +700,11 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_lstrip(&self) -> JsExpr { - let function = |s: Series| { + let function = |s: Column| { let ca = s.str()?; Ok(Some( ca.apply(|s| Some(Cow::Borrowed(s?.trim_start()))) - .into_series(), + .into_column(), )) }; self.clone() @@ -721,11 +716,11 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_pad_start(&self, length: i64, fill_char: String) -> JsExpr { - let function = move |s: Series| { + let function = move |s: Column| { let ca = s.str()?; Ok(Some( ca.pad_start(length as usize, fill_char.chars().nth(0).unwrap()) - .into_series(), + .into_column(), )) }; @@ -738,11 +733,11 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_pad_end(&self, length: i64, fill_char: String) -> JsExpr { - let function = move |s: Series| { + let function = move |s: Column| { let ca = s.str()?; Ok(Some( ca.pad_end(length as usize, fill_char.chars().nth(0).unwrap()) - .into_series(), + .into_column(), )) }; @@ -760,9 +755,9 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_to_uppercase(&self) -> JsExpr { - let function = |s: Series| { + let function = |s: Column| { let ca = s.str()?; - Ok(Some(ca.to_uppercase().into_series())) + Ok(Some(ca.to_uppercase().into_column())) }; self.clone() .inner @@ -782,9 +777,9 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_to_lowercase(&self) -> JsExpr { - let function = |s: Series| { + let function = |s: Column| { let ca = s.str()?; - Ok(Some(ca.to_lowercase().into_series())) + Ok(Some(ca.to_lowercase().into_column())) }; self.clone() .inner @@ -795,9 +790,9 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_lengths(&self) -> JsExpr { - let function = |s: Series| { + let function = |s: Column| { let ca = s.str()?; - Ok(Some(ca.str_len_chars().into_series())) + Ok(Some(ca.str_len_chars().into_column())) }; self.clone() .inner @@ -808,10 +803,10 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_replace(&self, pat: String, val: String) -> JsExpr { - let function = move |s: Series| { + let function = move |s: Column| { let ca = s.str()?; match ca.replace(&pat, &val) { - Ok(ca) => Ok(Some(ca.into_series())), + Ok(ca) => Ok(Some(ca.into_column())), Err(e) => Err(PolarsError::ComputeError(format!("{:?}", e).into())), } }; @@ -824,10 +819,10 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_replace_all(&self, pat: String, val: String) -> JsExpr { - let function = move |s: Series| { + let function = move |s: Column| { let ca = s.str()?; match ca.replace_all(&pat, &val) { - Ok(ca) => Ok(Some(ca.into_series())), + Ok(ca) => Ok(Some(ca.into_column())), Err(e) => Err(PolarsError::ComputeError(format!("{:?}", e).into())), } }; @@ -840,10 +835,10 @@ impl JsExpr { #[napi(catch_unwind)] pub fn str_contains(&self, pat: String, strict: bool) -> JsExpr { - let function = move |s: Series| { + let function = move |s: Column| { let ca = s.str()?; match ca.contains(&pat, strict) { - Ok(ca) => Ok(Some(ca.into_series())), + Ok(ca) => Ok(Some(ca.into_column())), Err(e) => Err(PolarsError::ComputeError(format!("{:?}", e).into())), } }; @@ -858,7 +853,7 @@ impl JsExpr { self.clone() .inner .map( - move |s| s.str().map(|s| Some(s.hex_encode().into_series())), + move |s| s.str().map(|s| Some(s.hex_encode().into_column())), GetOutput::same_type(), ) .with_fmt("str.hex_encode") @@ -869,7 +864,7 @@ impl JsExpr { self.clone() .inner .map( - move |s| s.str()?.hex_decode(strict).map(|s| Some(s.into_series())), + move |s| s.str()?.hex_decode(strict).map(|s| Some(s.into_column())), GetOutput::same_type(), ) .with_fmt("str.hex_decode") @@ -880,7 +875,7 @@ impl JsExpr { self.clone() .inner .map( - move |s| s.str().map(|s| Some(s.base64_encode().into_series())), + move |s| s.str().map(|s| Some(s.base64_encode().into_column())), GetOutput::same_type(), ) .with_fmt("str.base64_encode") @@ -895,7 +890,7 @@ impl JsExpr { move |s| { s.str()? .base64_decode(strict) - .map(|s| Some(s.into_series())) + .map(|s| Some(s.into_column())) }, GetOutput::same_type(), ) @@ -918,10 +913,10 @@ impl JsExpr { } #[napi(catch_unwind)] pub fn str_json_path_match(&self, pat: Wrap>) -> JsExpr { - let function = move |s: Series| { + let function = move |s: Column| { let ca = s.str()?; match ca.json_path_match(&pat.0) { - Ok(ca) => Ok(Some(ca.into_series())), + Ok(ca) => Ok(Some(ca.into_column())), Err(e) => Err(PolarsError::ComputeError(format!("{:?}", e).into())), } }; @@ -1037,7 +1032,7 @@ impl JsExpr { self.inner .clone() .map( - |s| Ok(Some(s.duration()?.days().into_series())), + |s| Ok(Some(s.duration()?.days().into_column())), GetOutput::from_type(DataType::Int64), ) .into() @@ -1047,7 +1042,7 @@ impl JsExpr { self.inner .clone() .map( - |s| Ok(Some(s.duration()?.hours().into_series())), + |s| Ok(Some(s.duration()?.hours().into_column())), GetOutput::from_type(DataType::Int64), ) .into() @@ -1057,7 +1052,7 @@ impl JsExpr { self.inner .clone() .map( - |s| Ok(Some(s.duration()?.seconds().into_series())), + |s| Ok(Some(s.duration()?.seconds().into_column())), GetOutput::from_type(DataType::Int64), ) .into() @@ -1067,7 +1062,7 @@ impl JsExpr { self.inner .clone() .map( - |s| Ok(Some(s.duration()?.nanoseconds().into_series())), + |s| Ok(Some(s.duration()?.nanoseconds().into_column())), GetOutput::from_type(DataType::Int64), ) .into() @@ -1077,7 +1072,7 @@ impl JsExpr { self.inner .clone() .map( - |s| Ok(Some(s.duration()?.milliseconds().into_series())), + |s| Ok(Some(s.duration()?.milliseconds().into_column())), GetOutput::from_type(DataType::Int64), ) .into() @@ -1095,9 +1090,10 @@ impl JsExpr { self.clone() .inner .map( - |s| { - s.timestamp(TimeUnit::Milliseconds) - .map(|ca| Some((ca / 1000).into_series())) + |s: Column| { + s.take_materialized_series() + .timestamp(TimeUnit::Milliseconds) + .map(|ca| Some((ca / 1000).into_column())) }, GetOutput::from_type(DataType::Int64), ) @@ -1109,9 +1105,9 @@ impl JsExpr { } #[napi(catch_unwind)] pub fn hash(&self, k0: Wrap, k1: Wrap, k2: Wrap, k3: Wrap) -> JsExpr { - let function = move |s: Series| { + let function = move |s: Column| { let hb = PlRandomState::with_seeds(k0.0, k1.0, k2.0, k3.0); - Ok(Some(s.hash(hb).into_series())) + Ok(Some(s.as_materialized_series().hash(hb).into_column())) }; self.clone() .inner @@ -1121,7 +1117,7 @@ impl JsExpr { #[napi(catch_unwind)] pub fn reinterpret(&self, signed: bool) -> JsExpr { - let function = move |s: Series| reinterpret(&s, signed).map(Some); + let function = move |s: Column| reinterpret(&s, signed).map(Some); let dt = if signed { DataType::Int64 } else { @@ -1205,7 +1201,7 @@ impl JsExpr { pub fn rolling_quantile( &self, quantile: f64, - interpolation: Wrap, + method: Wrap, window_size: i16, weights: Option>, min_periods: i64, @@ -1216,14 +1212,14 @@ impl JsExpr { min_periods: min_periods as usize, weights, center, - fn_params: Some(Arc::new(RollingQuantileParams { + fn_params: Some(RollingFnParams::Quantile(RollingQuantileParams { prob: quantile, - interpol: interpolation.0, - }) as Arc), + method: method.0, + })), }; self.inner .clone() - .rolling_quantile(interpolation.0, quantile, options) + .rolling_quantile(method.0, quantile, options) .into() } #[napi(catch_unwind)] @@ -1357,7 +1353,12 @@ impl JsExpr { .into() } #[napi(catch_unwind)] - pub fn rank(&self, method: Wrap, descending: bool, seed: Option>) -> JsExpr { + pub fn rank( + &self, + method: Wrap, + descending: bool, + seed: Option>, + ) -> JsExpr { // Safety: // Wrap is transparent. let seed: Option = unsafe { std::mem::transmute(seed) }; @@ -1407,7 +1408,7 @@ impl JsExpr { } #[napi(catch_unwind)] pub fn reshape(&self, dims: Vec) -> JsExpr { - self.inner.clone().reshape(&dims, NestedType::Array).into() + self.inner.clone().reshape(&dims).into() } #[napi(catch_unwind)] pub fn cum_count(&self, reverse: bool) -> JsExpr { @@ -1418,7 +1419,7 @@ impl JsExpr { self.inner .clone() .map( - |s| Ok(Some(s.to_physical_repr().into_owned())), + |s| Ok(Some(s.to_physical_repr().to_owned())), GetOutput::map_dtype(|dt| Ok(dt.to_physical())), ) .with_fmt("to_physical") @@ -1743,7 +1744,10 @@ pub fn arg_sort_by(by: Vec<&JsExpr>, descending: Vec) -> JsExpr { #[napi(catch_unwind)] pub fn lit(value: Wrap) -> JsResult { - let lit: LiteralValue = value.0.try_into().map_err(JsPolarsErr::from)?; + let lit: LiteralValue = value + .0 + .try_into() + .map_err(|e| napi::Error::from_reason(format!("{e:?}")))?; Ok(dsl::lit(lit).into()) } diff --git a/src/list_construction.rs b/src/list_construction.rs index 012112fc..ad652428 100644 --- a/src/list_construction.rs +++ b/src/list_construction.rs @@ -95,20 +95,84 @@ pub fn js_arr_to_list(name: &str, arr: &Array, dtype: &DataType) -> napi::Result let len = arr.len(); let s = match dtype { - DataType::Int8 => build_list_with_downcast!(PlSmallStr::from_str(name), arr, i8, DataType::Int8, Int8Type), - DataType::UInt8 => build_list_with_downcast!(PlSmallStr::from_str(name), arr, u8, DataType::UInt8, UInt8Type), - DataType::Int16 => build_list_with_downcast!(PlSmallStr::from_str(name), arr, i16, DataType::Int16, Int16Type), - DataType::UInt16 => build_list_with_downcast!(PlSmallStr::from_str(name), arr, u16, DataType::UInt16, UInt16Type), - DataType::Int32 => typed_option_or_null!(PlSmallStr::from_str(name), arr, i32, DataType::Int32, Int32Type), - DataType::UInt32 => typed_option_or_null!(PlSmallStr::from_str(name), arr, u32, DataType::UInt32, UInt32Type), + DataType::Int8 => build_list_with_downcast!( + PlSmallStr::from_str(name), + arr, + i8, + DataType::Int8, + Int8Type + ), + DataType::UInt8 => build_list_with_downcast!( + PlSmallStr::from_str(name), + arr, + u8, + DataType::UInt8, + UInt8Type + ), + DataType::Int16 => build_list_with_downcast!( + PlSmallStr::from_str(name), + arr, + i16, + DataType::Int16, + Int16Type + ), + DataType::UInt16 => build_list_with_downcast!( + PlSmallStr::from_str(name), + arr, + u16, + DataType::UInt16, + UInt16Type + ), + DataType::Int32 => typed_option_or_null!( + PlSmallStr::from_str(name), + arr, + i32, + DataType::Int32, + Int32Type + ), + DataType::UInt32 => typed_option_or_null!( + PlSmallStr::from_str(name), + arr, + u32, + DataType::UInt32, + UInt32Type + ), DataType::Float32 => { - build_list_with_downcast!(PlSmallStr::from_str(name), arr, f32, DataType::Float32, Float32Type) + build_list_with_downcast!( + PlSmallStr::from_str(name), + arr, + f32, + DataType::Float32, + Float32Type + ) } - DataType::Int64 => typed_option_or_null!(PlSmallStr::from_str(name), arr, i64, DataType::Int64, Int64Type), - DataType::Float64 => typed_option_or_null!(PlSmallStr::from_str(name), arr, f64, DataType::Float64, Float64Type), - DataType::UInt64 => build_list_with_downcast!(PlSmallStr::from_str(name), arr, u64, DataType::UInt64, UInt64Type), + DataType::Int64 => typed_option_or_null!( + PlSmallStr::from_str(name), + arr, + i64, + DataType::Int64, + Int64Type + ), + DataType::Float64 => typed_option_or_null!( + PlSmallStr::from_str(name), + arr, + f64, + DataType::Float64, + Float64Type + ), + DataType::UInt64 => build_list_with_downcast!( + PlSmallStr::from_str(name), + arr, + u64, + DataType::UInt64, + UInt64Type + ), DataType::String => { - let mut builder = ListStringChunkedBuilder::new(PlSmallStr::from_str(name), len as usize, (len as usize) * 5); + let mut builder = ListStringChunkedBuilder::new( + PlSmallStr::from_str(name), + len as usize, + (len as usize) * 5, + ); for idx in 0..len { let values: Either>, Null> = arr.get(idx)?.unwrap(); @@ -120,8 +184,11 @@ pub fn js_arr_to_list(name: &str, arr: &Array, dtype: &DataType) -> napi::Result builder.finish().into_series() } DataType::Boolean => { - let mut builder = - ListBooleanChunkedBuilder::new(PlSmallStr::from_str(name), len as usize, (len as usize) * 5); + let mut builder = ListBooleanChunkedBuilder::new( + PlSmallStr::from_str(name), + len as usize, + (len as usize) * 5, + ); for idx in 0..len { let values: Either>, Null> = arr.get(idx)?.unwrap(); @@ -144,8 +211,10 @@ pub fn js_arr_to_list(name: &str, arr: &Array, dtype: &DataType) -> napi::Result match values { Either::A(inner_arr) => { let inner_len = inner_arr.len(); - let mut inner_builder = - PrimitiveChunkedBuilder::::new(PlSmallStr::from_str(name), inner_len as usize); + let mut inner_builder = PrimitiveChunkedBuilder::::new( + PlSmallStr::from_str(name), + inner_len as usize, + ); for inner_idx in 0..inner_len { let item: Either = inner_arr.get(inner_idx)?.unwrap(); diff --git a/src/series.rs b/src/series.rs index a85c4aa8..0335fe25 100644 --- a/src/series.rs +++ b/src/series.rs @@ -1,6 +1,5 @@ use crate::dataframe::JsDataFrame; use crate::prelude::*; -use crate::utils::reinterpret; use polars_core::series::ops::NullBehavior; use polars_core::utils::CustomIterTools; @@ -164,7 +163,8 @@ impl JsSeries { strict: Option, ) -> napi::Result { let len = values.len(); - let mut builder = PrimitiveChunkedBuilder::::new(PlSmallStr::from_string(name), len); + let mut builder = + PrimitiveChunkedBuilder::::new(PlSmallStr::from_string(name), len); for item in values.into_iter() { match item.get_type()? { ValueType::Object => { @@ -204,8 +204,13 @@ impl JsSeries { ) -> napi::Result { let values = values.into_iter().map(|v| v.0).collect::>(); - let s = Series::from_any_values_and_dtype(PlSmallStr::from_string(name), &values, &dtype.0, strict) - .map_err(JsPolarsErr::from)?; + let s = Series::from_any_values_and_dtype( + PlSmallStr::from_string(name), + &values, + &dtype.0, + strict, + ) + .map_err(JsPolarsErr::from)?; Ok(s.into()) } @@ -802,11 +807,7 @@ impl JsSeries { } } #[napi(catch_unwind)] - pub fn quantile( - &self, - quantile: f64, - interpolation: Wrap, - ) -> JsAnyValue { + pub fn quantile(&self, quantile: f64, interpolation: Wrap) -> JsAnyValue { let binding = self .series .quantile_reduce(quantile, interpolation.0) @@ -875,7 +876,11 @@ impl JsSeries { #[napi(catch_unwind)] pub fn struct_fields(&self) -> napi::Result> { let ca = self.series.struct_().map_err(JsPolarsErr::from)?; - Ok(ca.struct_fields().iter().map(|s| s.name().as_str()).collect()) + Ok(ca + .struct_fields() + .iter() + .map(|s| s.name().as_str()) + .collect()) } // String Namespace @@ -1215,6 +1220,10 @@ impl JsSeries { #[napi(catch_unwind)] pub fn reshape(&self, dims: Vec) -> napi::Result { + let dims = dims + .into_iter() + .map(ReshapeDimension::new) + .collect::>(); let out = self.series.reshape_list(&dims).map_err(JsPolarsErr::from)?; Ok(out.into()) } diff --git a/src/utils.rs b/src/utils.rs index 0d22cd6f..98bab283 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,15 +1,15 @@ use polars::prelude::*; -pub fn reinterpret(s: &Series, signed: bool) -> polars::prelude::PolarsResult { +pub fn reinterpret(s: &Column, signed: bool) -> polars::prelude::PolarsResult { match (s.dtype(), signed) { (DataType::UInt64, true) => { let ca = s.u64().unwrap(); - Ok(ca.reinterpret_signed().into_series()) + Ok(ca.reinterpret_signed().into_column()) } (DataType::UInt64, false) => Ok(s.clone()), (DataType::Int64, false) => { let ca = s.i64().unwrap(); - Ok(ca.reinterpret_unsigned().into_series()) + Ok(ca.reinterpret_unsigned().into_column()) } (DataType::Int64, true) => Ok(s.clone()), _ => Err(PolarsError::ComputeError( diff --git a/yarn.lock b/yarn.lock index 7e3f4cbc..f84b6e3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -412,18 +412,18 @@ __metadata: languageName: node linkType: hard -"@biomejs/biome@npm:=1.9.3": - version: 1.9.3 - resolution: "@biomejs/biome@npm:1.9.3" - dependencies: - "@biomejs/cli-darwin-arm64": "npm:1.9.3" - "@biomejs/cli-darwin-x64": "npm:1.9.3" - "@biomejs/cli-linux-arm64": "npm:1.9.3" - "@biomejs/cli-linux-arm64-musl": "npm:1.9.3" - "@biomejs/cli-linux-x64": "npm:1.9.3" - "@biomejs/cli-linux-x64-musl": "npm:1.9.3" - "@biomejs/cli-win32-arm64": "npm:1.9.3" - "@biomejs/cli-win32-x64": "npm:1.9.3" +"@biomejs/biome@npm:=1.9.4": + version: 1.9.4 + resolution: "@biomejs/biome@npm:1.9.4" + dependencies: + "@biomejs/cli-darwin-arm64": "npm:1.9.4" + "@biomejs/cli-darwin-x64": "npm:1.9.4" + "@biomejs/cli-linux-arm64": "npm:1.9.4" + "@biomejs/cli-linux-arm64-musl": "npm:1.9.4" + "@biomejs/cli-linux-x64": "npm:1.9.4" + "@biomejs/cli-linux-x64-musl": "npm:1.9.4" + "@biomejs/cli-win32-arm64": "npm:1.9.4" + "@biomejs/cli-win32-x64": "npm:1.9.4" dependenciesMeta: "@biomejs/cli-darwin-arm64": optional: true @@ -443,62 +443,62 @@ __metadata: optional: true bin: biome: bin/biome - checksum: 10/22278454245f3ca178762df09721389abb884fbce87f834f6979a6a9d8db397df160a6d5019a3c7f6bd7d54d136bfaf1b6d3e6852fd9cf45bebc2be0337cb7dd + checksum: 10/bd8ff8fb4dc0581bd60a9b9ac28d0cd03ba17c6a1de2ab6228b7fda582079594ceee774f47e41aac2fc6d35de1637def2e32ef2e58fa24e22d1b24ef9ee5cefa languageName: node linkType: hard -"@biomejs/cli-darwin-arm64@npm:1.9.3": - version: 1.9.3 - resolution: "@biomejs/cli-darwin-arm64@npm:1.9.3" +"@biomejs/cli-darwin-arm64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-darwin-arm64@npm:1.9.4" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-darwin-x64@npm:1.9.3": - version: 1.9.3 - resolution: "@biomejs/cli-darwin-x64@npm:1.9.3" +"@biomejs/cli-darwin-x64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-darwin-x64@npm:1.9.4" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@biomejs/cli-linux-arm64-musl@npm:1.9.3": - version: 1.9.3 - resolution: "@biomejs/cli-linux-arm64-musl@npm:1.9.3" +"@biomejs/cli-linux-arm64-musl@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-linux-arm64-musl@npm:1.9.4" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-arm64@npm:1.9.3": - version: 1.9.3 - resolution: "@biomejs/cli-linux-arm64@npm:1.9.3" +"@biomejs/cli-linux-arm64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-linux-arm64@npm:1.9.4" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-linux-x64-musl@npm:1.9.3": - version: 1.9.3 - resolution: "@biomejs/cli-linux-x64-musl@npm:1.9.3" +"@biomejs/cli-linux-x64-musl@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-linux-x64-musl@npm:1.9.4" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@biomejs/cli-linux-x64@npm:1.9.3": - version: 1.9.3 - resolution: "@biomejs/cli-linux-x64@npm:1.9.3" +"@biomejs/cli-linux-x64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-linux-x64@npm:1.9.4" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@biomejs/cli-win32-arm64@npm:1.9.3": - version: 1.9.3 - resolution: "@biomejs/cli-win32-arm64@npm:1.9.3" +"@biomejs/cli-win32-arm64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-win32-arm64@npm:1.9.4" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@biomejs/cli-win32-x64@npm:1.9.3": - version: 1.9.3 - resolution: "@biomejs/cli-win32-x64@npm:1.9.3" +"@biomejs/cli-win32-x64@npm:1.9.4": + version: 1.9.4 + resolution: "@biomejs/cli-win32-x64@npm:1.9.4" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -1062,13 +1062,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^29.5.13": - version: 29.5.13 - resolution: "@types/jest@npm:29.5.13" +"@types/jest@npm:^29.5.14": + version: 29.5.14 + resolution: "@types/jest@npm:29.5.14" dependencies: expect: "npm:^29.0.0" pretty-format: "npm:^29.0.0" - checksum: 10/7d6e3e4ef4b1cab0f61270d55764709512fdfbcb1bd47c0ef44117d48490529c1f264dacf3440b9188363e99e290b80b79c529eadc3af2184116a90f6856b192 + checksum: 10/59ec7a9c4688aae8ee529316c43853468b6034f453d08a2e1064b281af9c81234cec986be796288f1bbb29efe943bc950e70c8fa8faae1e460d50e3cf9760f9b languageName: node linkType: hard @@ -1090,12 +1090,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^22.7.5": - version: 22.7.5 - resolution: "@types/node@npm:22.7.5" +"@types/node@npm:^22.8.6": + version: 22.8.6 + resolution: "@types/node@npm:22.8.6" dependencies: - undici-types: "npm:~6.19.2" - checksum: 10/e8ba102f8c1aa7623787d625389be68d64e54fcbb76d41f6c2c64e8cf4c9f4a2370e7ef5e5f1732f3c57529d3d26afdcb2edc0101c5e413a79081449825c57ac + undici-types: "npm:~6.19.8" + checksum: 10/27bb73f033eeec05b4ed52dbc521cac28fb7ac14af267119c9bae0318c97848cd790ac7f0a65924ace7ea717eae62e91bd227da4bd6c0217d0016a7a6cd0a156 languageName: node linkType: hard @@ -3305,11 +3305,11 @@ __metadata: version: 0.0.0-use.local resolution: "nodejs-polars@workspace:." dependencies: - "@biomejs/biome": "npm:=1.9.3" + "@biomejs/biome": "npm:=1.9.4" "@napi-rs/cli": "npm:^2.18.4" "@types/chance": "npm:^1.1.6" - "@types/jest": "npm:^29.5.13" - "@types/node": "npm:^22.7.5" + "@types/jest": "npm:^29.5.14" + "@types/node": "npm:^22.8.6" chance: "npm:^1.1.12" jest: "npm:^29.7.0" source-map-support: "npm:^0.5.21" @@ -4139,7 +4139,7 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~6.19.2": +"undici-types@npm:~6.19.8": version: 6.19.8 resolution: "undici-types@npm:6.19.8" checksum: 10/cf0b48ed4fc99baf56584afa91aaffa5010c268b8842f62e02f752df209e3dea138b372a60a963b3b2576ed932f32329ce7ddb9cb5f27a6c83040d8cd74b7a70