You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/04/21 12:51:45 UTC
(datafusion) branch gh-readonly-queue/main/pr-21761-5baa6efa9c59c089ef09b849b7738ee49dc89f83 created (now 9a851d6c74)
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a change to branch gh-readonly-queue/main/pr-21761-5baa6efa9c59c089ef09b849b7738ee49dc89f83
in repository https://gitbox.apache.org/repos/asf/datafusion.git
at 9a851d6c74 fix: Fix local `datafusion-cli` test failure (#21761)
This branch includes the following new commits:
new 9a851d6c74 fix: Fix local `datafusion-cli` test failure (#21761)
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org
(datafusion) 01/01: fix: Fix local `datafusion-cli` test failure (#21761)
Posted by gi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-21761-5baa6efa9c59c089ef09b849b7738ee49dc89f83
in repository https://gitbox.apache.org/repos/asf/datafusion.git
commit 9a851d6c74a61250d1b005fa0eeb68143f8cc508
Author: Yongting You <20...@gmail.com>
AuthorDate: Tue Apr 21 20:51:26 2026 +0800
fix: Fix local `datafusion-cli` test failure (#21761)
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes #123` indicates that this PR will close issue #123.
-->
- Closes #.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->
One test case in `datafusion-cli` crate is failing locally if you run
all tests through `cargo nextest run`, but passes for `cargo test`
```
FAIL [ 0.375s] datafusion-cli::cli_integration cli_explain_environment_overrides
```
The reason is `nextest` triggers a different build graph, which enforces
a feature flag in `serde_json` dependency.
This PR enforces this feature in the `dev-dependencies` in
`datafusion-cli` crate, so the test become deterministic under different
test setup.
https://github.com/apache/datafusion/pull/21502 Fixed a similar issue,
and also explains why not enabling it in the global dependencies inside
`Cargo.toml`
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->
## Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
---
Cargo.lock | 1 +
datafusion-cli/Cargo.toml | 8 ++++++++
...ronment_overrides@explain_plan_environment_overrides.snap | 12 ++++++------
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 02da8661ee..e1ba084184 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1925,6 +1925,7 @@ dependencies = [
"regex",
"rstest",
"rustyline",
+ "serde_json",
"testcontainers-modules",
"tokio",
"url",
diff --git a/datafusion-cli/Cargo.toml b/datafusion-cli/Cargo.toml
index 40e0e50dac..19dc83d518 100644
--- a/datafusion-cli/Cargo.toml
+++ b/datafusion-cli/Cargo.toml
@@ -78,3 +78,11 @@ insta = { workspace = true }
insta-cmd = "0.6.0"
rstest = { workspace = true }
testcontainers-modules = { workspace = true, features = ["minio"] }
+# Makes sure `test_display_pg_json` behaves in a consistent way regardless of
+# feature unification with dependencies
+serde_json = { workspace = true, features = ["preserve_order"] }
+
+# 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"
diff --git a/datafusion-cli/tests/snapshots/cli_explain_environment_overrides@explain_plan_environment_overrides.snap b/datafusion-cli/tests/snapshots/cli_explain_environment_overrides@explain_plan_environment_overrides.snap
index 1359cefbe7..5f43ca88dc 100644
--- a/datafusion-cli/tests/snapshots/cli_explain_environment_overrides@explain_plan_environment_overrides.snap
+++ b/datafusion-cli/tests/snapshots/cli_explain_environment_overrides@explain_plan_environment_overrides.snap
@@ -18,19 +18,19 @@ exit_code: 0
| logical_plan | [ |
| | { |
| | "Plan": { |
-| | "Expressions": [ |
-| | "Int64(123)" |
-| | ], |
| | "Node Type": "Projection", |
-| | "Output": [ |
+| | "Expressions": [ |
| | "Int64(123)" |
| | ], |
| | "Plans": [ |
| | { |
| | "Node Type": "EmptyRelation", |
-| | "Output": [], |
-| | "Plans": [] |
+| | "Plans": [], |
+| | "Output": [] |
| | } |
+| | ], |
+| | "Output": [ |
+| | "Int64(123)" |
| | ] |
| | } |
| | } |
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org