Skip to content

Commit

Permalink
Using rs-0.34 and git hashes (#141)
Browse files Browse the repository at this point in the history
* RS changes for 0.34.2

* Fixing tests

* Fixing tests

* Fixing tests

* Upgrading biome

* Update Cargo.toml as suggested

Co-authored-by: universalmind303 <[email protected]>

* Removing unused elements

* Using rs-0.34 and git hashes

---------

Co-authored-by: universalmind303 <[email protected]>
  • Loading branch information
Bidek56 and universalmind303 authored Nov 8, 2023
1 parent d14ff79 commit 9ed0b3e
Show file tree
Hide file tree
Showing 27 changed files with 444 additions and 435 deletions.
22 changes: 10 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ ahash = "0.8.3"
bincode = "1.3.3"
napi = {version = "2.13.3", default-features = false, features = ["napi8", "serde-json", "experimental"]}
napi-derive = {version = "2.13.0", default-features = false}
polars-core = {git = "https://github.com/pola-rs/polars.git", rev = "ec0c91f93fcd1ac355c667d6c3c3f30b257ea0a6", default-features = false}
polars-io = {git = "https://github.com/pola-rs/polars.git", rev = "ec0c91f93fcd1ac355c667d6c3c3f30b257ea0a6", default-features = false}
polars-lazy = {git = "https://github.com/pola-rs/polars.git", rev = "ec0c91f93fcd1ac355c667d6c3c3f30b257ea0a6", default-features = false}
polars-ops = {git = "https://github.com/pola-rs/polars.git", rev = "ec0c91f93fcd1ac355c667d6c3c3f30b257ea0a6", default-features = false}
thiserror = "1.0.47"
polars-core = {git = "https://github.com/pola-rs/polars.git", rev = "60adaef43e1b3306d5da8cf736accea2e3f03d9b", default-features = false}
polars-io = {git = "https://github.com/pola-rs/polars.git", rev = "60adaef43e1b3306d5da8cf736accea2e3f03d9b", default-features = false}
polars-lazy = {git = "https://github.com/pola-rs/polars.git", rev = "60adaef43e1b3306d5da8cf736accea2e3f03d9b", default-features = false}
thiserror = "1"
smartstring = { version = "1" }
serde_json = {version = "1"}
either = "1.9"
Expand All @@ -31,7 +30,7 @@ features = [
"binary_encoding",
"rolling_window",
"json",
"dynamic_groupby",
"dynamic_group_by",
"zip_with",
"simd",
"lazy",
Expand All @@ -46,7 +45,7 @@ features = [
"round_series",
"is_unique",
"is_in",
"is_first",
"is_first_distinct",
"asof_join",
"cross_join",
"dot_product",
Expand All @@ -69,7 +68,6 @@ features = [
"moment",
"true_div",
"dtype-categorical",
"string_justify",
"diagonal_concat",
"horizontal_concat",
"abs",
Expand All @@ -92,9 +90,11 @@ features = [
"list_eval",
"arg_where",
"timezones",
"peaks",
"string_justify",
]
git = "https://github.com/pola-rs/polars.git"
rev = "ec0c91f93fcd1ac355c667d6c3c3f30b257ea0a6"
rev = "60adaef43e1b3306d5da8cf736accea2e3f03d9b"

[build-dependencies]
napi-build = "2.0.1"
Expand All @@ -105,6 +105,4 @@ lto = "fat"

[features]
default = ["range"]
range = ["polars-lazy/range"]

[workspace]
range = ["polars-lazy/range"]
2 changes: 1 addition & 1 deletion __tests__/dataframe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ describe("dataframe", () => {
foo: [1, 2, 3, 1],
bar: [6, 7, 8, 1],
})
.shiftAndFill({ periods: -1, fillValue: 99 });
.shiftAndFill({ n: -1, fillValue: 99 });
const expected = pl.DataFrame({
foo: [2, 3, 1, 99],
bar: [7, 8, 1, 99],
Expand Down
4 changes: 2 additions & 2 deletions __tests__/expr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,10 @@ describe("expr", () => {
const actual = df.select(col("a").isFinite());
expect(actual).toFrameEqual(expected);
});
test("isFirst", () => {
test("isFirstDistinct", () => {
const df = pl.DataFrame({ a: [0, 1, 2, 2] });
const expected = pl.DataFrame({ a: [true, true, true, false] });
const actual = df.select(col("a").isFirst());
const actual = df.select(col("a").isFirstDistinct());
expect(actual).toFrameEqual(expected);
});
test("isIn:list", () => {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/functions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ describe("horizontal", () => {
const df = pl.DataFrame({ a: [1, 2, 3], b: [1.0, 2.0, 3.0] });
const out = df.select(
pl.sumHorizontal([pl.col("a"), pl.col("b")]),
pl.maxHorizontal([pl.col("a"), pl.col("b").pow(2)]),
pl.minHorizontal([pl.col("a"), pl.col("b").pow(2)]),
pl.maxHorizontal([pl.col("a"), pl.col("b").pow(2)]).alias("max"),
pl.minHorizontal([pl.col("a"), pl.col("b").pow(2)]).alias("min"),
);
expect(out["sum"]).toSeriesEqual(pl.Series("sum", [2.0, 4.0, 6.0]));
expect(out["max"]).toSeriesEqual(pl.Series("max", [1.0, 4.0, 9.0]));
Expand Down
18 changes: 9 additions & 9 deletions __tests__/groupby.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,9 @@ describe("groupby ops", () => {
})
.agg(pl.col("adm1_code").unique(), pl.col("fatalities").gt(0).sum());
const expected = [
new Date("2021-04-05"),
new Date("2021-05-05"),
new Date("2021-04-26"),
new Date("2021-04-11"),
new Date("2021-05-29"),
new Date("2021-04-29"),
];
const actual = out.getColumn("event_date");
expect(actual.toArray()).toEqual(expected);
Expand All @@ -223,9 +223,9 @@ describe("groupby ops", () => {
})
.agg(pl.col("adm1_code").unique(), pl.col("fatalities").gt(0).sum());
const expected = [
new Date("2021-04-05"),
new Date("2021-05-05"),
new Date("2021-04-26"),
new Date("2021-04-11"),
new Date("2021-05-29"),
new Date("2021-04-29"),
];
const actual = out.getColumn("event_date").toArray();
expect(actual).toEqual(expected);
Expand Down Expand Up @@ -254,9 +254,9 @@ describe("groupby ops", () => {
.agg(pl.col("idx"));
const expected = pl.DataFrame({
dt: [
new Date("2022-12-26"),
new Date("2023-01-26"),
new Date("2023-02-26"),
new Date("2023-01-01"),
new Date("2023-02-01"),
new Date("2023-03-01"),
],
idx: [[0, 1], [2], [3]],
});
Expand Down
4 changes: 2 additions & 2 deletions __tests__/lazyframe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ describe("lazyframe", () => {
bar: [6, 7, 8, 1],
})
.lazy()
.shiftAndFill({ periods: -1, fillValue: 99 })
.shiftAndFill({ n: -1, fillValue: 99 })
.collectSync();
const expected = pl.DataFrame({
foo: [2, 3, 1, 99],
Expand All @@ -898,7 +898,7 @@ describe("lazyframe", () => {
bar: [6, 7, 8, 1],
})
.lazy()
.shiftAndFill({ periods: -1, fillValue: pl.lit(99) })
.shiftAndFill({ n: -1, fillValue: 99 })
.collectSync();
const expected = pl.DataFrame({
foo: [2, 3, 1, 99],
Expand Down
Loading

0 comments on commit 9ed0b3e

Please sign in to comment.