Skip to content

Commit d3031c3

Browse files
committed
fix: enable polars i128
1 parent aa9eaa0 commit d3031c3

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dfsql"
3-
version = "0.15.0"
3+
version = "0.15.1"
44
edition = "2024"
55
description = "SQL REPL for Data Frames"
66
license = "MIT"
@@ -21,6 +21,8 @@ polars = { version = "0.47", features = [
2121
"log",
2222
"strings",
2323
"dtype-categorical",
24+
# https://github.com/pola-rs/polars/issues/22733
25+
"dtype-i128",
2426
] }
2527
rustyline = { version = "15", features = ["derive"], optional = true }
2628
thiserror = "2"

src/df.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,23 @@ fn convert_expr(expr: &sql::expr::Expr) -> polars::lazy::dsl::Expr {
274274
},
275275
}
276276
}
277+
278+
#[cfg(test)]
279+
mod tests {
280+
use super::*;
281+
282+
/// ref: <https://github.com/pola-rs/polars/issues/22733>
283+
#[test]
284+
fn test_i128() {
285+
let s = "filter x = 0";
286+
let s = sql::parse(s).unwrap();
287+
let df = df!("x" => [0, 1]).unwrap();
288+
let mut executor = DfExecutor::new(
289+
"a".to_string(),
290+
HashMap::from_iter([("a".to_string(), df.lazy())]),
291+
)
292+
.unwrap();
293+
executor.execute(&s).unwrap();
294+
executor.df().clone().collect().unwrap();
295+
}
296+
}

0 commit comments

Comments
 (0)