Skip to content

Commit

Permalink
fix: use non-preserve-order jsonb
Browse files Browse the repository at this point in the history
  • Loading branch information
CookiePieWw committed Aug 29, 2024
1 parent 6d5241d commit cb88312
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ greptime-proto = { git = "https://github.com/GreptimeTeam/greptime-proto.git", r
humantime = "2.1"
humantime-serde = "1.1"
itertools = "0.10"
jsonb = "0.4"
jsonb = { git = "https://github.com/CookiePieWw/jsonb.git", branch = "trigger-preserve-order-feature"}
lazy_static = "1.4"
meter-core = { git = "https://github.com/GreptimeTeam/greptime-meter.git", rev = "80eb97c24c88af4dd9a86f8bbaf50e741d4eb8cd" }
mockall = "0.11.4"
Expand Down
2 changes: 1 addition & 1 deletion src/datatypes/src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ impl<'a> TryFrom<ValueRef<'a>> for serde_json::Value {
ValueRef::Interval(v) => serde_json::to_value(v.to_i128())?,
ValueRef::Duration(v) => serde_json::to_value(v.value())?,
ValueRef::Decimal128(v) => serde_json::to_value(v.to_string())?,
ValueRef::Json(v) => serde_json::to_value(jsonb::to_string(v))?,
ValueRef::Json(v) => jsonb::from_slice(v).unwrap_or_default().into(),
};

Ok(json_value)
Expand Down

0 comments on commit cb88312

Please sign in to comment.