Skip to content

Make test_display_pg_json pass regardless of build setup and dependencies#21502

Merged
Jefffrey merged 3 commits intoapache:mainfrom
AdamGS:adamg/fix-pg-viz-test
Apr 18, 2026
Merged

Make test_display_pg_json pass regardless of build setup and dependencies#21502
Jefffrey merged 3 commits intoapache:mainfrom
AdamGS:adamg/fix-pg-viz-test

Conversation

@AdamGS
Copy link
Copy Markdown
Contributor

@AdamGS AdamGS commented Apr 9, 2026

Which issue does this PR close?

Rationale for this change

Running tests for datafusion-expr currently fails locally, but due to feature unification with the subtrait dependency it does pass in CI.

What changes are included in this PR?

Enables a feature for a dependency during tests.

Are these changes tested?

Ran tests for the crate directly.

Are there any user-facing changes?

None.

@AdamGS AdamGS changed the title Make pass regardless of build setup and dependencies Make test_display_pg_json pass regardless of build setup and dependencies Apr 9, 2026
@github-actions github-actions Bot added the logical-expr Logical plan and expressions label Apr 9, 2026
@AdamGS AdamGS force-pushed the adamg/fix-pg-viz-test branch from 5615771 to dd68f71 Compare April 9, 2026 10:17
@AdamGS
Copy link
Copy Markdown
Contributor Author

AdamGS commented Apr 9, 2026

Just realized that there's a SLT test that has the same question in explain.slt:642, it just runs explain format pgjson select * from values (1);. I'll add the same fix to the sqllogictest crate, I think its best to avoid enabling it globally because its a pretty popular crate and we don't want to impact downstream users.

@github-actions github-actions Bot added the sqllogictest SQL Logic Tests (.slt) label Apr 9, 2026
Signed-off-by: Adam Gutglick <adamgsal@gmail.com>
Copy link
Copy Markdown
Contributor

@Jefffrey Jefffrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. I think I'm hitting a similar issue with a vanilla cargo test where cli_explain_environment_overrides in datafusion-cli fails 🤔

@Jefffrey Jefffrey added this pull request to the merge queue Apr 18, 2026
@Jefffrey
Copy link
Copy Markdown
Contributor

Thanks @AdamGS

Merged via the queue into apache:main with commit 8a650f5 Apr 18, 2026
34 checks passed
Rich-T-kid pushed a commit to Rich-T-kid/datafusion that referenced this pull request Apr 21, 2026
…encies (apache#21502)

## Which issue does this PR close?

- Closes #apache#21501.

## Rationale for this change

Running tests for `datafusion-expr` currently fails locally, but due to
feature unification with the `subtrait` dependency it does pass in CI.

## What changes are included in this PR?

Enables a feature for a dependency during tests.

## Are these changes tested?

Ran tests for the crate directly.

## Are there any user-facing changes?

None.

---------

Signed-off-by: Adam Gutglick <adamgsal@gmail.com>
adriangb pushed a commit to pydantic/datafusion that referenced this pull request Apr 21, 2026
## 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 apache#123` indicates that this PR will close issue apache#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.

apache#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.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

logical-expr Logical plan and expressions sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants