Skip to content

Commit

Permalink
fix inconsistency when using noasm tag
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroshade committed Sep 12, 2024
1 parent 589c3e4 commit 8edfb46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 2 additions & 3 deletions go/parquet/internal/utils/bit_packing_avx2_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ func _unpack32_avx2(in, out unsafe.Pointer, batchSize, nbits int) (num int)

func unpack32Avx2(in io.Reader, out []uint32, nbits int) int {
batch := len(out) / 32 * 32
if batch <= 0 {
n := batch * nbits / 8
if n <= 0 {
return 0
}

n := batch * nbits / 8

buffer := bufferPool.Get().(*bytes.Buffer)
defer bufferPool.Put(buffer)
buffer.Reset()
Expand Down
5 changes: 2 additions & 3 deletions go/parquet/internal/utils/bit_packing_neon_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ func _unpack32_neon(in, out unsafe.Pointer, batchSize, nbits int) (num int)

func unpack32NEON(in io.Reader, out []uint32, nbits int) int {
batch := len(out) / 32 * 32
if batch <= 0 {
n := batch * nbits / 8
if n <= 0 {
return 0
}

n := batch * nbits / 8

buffer := bufferPool.Get().(*bytes.Buffer)
defer bufferPool.Put(buffer)
buffer.Reset()
Expand Down
3 changes: 1 addition & 2 deletions go/parquet/pqarrow/file_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,5 @@ func TestReadParquetFile(t *testing.T) {
require.NoError(t, err)

_, err = arrowRdr.ReadTable(ctx)

assert.Error(t, err)
assert.NoError(t, err)
}

0 comments on commit 8edfb46

Please sign in to comment.