Skip to content

chore: remove DataPtr trait since Arc::ptr_eq ignores pointer metadata - #10378

Merged
jayzhan211 merged 2 commits into
apache:mainfrom
intoraw:use-arc-ptr-eq
May 6, 2024
Merged

chore: remove DataPtr trait since Arc::ptr_eq ignores pointer metadata#10378
jayzhan211 merged 2 commits into
apache:mainfrom
intoraw:use-arc-ptr-eq

Conversation

@intoraw

@intoraw intoraw commented May 4, 2024

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #10377.

Rationale for this change

According to rust-lang/rust#106450, Arc::ptr_eq now compares two pointer without metadata.
So, it is safe to remove DataPtr trait and use Arc::ptr_eq directly.

What changes are included in this PR?

This PR removed the DataPtr trait and replace all Arc::data_ptr_eq with Arc::ptr_eq.

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions github-actions Bot added the core Core DataFusion crate label May 4, 2024

@jayzhan211 jayzhan211 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@alamb

alamb commented May 5, 2024

Copy link
Copy Markdown
Contributor

Thank you @intoraw and @jayzhan211

@alamb

alamb commented May 5, 2024

Copy link
Copy Markdown
Contributor

Looks like there are some more CI faiures to fix

@intoraw

intoraw commented May 5, 2024

Copy link
Copy Markdown
Contributor Author

Looks like there are some more CI faiures to fix

Oh, i'll fix it.

@intoraw

intoraw commented May 5, 2024

Copy link
Copy Markdown
Contributor Author

failures are caused by DataPtr related unit tests are not removed.
I run cargo test and cargo clippy locally, and it should be ok now.

@jayzhan211
jayzhan211 merged commit c1f1370 into apache:main May 6, 2024
@jayzhan211

Copy link
Copy Markdown
Contributor

Thanks @intoraw and @alamb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove DataPtr trait and use Arc::ptr_eq directly

3 participants