Skip to content

Commit

Permalink
deps: use latest polars upstream with unreleased fixes
Browse files Browse the repository at this point in the history
for "SELECT 1 from _t_1" should return height of result, not just the literal

Also, tweaked commented out plan visualization that doesn't seem to work in Rust
  • Loading branch information
jqnatividad committed Dec 10, 2024
1 parent 5f0c905 commit 5932e55
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 50 deletions.
64 changes: 22 additions & 42 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,9 @@ strum_macros = { git = "https://github.com/dathere/strum", branch = "bump-phf-to
# BUILD NOTE: Be sure to set QSV_POLARS_REV below to the latest commit short hash or tag
# of polars/py-polars before building qsv. This allows us to show the polars rev/tag in --version.
# if we are using a release version of Rust Polars, leave QSV_POLARS_REV empty
# QSV_POLARS_REV=
# polars = { git = "https://github.com/pola-rs/polars", tag = "py-1.16.0" }
# polars = { git = "https://github.com/pola-rs/polars", rev = "a6ca94d" }
# QSV_POLARS_REV=b12a543
# polars = { git = "https://github.com/pola-rs/polars", tag = "py-1.17.1" }
polars = { git = "https://github.com/pola-rs/polars", rev = "b12a543" }

[features]
default = ["mimalloc"]
Expand Down
36 changes: 31 additions & 5 deletions tests/test_sqlp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2081,6 +2081,30 @@ fn sqlp_string_concat() {
assert_eq!(got, expected);
}

#[test]
fn sqlp_select_1() {
let wrk = Workdir::new("sqlp_select_1");
wrk.create(
"test.csv",
vec![
svec!["x", "y", "z"],
svec!["a", "d", "1"],
svec!["", "e", "2"],
svec!["c", "f", "3"],
],
);

let mut cmd = wrk.command("sqlp");
cmd.arg("test.csv").arg("SELECT 1 from _t_1");

wrk.assert_success(&mut cmd);

let got = wrk.output_stderr(&mut cmd);
let expected = "(3, 1)";

assert!(got.starts_with(expected));
}

#[test]
fn sqlp_string_right_reverse() {
let wrk = Workdir::new("sqlp_string_right_reverse");
Expand Down Expand Up @@ -3015,21 +3039,23 @@ IT "This is a literal $,%,',"""
// );

// let output_dotfile = wrk.path("output.dot").to_string_lossy().to_string();
// std::env::set_var("POLARS_VISUALIZE_PHYSICAL_PLAN", output_dotfile.as_str());

// let mut cmd = wrk.command("sqlp");
// cmd.arg("data.csv").arg(
// r#"
// cmd.env("POLARS_VISUALIZE_PHYSICAL_PLAN", output_dotfile.as_str())
// .arg("data.csv")
// .arg(
// r#"
// SELECT a, b, c
// FROM data
// WHERE a > 2
// ORDER BY a DESC
// "#,
// ).arg("--streaming");
// )
// .arg("--streaming");

// wrk.assert_success(&mut cmd);

// // assert!(std::path::Path::new(&output_dotfile).exists());
// assert!(std::path::Path::new(&output_dotfile).exists());

// let got: Vec<Vec<String>> = wrk.read_stdout(&mut cmd);
// let expected = vec![
Expand Down

0 comments on commit 5932e55

Please sign in to comment.