diff --git a/Cargo.lock b/Cargo.lock index 983a74ed3cf03..f71c37f29a75f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2659,6 +2659,7 @@ dependencies = [ "object_store", "postgres-types", "regex", + "serde_json", "sqllogictest", "sqlparser", "tempfile", diff --git a/datafusion/expr/Cargo.toml b/datafusion/expr/Cargo.toml index 265651cfe0eb0..8cec01feb30b5 100644 --- a/datafusion/expr/Cargo.toml +++ b/datafusion/expr/Cargo.toml @@ -66,3 +66,6 @@ sqlparser = { workspace = true, optional = true } ctor = { workspace = true } env_logger = { workspace = true } insta = { workspace = true } +# Makes sure `test_display_pg_json` behaves in a consistent way regardless of +# feature unification with dependencies +serde_json = { workspace = true, features = ["preserve_order"] } diff --git a/datafusion/sqllogictest/Cargo.toml b/datafusion/sqllogictest/Cargo.toml index d7bb2583c9d8c..1159b7f3b703a 100644 --- a/datafusion/sqllogictest/Cargo.toml +++ b/datafusion/sqllogictest/Cargo.toml @@ -84,9 +84,17 @@ substrait = ["datafusion-substrait"] [dev-dependencies] env_logger = { workspace = true } regex = { workspace = true } +# Required to make sure tests for pg display behaves consistently +# regardless of feature unification with dependencies +serde_json = { workspace = true, features = ["preserve_order"] } tokio = { workspace = true, features = ["rt-multi-thread"] } [[test]] harness = false name = "sqllogictests" path = "bin/sqllogictests.rs" + +# Required because we pull serde_json with a feature to get consistent pg display, +# but its not directly used. +[package.metadata.cargo-machete] +ignored = "serde_json"