Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: we now track py-polars release, instead of rust-polars #1854

Merged
merged 3 commits into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading