(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId)
| 663 | } |
| 664 | |
| 665 | func readUint32ListValues(buf *ByteBuffer, err *Error, length int, hasNull bool, typeID TypeId) []uint32 { |
| 666 | result := make([]uint32, length) |
| 667 | if !hasNull && typeID == UINT32 { |
| 668 | size := length * 4 |
| 669 | if isLittleEndian { |
| 670 | buf.Read(unsafe.Slice((*byte)(unsafe.Pointer(&result[0])), size)) |
| 671 | } else { |
| 672 | for i := 0; i < length; i++ { |
| 673 | result[i] = uint32(buf.ReadInt32(err)) |
| 674 | } |
| 675 | } |
| 676 | return result |
| 677 | } |
| 678 | for i := 0; i < length; i++ { |
| 679 | if hasNull && buf.ReadInt8(err) == NullFlag { |
| 680 | continue |
| 681 | } |
| 682 | if typeID == UINT32 { |
| 683 | result[i] = uint32(buf.ReadInt32(err)) |
| 684 | } else { |
| 685 | result[i] = buf.ReadVarUint32(err) |
| 686 | } |
| 687 | } |
| 688 | return result |
| 689 | } |
| 690 | |
| 691 | func writeInt64ListValues(buf *ByteBuffer, value []int64, typeID TypeId) { |
| 692 | switch typeID { |
no test coverage detected