diff --git a/Cargo.lock b/Cargo.lock index 1fd3d3739..66a2ef325 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3446,9 +3446,9 @@ dependencies = [ [[package]] name = "lexical-util" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee72ef7886d94f30741743126c1ec123564749ee339281b9834d0e913f2d40fe" +checksum = "5a82e24bf537fd24c177ffbbdc6ebcc8d54732c35b50a3f28cc3f4e4c949a0b3" dependencies = [ "static_assertions", ] @@ -4529,8 +4529,7 @@ dependencies = [ [[package]] name = "polars" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0af18ae021b0396c42f39396146332957ebc4d4d25d931b4fe73509948f348" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "getrandom", "polars-arrow", @@ -4549,8 +4548,7 @@ dependencies = [ [[package]] name = "polars-arrow" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1fd3c64d50b7f5f328e1566cab9979d4bc1ba2ff22114b301ed2ee0e518dbca" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "ahash", "atoi", @@ -4594,8 +4592,7 @@ dependencies = [ [[package]] name = "polars-compute" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e60822c245a870113df5a88fb184039501eda0a56bcd0c3f866406ff659df340" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "atoi_simd", "bytemuck", @@ -4616,8 +4613,7 @@ dependencies = [ [[package]] name = "polars-core" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4794a9e38ef2faf7e47a6f736c7f156c6fbb66cd529f82593b2d48348e422c8d" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "ahash", "bitflags 2.6.0", @@ -4653,8 +4649,7 @@ dependencies = [ [[package]] name = "polars-error" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "100093a164bf6c001487ea528b7504f4be1a6881bcffe279bd6133e8f4b4e4f7" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "avro-schema", "object_store", @@ -4667,8 +4662,7 @@ dependencies = [ [[package]] name = "polars-expr" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad56c5ea4d6e0546fbc3fa35918a537b76587600a5118770ed331136249d50d8" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "ahash", "bitflags 2.6.0", @@ -4691,8 +4685,7 @@ dependencies = [ [[package]] name = "polars-io" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95d774d5971d2092f0588e89d2f0be524dff35ea368272c0810ba54a860e4411" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "ahash", "async-trait", @@ -4740,8 +4733,7 @@ dependencies = [ [[package]] name = "polars-json" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d97ebf73da016f4af4e5af8663523137e273e09d1a459e0cf87b5fdfd8f007" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "ahash", "chrono", @@ -4763,8 +4755,7 @@ dependencies = [ [[package]] name = "polars-lazy" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa457bfa96f45cf14c33507eaa3ebcec6a8d52e7f7fc60cd23f338631369d417" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "ahash", "bitflags 2.6.0", @@ -4791,8 +4782,7 @@ dependencies = [ [[package]] name = "polars-mem-engine" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73aa56fc0a4c1e9d56b4a4485800f4780ca214030d32d0150eccc44f71d6dab" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "futures", "memmap2", @@ -4813,8 +4803,7 @@ dependencies = [ [[package]] name = "polars-ops" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b267480495ffe382dab63318e3c6bf4073bb82971c8b80294d079293fece458b" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "ahash", "argminmax", @@ -4849,8 +4838,7 @@ dependencies = [ [[package]] name = "polars-parquet" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20237f232b1a74b1fae6b5c9bea8c440f2e5d3b5506601b038f0a7a34b84b710" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "ahash", "async-stream", @@ -4888,8 +4876,7 @@ dependencies = [ [[package]] name = "polars-pipe" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e3066f4fea8e55e72eba54ffe20ebdf08f63b9691aba8ea1135c3aeb9c2c7e" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "crossbeam-channel", "crossbeam-queue", @@ -4915,8 +4902,7 @@ dependencies = [ [[package]] name = "polars-plan" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99a3832887671df1eb326df52cbfcc47789d3d58454c1084a154b48b240175e2" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "ahash", "bitflags 2.6.0", @@ -4951,8 +4937,7 @@ dependencies = [ [[package]] name = "polars-row" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e36350fb8a90238e02c8ece0f0c4c24f3374197e9c08c1c22cc8b9c526e6c25" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "bitflags 2.6.0", "bytemuck", @@ -4965,8 +4950,7 @@ dependencies = [ [[package]] name = "polars-schema" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c6aa4913cffc522cea3ccbc0cafb350bec18fed0a1ef8d417ac88ea320d7749" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "indexmap", "polars-error", @@ -4978,8 +4962,7 @@ dependencies = [ [[package]] name = "polars-sql" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a2247028629b1db384437a9f2792488f0ddb539ec16fb46a5e2bceeba6dbc" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "hex", "once_cell", @@ -5000,8 +4983,7 @@ dependencies = [ [[package]] name = "polars-stream" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd9da4b063146c3ab7c08678a52eb9d466ade4f4c8617605a5a3ea063002c6" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "atomic-waker", "crossbeam-deque", @@ -5030,8 +5012,7 @@ dependencies = [ [[package]] name = "polars-time" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f005c3441eed1a96464305f73e197813cbae7894ff6712726a1182e31f52b4" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "atoi", "bytemuck", @@ -5053,8 +5034,7 @@ dependencies = [ [[package]] name = "polars-utils" version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0fc010eea42ad113b641aa53106e4d6e474650c73573d959a546eed0ce6d479" +source = "git+https://github.com/pola-rs/polars?rev=b12a543#b12a543653de1294fc6d4d648537e3ef46fa7130" dependencies = [ "ahash", "bytemuck", diff --git a/Cargo.toml b/Cargo.toml index a81541eb5..15678dd15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] diff --git a/tests/test_sqlp.rs b/tests/test_sqlp.rs index 8cb272d00..eae1ddc81 100644 --- a/tests/test_sqlp.rs +++ b/tests/test_sqlp.rs @@ -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"); @@ -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> = wrk.read_stdout(&mut cmd); // let expected = vec![