viirya opened a new pull request, #8009: URL: https://github.com/apache/arrow-rs/pull/8009
# Which issue does this PR close? - Closes #7549. # Rationale for this change The failure was described in the issue. In short, the buffer pointer of an empty buffer array exported from polars is a dangling pointer not aligned. But currently we take the raw pointer from C Data Interface and check its alignment before interpreting it as `ScalarBuffer`. Thus it causes the failure case. # What changes are included in this PR? This patch changes FFI module to create an empty buffer for exported buffer with length zero. As we never dereference the dangling pointer, seems it's not necessary to require the alignment for it. For non empty buffers, we still keep the alignment check. # Are these changes tested? Added a unit test with necessary utility functions. # Are there any user-facing changes? No -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
