IsValid check if the item in index-th place is valid or not
(index int)
| 752 | |
| 753 | // IsValid check if the item in index-th place is valid or not |
| 754 | func (reader *ArrayValueReader) IsValid(index int) bool { |
| 755 | nilOffset := CalculateListNilOffset(reader.itemType, int(reader.length)) |
| 756 | nilByte := *(*byte)(unsafe.Pointer(uintptr(reader.value) + uintptr(nilOffset) + uintptr(index/8))) |
| 757 | return nilByte&(0x1<<uint8(index%8)) != 0x0 |
| 758 | } |
| 759 | |
| 760 | // CalculateListElementBytes returns the total size in bytes needs to be allocated for a list type column for a single |
| 761 | // row along with the validity vector start. |
no test coverage detected