Skip to content

Commit

Permalink
Merge pull request #1907 from jqnatividad/polars-0.41
Browse files Browse the repository at this point in the history
upgrade to polars 0.41.0
  • Loading branch information
jqnatividad authored Jun 22, 2024
2 parents f9f2449 + 778bf29 commit cc7ee34
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 64 deletions.
132 changes: 82 additions & 50 deletions Cargo.lock

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

8 changes: 2 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ mlua = { version = "0.9", features = [
num_cpus = "1"
odht = "0.3"
phf = { version = "0.11", features = ["macros"], optional = true }
polars = { version = "0.40", features = [
polars = { version = "0.41", features = [
"asof_join",
"avro",
"binary_encoding",
Expand All @@ -160,7 +160,7 @@ polars = { version = "0.40", features = [
"streaming",
"timezones",
], optional = true }
polars-ops = { version = "0.40", optional = true }
polars-ops = { version = "0.41", optional = true }
pyo3 = { version = "0.21", features = [
"auto-initialize",
"gil-refs",
Expand Down Expand Up @@ -257,10 +257,6 @@ grex = { git = "https://github.com/pemistahl/grex", rev = "0c8ab87" }
calamine = { git = "https://github.com/tafia/calamine", rev = "6b41309" }
# use modernized version of local_encoding
local-encoding = { git = "https://github.com/slonopotamus/local-encoding-rs", branch = "travis-madness" }
# latest Rust polars with unreleased fixes
# we track Python polars which has a much faster release cycle than Rust polars
polars = { git = "https://github.com/pola-rs/polars", tag = "py-1.0.0-beta.1" }
polars-ops = { git = "https://github.com/pola-rs/polars", tag = "py-1.0.0-beta.1" }

[features]
default = ["mimalloc"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
😣: uses additional memory proportional to the cardinality of the columns in the CSV.
🧠: expensive operations are memoized with available inter-session Redis/Disk caching for fetch commands.
🗄️: [Extended input support](#extended-input-support).
🐻‍❄️: command powered by [![polars 0.40.0](https://img.shields.io/badge/polars-0.40.0-blue)](https://github.com/pola-rs/polars/releases/tag/rs-0.40.0) engine.
🐻‍❄️: command powered by [![polars 0.41.0](https://img.shields.io/badge/polars-0.41.0-blue)](https://github.com/pola-rs/polars/releases/tag/rs-0.41.0) engine.
🤖: command uses Natural Language Processing & General AI techniques.
🏎️: multithreaded and/or faster when an index (📇) is available.
🚀: multithreaded even without an index.
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/sqlp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Polars SQL is a SQL dialect, converting SQL queries to fast Polars LazyFrame exp
(see https://docs.pola.rs/user-guide/sql/intro/).
For a list of SQL functions and keywords supported by Polars SQL, see
https://github.com/pola-rs/polars/blob/py-1.0.0-beta.1/crates/polars-sql/src/functions.rs and
https://github.com/pola-rs/polars/blob/py-1.0.0-beta.1/crates/polars-sql/src/keywords.rs.
https://github.com/pola-rs/polars/blob/rs-0.41.0/crates/polars-sql/src/functions.rs and
https://github.com/pola-rs/polars/blob/rs-0.41.0/crates/polars-sql/src/keywords.rs.
https://docs.pola.rs/py-polars/html/reference/sql/index.html also provides a more readable
version of the SQL functions and keywords, though be aware that it's for the Python version
of Polars, so there will be some minor syntax differences.
Expand Down
10 changes: 5 additions & 5 deletions tests/test_sqlp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -862,12 +862,12 @@ fn sqlp_boston311_explain() {
"SORT BY [col(""avg_tat""), col(""ward"")]"
AGGREGATE
" [[(col(""closed_dt"")) - (col(""open_dt""))].mean().strict_cast(Float64).alias(""avg_tat"")] BY [col(""ward"")] FROM"
Csv SCAN"#;
Csv SCAN"#;
assert!(got.starts_with(expected_begin));

let expected_end = r#"boston311-100.csv
PROJECT 4/29 COLUMNS
" SELECTION: [(col(""case_status"")) == (String(Closed))]""#;
let expected_end = r#"boston311-100.csv]
PROJECT 4/29 COLUMNS
" SELECTION: [(col(""case_status"")) == (String(Closed))]""#;
assert!(got.ends_with(expected_end));
}

Expand Down Expand Up @@ -1553,7 +1553,7 @@ fn sqlp_compound_join_diff_colnames() {

let got: Vec<Vec<String>> = wrk.read_stdout(&mut cmd);
let expected = vec![
svec!["a", "b", "b:test2", "a:test2", "c"],
svec!["a", "b", "a:test2", "b:test2", "c"],
svec!["2", "2", "2", "2", "8"],
svec!["3", "3", "3", "3", "9"],
];
Expand Down

0 comments on commit cc7ee34

Please sign in to comment.