Commit 3e006c9
authored
fix: reborrow metadata values when intersecting union metadata (#22491)
## Which issue does this PR close?
- Closes #22488.
## Rationale for this change
`intersect_metadata_for_union` compares values retained by
`HashMap::retain` with values from another metadata map. The retained
value is passed as `&mut String`, which can make `Option` equality
ambiguous for downstream crates when additional blanket `PartialEq`
implementations are in scope.
Reborrowing the retained value as `&String` keeps the comparison type
explicit without changing behavior.
## What changes are included in this PR?
The metadata retain predicate now compares `metadata.get(k)` with
`Some(&*v)` instead of `Some(v)`.
## Are these changes tested?
Yes.
- `cargo test -p datafusion-expr intersect_metadata_tests`
- `cargo fmt --all -- --check`
- `git diff --check`
## Are there any user-facing changes?
No runtime behavior change. This avoids a downstream compilation failure
in the reported dependency configuration.1 parent d9ea38b commit 3e006c9
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
662 | 662 | | |
663 | 663 | | |
664 | 664 | | |
665 | | - | |
| 665 | + | |
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
| |||
0 commit comments