Skip to content

Commit

Permalink
undo std::simd incorrect aggregation (#2852)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Mar 8, 2022
1 parent 34f8792 commit 68f8040
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 10 deletions.
4 changes: 2 additions & 2 deletions polars/polars-arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ description = "Arrow interfaces for Polars DataFrame library"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "81bfaddb92f432ae25bff4e9fdf200159ecebafe", default-features = false }
# arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", branch = "csv_write", default-features = false }
# arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "81bfaddb92f432ae25bff4e9fdf200159ecebafe", default-features = false }
arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", branch = "cherry_pick", default-features = false }
# arrow = { package = "arrow2", version = "0.9", default-features = false, features = ["compute_concatenate"] }
hashbrown = "0.12"
num = "^0.4"
Expand Down
8 changes: 4 additions & 4 deletions polars/polars-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ thiserror = "^1.0"

[dependencies.arrow]
package = "arrow2"
git = "https://github.com/jorgecarleitao/arrow2"
# git = "https://github.com/ritchie46/arrow2"
rev = "81bfaddb92f432ae25bff4e9fdf200159ecebafe"
# branch = "csv_write"
# git = "https://github.com/jorgecarleitao/arrow2"
git = "https://github.com/ritchie46/arrow2"
# rev = "81bfaddb92f432ae25bff4e9fdf200159ecebafe"
branch = "cherry_pick"
# version = "0.9"
default-features = false
features = [
Expand Down
4 changes: 2 additions & 2 deletions polars/polars-io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ private = []
[dependencies]
ahash = "0.7"
anyhow = "1.0"
arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "81bfaddb92f432ae25bff4e9fdf200159ecebafe", default-features = false }
# arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", branch = "csv_write", default-features = false }
# arrow = { package = "arrow2", git = "https://github.com/jorgecarleitao/arrow2", rev = "81bfaddb92f432ae25bff4e9fdf200159ecebafe", default-features = false }
arrow = { package = "arrow2", git = "https://github.com/ritchie46/arrow2", branch = "cherry_pick", default-features = false }
# arrow = { package = "arrow2", version = "0.9", default-features = false }
csv-core = { version = "0.1.10", optional = true }
dirs = "4.0"
Expand Down
21 changes: 19 additions & 2 deletions py-polars/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions py-polars/tests/db-benchmark/various.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,32 @@
assert np.isclose(
df.with_column(pl.col("value").cast(pl.Int32)).get_column("value").mean(), mean
)

# https://github.com/pola-rs/polars/issues/2850
df = pl.DataFrame(
{
"id": [
130352432,
130352277,
130352611,
130352833,
130352305,
130352258,
130352764,
130352475,
130352368,
130352346,
]
}
)

minimum = 130352258
maximum = 130352833.0

for _ in range(10):
permuted = df.sample(frac=1.0)
computed = permuted.select(
[pl.col("id").min().alias("min"), pl.col("id").max().alias("max")]
)
assert computed[0, "min"] == minimum
assert computed[0, "max"] == maximum

0 comments on commit 68f8040

Please sign in to comment.