dr2chase opened a new pull request, #39087:
URL: https://github.com/apache/arrow/pull/39087
### Rationale for this change
Remove dependence on deprecated reflect.SliceHeader; new idioms tend
slightly faster, too.
### What changes are included in this PR?
Replaced "h.Data" with "unsafe.SliceData(b)", deleted dead code.
### Are these changes tested?
Yes, except for these three that were not covered by existing tests:
```
go/arrow/bitutil/bitutil.go:156 return
unsafe.Slice((*uint64)(unsafe.Pointer(unsafe.SliceData(b))),
cap(b)/uint64SizeBytes)[:len(b)/uint64SizeBytes]
go/arrow/type_traits_view.go:41 return
unsafe.Slice((*ViewHeader)(unsafe.Pointer(unsafe.SliceData(b))),
cap(b)/ViewHeaderSizeBytes)[:len(b)/ViewHeaderSizeBytes]
go/arrow/type_traits_view.go:45 return
unsafe.Slice((*byte)(unsafe.Pointer(unsafe.SliceData(b))),
cap(b)*ViewHeaderSizeBytes)[:len(b)*ViewHeaderSizeBytes]
```
Existing tests did cover the other 44 changed lines.
### Are there any user-facing changes?
No.
### Background: this is my first PR to Apache-arrow, normally I work on Go,
I am doing some 3rd-party code cleanup because the SliceHeader deprecation
might actually matter in the future.
<!--
Thanks for opening a pull request!
If this is your first pull request you can find detailed information on how
to contribute here:
* [New Contributor's
Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
* [Contributing
Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
If this is not a [minor
PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes).
Could you open an issue for this pull request on GitHub?
https://github.com/apache/arrow/issues/new/choose
Opening GitHub issues ahead of time contributes to the
[Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.)
of the Apache Arrow project.
Then could you also rename the pull request title in the following format?
GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
or
MINOR: [${COMPONENT}] ${SUMMARY}
In the case of PARQUET issues on JIRA the title also supports:
PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
-->
<!-- **This PR contains a "Critical Fix".** -->
--
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]