apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
5.21k stars 957 forks source link

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

Closed intoraw closed 1 week ago

intoraw commented 2 weeks ago

Which issue does this PR close?

Closes #10377.

Rationale for this change

According to https://github.com/rust-lang/rust/pull/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

alamb commented 2 weeks ago

Thank you @intoraw and @jayzhan211

alamb commented 1 week ago

Looks like there are some more CI faiures to fix

intoraw commented 1 week ago

Looks like there are some more CI faiures to fix

Oh, i'll fix it.

intoraw commented 1 week ago

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 commented 1 week ago

Thanks @intoraw and @alamb