mojo-data / arrow.mojo

Apache Arrow in Mojo🔥
Apache License 2.0
31 stars 4 forks source link

Refactor buffer to use DTypePointer #22

Closed martinvuyk closed 2 weeks ago

martinvuyk commented 2 weeks ago

DTypePointer currently still uses LegacyPointer underneath but I imagine they will refactor in the future. And later we might have to migrate to UnsafePointer once all the functionality is available.

sa- commented 2 weeks ago

Thanks for the PR! Could you please describe the benefits of using DTypePointer vs Legacy or UnsafePointer?

martinvuyk commented 2 weeks ago

Thanks for the PR! Could you please describe the benefits of using DTypePointer vs Legacy or UnsafePointer?

UnsafePointer doesn't have the alignment functionality as you pointed out in your PR on the Mojo repo that solved it. LegacyPointer is getting deprecated. DTypePointer is made to be able to be used with SIMD. DType defines the MLIR dialects that Mojo supports and is used to define the Scalars that exist in the Mojo language.

sa- commented 2 weeks ago

Sounds good - congrats on having your first PR merged!