Skip to content

Commit

Permalink
Upgrade bigdecimal to 0.4.1, sqlparser to 0.36.1 (gluesql#1322)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinlee0 committed Jul 22, 2023
1 parent be7b432 commit 033d1e3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
16 changes: 12 additions & 4 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ iter-enum = "1"
itertools = "0.10"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sqlparser = { version = "0.35", features = ["serde", "bigdecimal"] }
sqlparser = { version = "0.36.1", features = ["serde", "bigdecimal"] }
thiserror = "1.0"
strum_macros = "0.24"
bigdecimal = { version = "0.3", features = ["serde", "string-only"] }
bigdecimal = { version = "0.4.1", features = ["serde", "string-only"] }
hex = "0.4"
rand = "0.8"
ordered-float = { version = "3.4.0", features = ["serde"] }
Expand Down
4 changes: 2 additions & 2 deletions core/src/ast_builder/expr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ mod tests {
let expected = "2048";
test_expr(actual, expected);

let actual = num(6.11);
let expected = "6.11";
let actual = num(6.5);
let expected = "6.5";
test_expr(actual, expected);

let actual = num("123.456");
Expand Down
4 changes: 2 additions & 2 deletions core/src/ast_builder/expr/numeric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ mod tests {
assert_eq!(NumericNode::from(1_u16).try_into(), num("1"));
assert_eq!(NumericNode::from(1_u32).try_into(), num("1"));
assert_eq!(NumericNode::from(1_u64).try_into(), num("1"));
assert_eq!(NumericNode::from(1.23_f32).try_into(), num("1.23"));
assert_eq!(NumericNode::from(4.56_f64).try_into(), num("4.56"));
assert_eq!(NumericNode::from(1.50_f32).try_into(), num("1.50"));
assert_eq!(NumericNode::from(4.125_f64).try_into(), num("4.125"));
assert_eq!(NumericNode::from("123.456").try_into(), num("123.456"));
assert_eq!(NumericNode::from("1.6".to_owned()).try_into(), num("1.6"));

Expand Down
2 changes: 1 addition & 1 deletion test-suite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ documentation.workspace = true
[dependencies]
gluesql-core.workspace = true
async-trait = "0.1"
bigdecimal = "0.3"
bigdecimal = "0.4.1"
chrono = "0.4"
rust_decimal = "1"
hex = "0.4"
Expand Down

0 comments on commit 033d1e3

Please sign in to comment.