apache / apache/datafusion

`physical_planner::tests::test_optimization_invariant_checker` fails on `release-nonlto` profile but not `test` profile

Open
#15,848 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Describe the bug

With `RUST_BACKTRACE=1 cargo test physical_planner::tests::test_optimization_invariant_checker --profile release-nonlto` on `head`

```
running 1 test
test physical_planner::tests::test_optimization_invariant_checker ... FAILED

failures:

---- physical_planner::tests::test_optimization_invariant_checker stdout ----

thread 'physical_planner::tests::test_optimization_invariant_checker' panicked at datafusion/core/src/physical_planner.rs:3110:14:
called `Result::unwrap_err()` on an `Ok` value: ()
stack backtrace:
0: rust_begin_unwind
at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/std/src/panicking.rs:695:5
1: core::panicking::panic_fmt
at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/panicking.rs:75:14
2: core::result::unwrap_failed
at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/result.rs:1704:5
3: datafusion::physical_planner::tests::test_optimization_invariant_checker
4: core::ops::function::FnOnce::call_once
5: core::ops::function::FnOnce::call_once
at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

failures:
physical_planner::tests::test_optimization_invariant_checker

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 361 filtered out; finished in 0.03s
```

### To Reproduce

```
RUST_BACKTRACE=1 cargo test physical_planner::tests::test_optimization_invariant_checker --profile release-nonlto
```

### Expected behavior

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Run the reported cargo test command with the release-nonlto profile, then inspect datafusion/core/src/physical_planner.rs around line 3110 and compare the result with the test profile. Determine why the optimization invariant checker returns Ok only under release-nonlto; done means the named test passes consistently in both profiles.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.