diff --git a/Cargo.toml b/Cargo.toml index 577707a7e..26dc0b1b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,13 +15,13 @@ crate-type = ["cdylib", "lib"] [dependencies] ahash = "0.8.3" bincode = "1.3.3" -napi = {version = "2.14.0", default-features = false, features = ["napi8", "serde-json", "experimental"]} -napi-derive = {version = "2.14.1", default-features = false} +napi = {version = "2.14.1", default-features = false, features = ["napi8", "serde-json"]} +napi-derive = {version = "2.14.2", default-features = false} polars-core = {git = "https://github.com/pola-rs/polars.git", rev = "b13afbecac039205dacbaca766ecca4bf441b347", default-features = false} polars-io = {git = "https://github.com/pola-rs/polars.git", rev = "b13afbecac039205dacbaca766ecca4bf441b347", default-features = false} polars-lazy = {git = "https://github.com/pola-rs/polars.git", rev = "b13afbecac039205dacbaca766ecca4bf441b347", default-features = false} thiserror = "1" -smartstring = { version = "1" } +smartstring = {version = "1"} serde_json = {version = "1"} either = "1.9" @@ -52,7 +52,6 @@ features = [ "concat_str", "row_hash", "reinterpret", - "decompress-fast", "mode", "extract_jsonpath", "lazy_regex", @@ -66,8 +65,6 @@ features = [ "diff", "pct_change", "moment", - "true_div", - "dtype-categorical", "diagonal_concat", "horizontal_concat", "abs", diff --git a/__tests__/lazyframe.test.ts b/__tests__/lazyframe.test.ts index a68493ac1..7c8233a3c 100644 --- a/__tests__/lazyframe.test.ts +++ b/__tests__/lazyframe.test.ts @@ -27,7 +27,6 @@ describe("lazyframe", () => { const actual = await expected.lazy().collect(); expect(actual).toFrameEqual(expected); }); - test("describeOptimizedPlan", () => { const df = pl .DataFrame({ @@ -35,10 +34,23 @@ describe("lazyframe", () => { bar: ["a", "b"], }) .lazy(); - const actual = df.describeOptimizedPlan().replace(/\s+/g, " "); - expect(actual).toEqual( - `DF ["foo", "bar"]; PROJECT */2 COLUMNS; SELECTION: "None"`, - ); + let actual = df.describeOptimizedPlan().replace(/\s+/g, " "); + const expected = `DF ["foo", "bar"]; PROJECT */2 COLUMNS; SELECTION: "None"` + expect(actual).toEqual(expected); + actual = df.describePlan().replace(/\s+/g, " "); + expect(actual).toEqual(expected); + }); + test("cache", () => { + const df = pl.DataFrame({ + foo: [1, 2, 3], + }); + const expected = pl.DataFrame({ + foo: [1, 2, 3], + }); + let actual = df.lazy().cache().collectSync(); + expect(actual).toFrameEqual(expected); + actual = df.lazy().clone().collectSync(); + expect(actual).toFrameEqual(expected); }); test("drop", () => { const df = pl.DataFrame({ @@ -240,12 +252,10 @@ describe("lazyframe", () => { .lazy() .explode("list_1") .collectSync(); - const expected = pl.DataFrame({ letters: ["c", "c", "a", "a"], list_1: [1, 2, 1, 3], }); - expect(actual).toFrameEqualIgnoringOrder(expected); }); test("fetch", async () => {