felipecrv commented on code in PR #37468:
URL: https://github.com/apache/arrow/pull/37468#discussion_r1352585089
##########
go/arrow/array/list.go:
##########
@@ -961,51 +960,18 @@ func outOfBoundsListViewSize(l offsetsAndSizes, slot
int64, offsetLimit int64) e
// Pre-condition: Basic validation has already been performed
func (a *array) fullyValidateOffsetsAndSizes(l offsetsAndSizes, offsetLimit
int64) error {
- validity := a.NullBitmapBytes()
-
- slot := int64(0)
- if validity != nil {
- counter := bitutils.NewBitBlockCounter(validity,
int64(a.Offset()), int64(a.Len()))
- var block bitutils.BitBlockCount
- for i := 0; i < a.Len(); i += int(block.Len) {
- block = counter.NextWord()
- if block.NoneSet() {
- continue
+ for slot := int64(0); slot < int64(a.Len()); slot += 1 {
+ size := l.sizeAt(slot)
+ if size > 0 {
+ offset := l.offsetAt(slot)
Review Comment:
They are low-level in that they don't check the validity and return whatever
offset/value is present on the buffers. `offsetAt`, for instance, could lead
people to mistakes as `List` offsets behave differently from `ListView` offsets
-- null lists have a non-0 offset to keep the ordering.
--
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]