Skip to content

Commit

Permalink
Merge pull request #1854 from jqnatividad/polars-sync-pypolars-0.20.31
Browse files Browse the repository at this point in the history
`deps`: we now track py-polars release, instead of rust-polars
  • Loading branch information
jqnatividad authored Jun 1, 2024
2 parents ab9a46e + 85cd594 commit a2da7c1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
34 changes: 17 additions & 17 deletions Cargo.lock

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

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,10 @@ dynfmt = { git = "https://github.com/jqnatividad/dynfmt", branch = "2021-clippy_
grex = { git = "https://github.com/pemistahl/grex", rev = "0c8ab87" }
# calamine 0.25.0 with unreleased fixes
calamine = { git = "https://github.com/tafia/calamine", rev = "6b41309" }
# polars 0.40.0 with unreleased fixes
polars = { git = "https://github.com/pola-rs/polars", rev = "d7b4f72" }
polars-ops = { git = "https://github.com/pola-rs/polars", rev = "d7b4f72" }
# 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-0.20.31" }
polars-ops = { git = "https://github.com/pola-rs/polars", tag = "py-0.20.31" }

[features]
default = ["mimalloc"]
Expand Down
8 changes: 5 additions & 3 deletions src/cmd/sqlp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ 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/rs-0.40.0/crates/polars-sql/src/functions.rs
https://github.com/pola-rs/polars/blob/rs-0.40.0/crates/polars-sql/src/keywords.rs and
https://github.com/pola-rs/polars/issues/7227
https://github.com/pola-rs/polars/blob/rs-0.40.0/crates/polars-sql/src/functions.rs and
https://github.com/pola-rs/polars/blob/rs-0.40.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.
Returns the shape of the query result (number of rows, number of columns) to stderr.
Expand Down
10 changes: 5 additions & 5 deletions tests/test_sqlp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,24 @@ sqlp_test!(
cmd.arg("select * from cities full outer join places on cities.city = places.city");
let got: Vec<Vec<String>> = wrk.read_stdout(&mut cmd);
let expected1 = vec![
svec!["city", "state", "city_right", "place"],
svec!["city", "state", "city:places", "place"],
svec!["Boston", "MA", "Boston", "Logan Airport"],
svec!["Boston", "MA", "Boston", "Boston Garden"],
svec!["Buffalo", "NY", "Buffalo", "Ralph Wilson Stadium"],
svec!["", "", "Orlando", "Disney World"],
svec!["San Francisco", "CA", "", ""],
svec!["New York", "NY", "", ""],
svec!["San Francisco", "CA", "", ""],
];
let expected2 = vec![
svec!["city", "state", "city_right", "place"],
svec!["city", "state", "city:places", "place"],
svec!["Boston", "MA", "Boston", "Logan Airport"],
svec!["Boston", "MA", "Boston", "Boston Garden"],
svec!["Buffalo", "NY", "Buffalo", "Ralph Wilson Stadium"],
svec!["", "", "Orlando", "Disney World"],
svec!["New York", "NY", "", ""],
svec!["San Francisco", "CA", "", ""],
svec!["New York", "NY", "", ""],
];
// assert!(got == expected1 || got == expected2);
assert!(got == expected1 || got == expected2);
}
);

Expand Down

0 comments on commit a2da7c1

Please sign in to comment.