You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "rluvaton (via GitHub)" <gi...@apache.org> on 2026/06/10 10:19:27 UTC
[PR] chore: use internal_err macro in `assert_eq_or_internal_err` for backtrace [datafusion]
rluvaton opened a new pull request, #18910:
URL: https://github.com/apache/datafusion/pull/18910
## Which issue does this PR close?
N/A
## Rationale for this change
No backtrace is used from what I can see
## What changes are included in this PR?
used `internal_datafusion_err` macro
and remove all imports due to clippy: error: unused import: `DataFusionError`
## Are these changes tested?
yes manually
## Are there any user-facing changes?
Not really
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: add backtrace for `assert_*_or_internal_err` helpers [datafusion]
Posted by "rluvaton (via GitHub)" <gi...@apache.org>.
rluvaton commented on code in PR #18910:
URL: https://github.com/apache/datafusion/pull/18910#discussion_r3388676812
##########
datafusion/common/src/error.rs:
##########
@@ -1304,14 +1281,8 @@ mod test {
ok_result()
}
- let err = check().unwrap_err();
- assert_snapshot!(
- err.to_string(),
- @r"
- Internal error: Assertion failed: false: custom 42.
- This issue was likely caused by a bug in DataFusion's code. Please help us to resolve this by filing a bug report in our issue tracker: https://github.com/apache/datafusion/issues
- "
- );
+ let err = check().unwrap_err().strip_backtrace();
+ assert!(err.starts_with("Internal error: Assertion failed: false: custom 42"));
}
Review Comment:
Updated the code to use starts_with like done in the original pr that add the backtrace:
- https://github.com/apache/datafusion/pull/7434/changes#diff-bdc4c06f901055976f11cc28c8d3d75860c59ecb9d02d795b576145dc5e8b3a3
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: add backtrace for `assert_*_or_internal_err` helpers [datafusion]
Posted by "rluvaton (via GitHub)" <gi...@apache.org>.
rluvaton merged PR #18910:
URL: https://github.com/apache/datafusion/pull/18910
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: add backtrace for `assert_*_or_internal_err` helpers [datafusion]
Posted by "rluvaton (via GitHub)" <gi...@apache.org>.
rluvaton commented on PR #18910:
URL: https://github.com/apache/datafusion/pull/18910#issuecomment-4670711752
@Weijun-H fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: add backtrace for `assert_*_or_internal_err` helpers [datafusion]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18910:
URL: https://github.com/apache/datafusion/pull/18910#issuecomment-4669787383
<!-- semver-check-comment -->
Thank you for opening this pull request!
Reviewer note: [cargo-semver-checks](https://github.com/obi1kenobi/cargo-semver-checks) reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch).
<details>
<summary>Details</summary>
```
Cloning apache/main
Building datafusion-common v54.0.0 (current)
Built [ 34.785s] (current)
Parsing datafusion-common v54.0.0 (current)
Parsed [ 0.062s] (current)
Building datafusion-common v54.0.0 (baseline)
Built [ 32.233s] (baseline)
Parsing datafusion-common v54.0.0 (baseline)
Parsed [ 0.063s] (baseline)
Checking datafusion-common v54.0.0 -> v54.0.0 (no change; assume patch)
Checked [ 1.062s] 223 checks: 221 pass, 2 fail, 0 warn, 30 skip
--- failure inherent_method_missing: pub method removed or renamed ---
Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/inherent_method_missing.ron
Failed in:
Dialect::metadata, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/2ef2431ff13538c16aa6ae96950bc1790d384cf9/datafusion/common/src/config.rs:472
Dialect::available, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/2ef2431ff13538c16aa6ae96950bc1790d384cf9/datafusion/common/src/config.rs:477
--- failure struct_missing: pub struct removed or renamed ---
Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.48.0/src/lints/struct_missing.ron
Failed in:
struct datafusion_common::config::DialectInfo, previously in file /home/runner/work/datafusion/datafusion/target/semver-checks/git-apache_main/2ef2431ff13538c16aa6ae96950bc1790d384cf9/datafusion/common/src/config.rs:329
Summary semver requires new major version: 2 major and 0 minor checks failed
Finished [ 69.962s] datafusion-common
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: use internal_err macro in `assert_eq_or_internal_err` for backtrace [datafusion]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #18910:
URL: https://github.com/apache/datafusion/pull/18910#issuecomment-3797630440
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] chore: use internal_err macro in `assert_eq_or_internal_err` for backtrace [datafusion]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #18910: chore: use internal_err macro in `assert_eq_or_internal_err` for backtrace
URL: https://github.com/apache/datafusion/pull/18910
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: add backtrace for `assert_*_or_internal_err` helpers [datafusion]
Posted by "Weijun-H (via GitHub)" <gi...@apache.org>.
Weijun-H commented on PR #18910:
URL: https://github.com/apache/datafusion/pull/18910#issuecomment-4670054035
This PR breaks the backtrace-enabled tests for Internal errors.
I can reproduce this locally:
```
RUST_BACKTRACE=1 cargo test --profile ci --exclude datafusion-examples --exclude ffi_example_table_provider --exclude datafusion-cli --workspace --lib --tests --bins --features serde,avro,json,backtrace,integration-tests,parquet_encryption,substrait test_enabled_backtrace_for_assert_or_internal_err_without_args -- --nocapture
```
This fails in `assert_error_have_message_and_backtrace`, and the broader backtrace test filter also fails for all 7 newly added `test_enabled_backtrace_for_*` cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org