diff options
Diffstat (limited to 'vendor/github.com/apache/arrow/go')
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/LICENSE.txt (renamed from vendor/github.com/apache/arrow/go/v14/LICENSE.txt) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/.editorconfig (renamed from vendor/github.com/apache/arrow/go/v14/arrow/.editorconfig) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/.gitignore (renamed from vendor/github.com/apache/arrow/go/v14/arrow/.gitignore) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/Gopkg.lock (renamed from vendor/github.com/apache/arrow/go/v14/arrow/Gopkg.lock) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/Gopkg.toml (renamed from vendor/github.com/apache/arrow/go/v14/arrow/Gopkg.toml) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/Makefile (renamed from vendor/github.com/apache/arrow/go/v14/arrow/Makefile) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array.go) | 6 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/array.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/array.go) | 9 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/binary.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/binary.go) | 134 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/binarybuilder.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/binarybuilder.go) | 337 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/boolean.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/boolean.go) | 8 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/booleanbuilder.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/booleanbuilder.go) | 10 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder.go) | 114 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder_byte.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder_byte.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder_numeric.gen.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder_numeric.gen.go) | 6 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder_numeric.gen.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder_numeric.gen.go.tmpl) | 6 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/builder.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/builder.go) | 12 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/compare.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/compare.go) | 18 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/concat.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/concat.go) | 46 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/data.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/data.go) | 33 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/decimal128.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/decimal128.go) | 12 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/decimal256.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/decimal256.go) | 12 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/dictionary.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/dictionary.go) | 24 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/diff.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/diff.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/doc.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/doc.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/encoded.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/encoded.go) | 18 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/extension.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/extension.go) | 6 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/extension_builder.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/extension_builder.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/fixed_size_list.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/fixed_size_list.go) | 10 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/fixedsize_binary.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/fixedsize_binary.go) | 4 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/fixedsize_binarybuilder.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/fixedsize_binarybuilder.go) | 8 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/float16.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/float16.go) | 6 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/float16_builder.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/float16_builder.go) | 12 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/interval.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/interval.go) | 10 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/json_reader.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/json_reader.go) | 8 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/list.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/list.go) | 158 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/map.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/map.go) | 6 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/null.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/null.go) | 8 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/numeric.gen.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/numeric.gen.go) | 4 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/numeric.gen.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/numeric.gen.go.tmpl) | 4 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/numericbuilder.gen.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/numericbuilder.gen.go) | 10 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/numericbuilder.gen.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/numericbuilder.gen.go.tmpl) | 10 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/numericbuilder.gen_test.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/numericbuilder.gen_test.go.tmpl) | 6 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/record.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/record.go) | 20 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/string.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/string.go) | 219 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/struct.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/struct.go) | 12 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/table.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/table.go) | 12 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/timestamp.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/timestamp.go) | 10 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/union.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/union.go) | 20 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/array/util.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/array/util.go) | 12 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/arrio/arrio.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/arrio/arrio.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/Makefile (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/Makefile) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_arm64.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_arm64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_avx2_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_avx2_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_avx2_amd64.s (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_avx2_amd64.s) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_noasm.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_noasm.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_ppc64le.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_ppc64le.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_s390x.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_s390x.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_sse4_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_sse4_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_sse4_amd64.s (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_sse4_amd64.s) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmaps.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmaps.go) | 8 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitutil.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitutil.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/endian_default.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/endian_default.go) | 1 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/bitutil/endian_s390x.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/bitutil/endian_s390x.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/compare.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/compare.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/datatype.go) | 11 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_binary.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/datatype_binary.go) | 41 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_encoded.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/datatype_encoded.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_extension.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/datatype_extension.go) | 11 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_fixedwidth.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/datatype_fixedwidth.go) | 28 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_nested.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/datatype_nested.go) | 20 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_null.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/datatype_null.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_numeric.gen.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/datatype_numeric.gen.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_numeric.gen.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/arrow/datatype_numeric.gen.go.tmpl) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_numeric.gen.go.tmpldata (renamed from vendor/github.com/apache/arrow/go/v14/arrow/datatype_numeric.gen.go.tmpldata) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader.go | 141 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline.go | 31 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline_go1.19.go | 35 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline_tinygo.go | 35 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/decimal128/decimal128.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/decimal128/decimal128.go) | 52 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/decimal256/decimal256.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/decimal256/decimal256.go) | 51 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/doc.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/doc.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/encoded/ree_utils.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/encoded/ree_utils.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/endian/big.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/endian/big.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/endian/endian.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/endian/endian.go) | 4 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/endian/little.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/endian/little.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/errors.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/errors.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/float16/float16.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/float16/float16.go) | 46 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/assert_off.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/assert_off.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/assert_on.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/assert_on.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/doc.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/doc.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/log_off.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/log_off.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/log_on.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/log_on.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/util.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/util.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/dictutils/dict.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/dictutils/dict.go) | 17 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Binary.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Binary.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/BinaryView.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/BinaryView.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Block.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Block.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/BodyCompression.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/BodyCompression.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/BodyCompressionMethod.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/BodyCompressionMethod.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Bool.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Bool.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Buffer.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Buffer.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/CompressionType.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/CompressionType.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Date.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Date.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DateUnit.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DateUnit.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Decimal.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Decimal.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DictionaryBatch.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DictionaryBatch.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DictionaryEncoding.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DictionaryEncoding.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DictionaryKind.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DictionaryKind.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Duration.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Duration.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Endianness.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Endianness.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Feature.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Feature.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Field.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Field.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FieldNode.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FieldNode.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FixedSizeBinary.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FixedSizeBinary.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FixedSizeList.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FixedSizeList.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FloatingPoint.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FloatingPoint.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Footer.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Footer.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Int.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Int.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Interval.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Interval.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/IntervalUnit.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/IntervalUnit.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/KeyValue.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/KeyValue.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeBinary.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeBinary.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeList.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeList.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeListView.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeListView.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeUtf8.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeUtf8.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/List.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/List.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/ListView.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/ListView.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Map.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Map.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Message.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Message.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/MessageHeader.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/MessageHeader.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/MetadataVersion.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/MetadataVersion.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Null.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Null.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Precision.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Precision.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/RecordBatch.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/RecordBatch.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/RunEndEncoded.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/RunEndEncoded.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/RunLengthEncoded.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/RunLengthEncoded.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Schema.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Schema.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseMatrixIndexCSR.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseMatrixIndexCSR.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseMatrixIndexCSX.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseMatrixIndexCSX.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensor.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensor.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensorIndex.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensorIndex.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensorIndexCOO.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensorIndexCOO.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensorIndexCSF.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensorIndexCSF.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Struct_.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Struct_.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Tensor.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Tensor.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/TensorDim.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/TensorDim.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Time.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Time.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/TimeUnit.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/TimeUnit.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Timestamp.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Timestamp.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Type.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Type.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Union.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Union.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/UnionMode.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/UnionMode.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Utf8.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Utf8.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Utf8View.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Utf8View.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/internal/utils.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/internal/utils.go) | 16 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/ipc/compression.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/ipc/compression.go) | 10 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/ipc/endian_swap.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/ipc/endian_swap.go) | 10 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/ipc/file_reader.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/ipc/file_reader.go) | 93 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/ipc/file_writer.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/ipc/file_writer.go) | 10 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/ipc/ipc.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/ipc/ipc.go) | 8 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/ipc/message.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/ipc/message.go) | 16 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/ipc/metadata.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/ipc/metadata.go) | 60 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/ipc/reader.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/ipc/reader.go) | 14 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/ipc/writer.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/ipc/writer.go) | 210 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/Makefile (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/Makefile) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/allocator.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/allocator.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/buffer.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/buffer.go) | 14 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/cgo_allocator.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/cgo_allocator.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/cgo_allocator_defaults.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/cgo_allocator_defaults.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/cgo_allocator_logging.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/cgo_allocator_logging.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/checked_allocator.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/checked_allocator.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/default_allocator.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/default_allocator.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/default_mallocator.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/default_mallocator.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/doc.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/doc.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/go_allocator.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/go_allocator.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/allocator.cc (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/allocator.cc) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/allocator.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/allocator.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/allocator.h (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/allocator.h) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/helpers.h (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/helpers.h) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/mallocator/doc.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/mallocator/doc.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/mallocator/mallocator.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/mallocator/mallocator.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_arm64.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_arm64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_avx2_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_avx2_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_avx2_amd64.s (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_avx2_amd64.s) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_js_wasm.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_js_wasm.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_neon_arm64.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_neon_arm64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_neon_arm64.s (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_neon_arm64.s) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_noasm.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_noasm.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_sse4_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_sse4_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_sse4_amd64.s (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_sse4_amd64.s) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/memory/util.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/memory/util.go) | 8 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/numeric.schema.json (renamed from vendor/github.com/apache/arrow/go/v14/arrow/numeric.schema.json) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/numeric.tmpldata (renamed from vendor/github.com/apache/arrow/go/v14/arrow/numeric.tmpldata) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/record.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/record.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/schema.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/schema.go) | 8 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/table.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/table.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/tools.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/tools.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_string.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/type_string.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits.go | 162 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits_boolean.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/type_traits_boolean.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits_decimal128.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/type_traits_decimal128.go) | 13 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits_decimal256.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/type_traits_decimal256.go) | 13 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits_float16.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/type_traits_float16.go) | 13 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits_interval.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/type_traits_interval.go) | 29 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits_numeric.gen.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/type_traits_numeric.gen.go) | 123 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits_numeric.gen.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/arrow/type_traits_numeric.gen.go.tmpl) | 11 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits_numeric.gen_test.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/arrow/type_traits_numeric.gen_test.go.tmpl) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits_timestamp.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/type_traits_timestamp.go) | 11 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/type_traits_view.go | 48 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/arrow/unionmode_string.go (renamed from vendor/github.com/apache/arrow/go/v14/arrow/unionmode_string.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/bitutils/bit_block_counter.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/bitutils/bit_block_counter.go) | 6 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/bitutils/bit_run_reader.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/bitutils/bit_run_reader.go) | 6 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/bitutils/bit_set_run_reader.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/bitutils/bit_set_run_reader.go) | 10 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/bitutils/bitmap_generate.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/bitutils/bitmap_generate.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/hashing/hash_funcs.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/hashing/hash_funcs.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/hashing/hash_string.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/hashing/hash_string.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/hashing/hash_string_go1.19.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/hashing/hash_string_go1.19.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/hashing/types.tmpldata (renamed from vendor/github.com/apache/arrow/go/v14/internal/hashing/types.tmpldata) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/hashing/xxh3_memo_table.gen.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/hashing/xxh3_memo_table.gen.go) | 6 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/hashing/xxh3_memo_table.gen.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/internal/hashing/xxh3_memo_table.gen.go.tmpl) | 4 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/hashing/xxh3_memo_table.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/hashing/xxh3_memo_table.go) | 4 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/json/json.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/json/json.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/json/json_tinygo.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/json/json_tinygo.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/Makefile (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/Makefile) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/buf_reader.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/buf_reader.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/endians_default.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/endians_default.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/endians_s390x.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/endians_s390x.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/math.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/math.go) | 22 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_arm64.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_arm64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_avx2_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_avx2_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_avx2_amd64.s (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_avx2_amd64.s) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_neon_arm64.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_neon_arm64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_neon_arm64.s (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_neon_arm64.s) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_noasm.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_noasm.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_ppc64le.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_ppc64le.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_s390x.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_s390x.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_sse4_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_sse4_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_sse4_amd64.s (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_sse4_amd64.s) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints.go.tmpl) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints.tmpldata (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints.tmpldata) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_amd64.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_amd64.go.tmpl) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_arm64.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_arm64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_avx2_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_avx2_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_avx2_amd64.s (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_avx2_amd64.s) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_def.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_def.go) | 2 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_noasm.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_noasm.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_noasm.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_noasm.go.tmpl) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_ppc64le.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_ppc64le.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_s390x.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_s390x.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_s390x.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_s390x.go.tmpl) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_simd.go.tmpl (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_simd.go.tmpl) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_sse4_amd64.go (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_sse4_amd64.go) | 0 | ||||
| -rw-r--r-- | vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_sse4_amd64.s (renamed from vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_sse4_amd64.s) | 0 |
263 files changed, 2122 insertions, 786 deletions
diff --git a/vendor/github.com/apache/arrow/go/v14/LICENSE.txt b/vendor/github.com/apache/arrow/go/v15/LICENSE.txt index 573103298..573103298 100644 --- a/vendor/github.com/apache/arrow/go/v14/LICENSE.txt +++ b/vendor/github.com/apache/arrow/go/v15/LICENSE.txt diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/.editorconfig b/vendor/github.com/apache/arrow/go/v15/arrow/.editorconfig index a7ceaf938..a7ceaf938 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/.editorconfig +++ b/vendor/github.com/apache/arrow/go/v15/arrow/.editorconfig diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/.gitignore b/vendor/github.com/apache/arrow/go/v15/arrow/.gitignore index d4b831ae8..d4b831ae8 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/.gitignore +++ b/vendor/github.com/apache/arrow/go/v15/arrow/.gitignore diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/Gopkg.lock b/vendor/github.com/apache/arrow/go/v15/arrow/Gopkg.lock index 143e4f93b..143e4f93b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/Gopkg.lock +++ b/vendor/github.com/apache/arrow/go/v15/arrow/Gopkg.lock diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/Gopkg.toml b/vendor/github.com/apache/arrow/go/v15/arrow/Gopkg.toml index b27807d69..b27807d69 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/Gopkg.toml +++ b/vendor/github.com/apache/arrow/go/v15/arrow/Gopkg.toml diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/Makefile b/vendor/github.com/apache/arrow/go/v15/arrow/Makefile index 9c4a23262..9c4a23262 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/Makefile +++ b/vendor/github.com/apache/arrow/go/v15/arrow/Makefile diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array.go b/vendor/github.com/apache/arrow/go/v15/arrow/array.go index 7622e7503..eed859cf4 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array.go @@ -19,8 +19,8 @@ package arrow import ( "fmt" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // ArrayData is the underlying memory and metadata of an Arrow array, corresponding @@ -81,6 +81,8 @@ type ArrayData interface { // Dictionary returns the ArrayData object for the dictionary if this is a // dictionary array, otherwise it will be nil. Dictionary() ArrayData + // SizeInBytes returns the size of the ArrayData buffers and any children and/or dictionary in bytes. + SizeInBytes() uint64 } // Array represents an immutable sequence of values using the Arrow in-memory format. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/array.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/array.go index 1ee04c7aa..5aacc8f99 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/array.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/array.go @@ -19,9 +19,9 @@ package array import ( "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" ) const ( @@ -178,7 +178,8 @@ func init() { arrow.RUN_END_ENCODED: func(data arrow.ArrayData) arrow.Array { return NewRunEndEncodedData(data) }, arrow.LIST_VIEW: func(data arrow.ArrayData) arrow.Array { return NewListViewData(data) }, arrow.LARGE_LIST_VIEW: func(data arrow.ArrayData) arrow.Array { return NewLargeListViewData(data) }, - + arrow.BINARY_VIEW: func(data arrow.ArrayData) arrow.Array { return NewBinaryViewData(data) }, + arrow.STRING_VIEW: func(data arrow.ArrayData) arrow.Array { return NewStringViewData(data) }, // invalid data types to fill out array to size 2^6 - 1 63: invalidDataType, } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/binary.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/binary.go index e9e6e66e7..9e26de7a6 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/binary.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/binary.go @@ -23,12 +23,14 @@ import ( "strings" "unsafe" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) type BinaryLike interface { arrow.Array + ValueLen(int) int ValueBytes() []byte ValueOffset64(int) int64 } @@ -318,6 +320,134 @@ func arrayEqualLargeBinary(left, right *LargeBinary) bool { return true } +type ViewLike interface { + arrow.Array + ValueHeader(int) *arrow.ViewHeader +} + +type BinaryView struct { + array + values []arrow.ViewHeader + dataBuffers []*memory.Buffer +} + +func NewBinaryViewData(data arrow.ArrayData) *BinaryView { + a := &BinaryView{} + a.refCount = 1 + a.setData(data.(*Data)) + return a +} + +func (a *BinaryView) setData(data *Data) { + if len(data.buffers) < 2 { + panic("len(data.buffers) < 2") + } + a.array.setData(data) + + if valueData := data.buffers[1]; valueData != nil { + a.values = arrow.ViewHeaderTraits.CastFromBytes(valueData.Bytes()) + } + + a.dataBuffers = data.buffers[2:] +} + +func (a *BinaryView) ValueHeader(i int) *arrow.ViewHeader { + if i < 0 || i >= a.array.data.length { + panic("arrow/array: index out of range") + } + return &a.values[a.array.data.offset+i] +} + +func (a *BinaryView) Value(i int) []byte { + s := a.ValueHeader(i) + if s.IsInline() { + return s.InlineBytes() + } + start := s.BufferOffset() + buf := a.dataBuffers[s.BufferIndex()] + return buf.Bytes()[start : start+int32(s.Len())] +} + +func (a *BinaryView) ValueLen(i int) int { + s := a.ValueHeader(i) + return s.Len() +} + +// ValueString returns the value at index i as a string instead of +// a byte slice, without copying the underlying data. +func (a *BinaryView) ValueString(i int) string { + b := a.Value(i) + return *(*string)(unsafe.Pointer(&b)) +} + +func (a *BinaryView) String() string { + var o strings.Builder + o.WriteString("[") + for i := 0; i < a.Len(); i++ { + if i > 0 { + o.WriteString(" ") + } + switch { + case a.IsNull(i): + o.WriteString(NullValueStr) + default: + fmt.Fprintf(&o, "%q", a.ValueString(i)) + } + } + o.WriteString("]") + return o.String() +} + +// ValueStr is paired with AppendValueFromString in that it returns +// the value at index i as a string: Semantically this means that for +// a null value it will return the string "(null)", otherwise it will +// return the value as a base64 encoded string suitable for CSV/JSON. +// +// This is always going to be less performant than just using ValueString +// and exists to fulfill the Array interface to provide a method which +// can produce a human readable string for a given index. +func (a *BinaryView) ValueStr(i int) string { + if a.IsNull(i) { + return NullValueStr + } + return base64.StdEncoding.EncodeToString(a.Value(i)) +} + +func (a *BinaryView) GetOneForMarshal(i int) interface{} { + if a.IsNull(i) { + return nil + } + return a.Value(i) +} + +func (a *BinaryView) MarshalJSON() ([]byte, error) { + vals := make([]interface{}, a.Len()) + for i := 0; i < a.Len(); i++ { + vals[i] = a.GetOneForMarshal(i) + } + // golang marshal standard says that []byte will be marshalled + // as a base64-encoded string + return json.Marshal(vals) +} + +func arrayEqualBinaryView(left, right *BinaryView) bool { + leftBufs, rightBufs := left.dataBuffers, right.dataBuffers + for i := 0; i < left.Len(); i++ { + if left.IsNull(i) { + continue + } + if !left.ValueHeader(i).Equals(leftBufs, right.ValueHeader(i), rightBufs) { + return false + } + } + return true +} + var ( _ arrow.Array = (*Binary)(nil) + _ arrow.Array = (*LargeBinary)(nil) + _ arrow.Array = (*BinaryView)(nil) + + _ BinaryLike = (*Binary)(nil) + _ BinaryLike = (*LargeBinary)(nil) ) diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/binarybuilder.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/binarybuilder.go index 3cb709b45..21ad57650 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/binarybuilder.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/binarybuilder.go @@ -23,11 +23,12 @@ import ( "math" "reflect" "sync/atomic" + "unsafe" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // A BinaryBuilder is used to build a Binary array using the Append methods. @@ -370,6 +371,334 @@ func (b *BinaryBuilder) UnmarshalJSON(data []byte) error { return b.Unmarshal(dec) } +const ( + dfltBlockSize = 32 << 10 // 32 KB + viewValueSizeLimit int32 = math.MaxInt32 +) + +type BinaryViewBuilder struct { + builder + dtype arrow.BinaryDataType + + data *memory.Buffer + rawData []arrow.ViewHeader + + blockBuilder multiBufferBuilder +} + +func NewBinaryViewBuilder(mem memory.Allocator) *BinaryViewBuilder { + return &BinaryViewBuilder{ + dtype: arrow.BinaryTypes.BinaryView, + builder: builder{ + refCount: 1, + mem: mem, + }, + blockBuilder: multiBufferBuilder{ + refCount: 1, + blockSize: dfltBlockSize, + mem: mem, + }, + } +} + +func (b *BinaryViewBuilder) SetBlockSize(sz uint) { + b.blockBuilder.blockSize = int(sz) +} + +func (b *BinaryViewBuilder) Type() arrow.DataType { return b.dtype } + +func (b *BinaryViewBuilder) Release() { + debug.Assert(atomic.LoadInt64(&b.refCount) > 0, "too many releases") + + if atomic.AddInt64(&b.refCount, -1) != 0 { + return + } + + if b.nullBitmap != nil { + b.nullBitmap.Release() + b.nullBitmap = nil + } + if b.data != nil { + b.data.Release() + b.data = nil + b.rawData = nil + } +} + +func (b *BinaryViewBuilder) init(capacity int) { + b.builder.init(capacity) + b.data = memory.NewResizableBuffer(b.mem) + bytesN := arrow.ViewHeaderTraits.BytesRequired(capacity) + b.data.Resize(bytesN) + b.rawData = arrow.ViewHeaderTraits.CastFromBytes(b.data.Bytes()) +} + +func (b *BinaryViewBuilder) Resize(n int) { + nbuild := n + if n < minBuilderCapacity { + n = minBuilderCapacity + } + + if b.capacity == 0 { + b.init(n) + return + } + + b.builder.resize(nbuild, b.init) + b.data.Resize(arrow.ViewHeaderTraits.BytesRequired(n)) + b.rawData = arrow.ViewHeaderTraits.CastFromBytes(b.data.Bytes()) +} + +func (b *BinaryViewBuilder) ReserveData(length int) { + if int32(length) > viewValueSizeLimit { + panic(fmt.Errorf("%w: BinaryView or StringView elements cannot reference strings larger than 2GB", + arrow.ErrInvalid)) + } + b.blockBuilder.Reserve(int(length)) +} + +func (b *BinaryViewBuilder) Reserve(n int) { + b.builder.reserve(n, b.Resize) +} + +func (b *BinaryViewBuilder) Append(v []byte) { + if int32(len(v)) > viewValueSizeLimit { + panic(fmt.Errorf("%w: BinaryView or StringView elements cannot reference strings larger than 2GB", arrow.ErrInvalid)) + } + + if !arrow.IsViewInline(len(v)) { + b.ReserveData(len(v)) + } + + b.Reserve(1) + b.UnsafeAppend(v) +} + +// AppendString is identical to Append, only accepting a string instead +// of a byte slice, avoiding the extra copy that would occur if you simply +// did []byte(v). +// +// This is different than AppendValueFromString which exists for the +// Builder interface, in that this expects raw binary data which is +// appended unmodified. AppendValueFromString expects base64 encoded binary +// data instead. +func (b *BinaryViewBuilder) AppendString(v string) { + // create a []byte without copying the bytes + // in go1.20 this would be unsafe.StringData + val := *(*[]byte)(unsafe.Pointer(&struct { + string + int + }{v, len(v)})) + b.Append(val) +} + +func (b *BinaryViewBuilder) AppendNull() { + b.Reserve(1) + b.UnsafeAppendBoolToBitmap(false) +} + +func (b *BinaryViewBuilder) AppendNulls(n int) { + b.Reserve(n) + for i := 0; i < n; i++ { + b.UnsafeAppendBoolToBitmap(false) + } +} + +func (b *BinaryViewBuilder) AppendEmptyValue() { + b.Reserve(1) + b.UnsafeAppendBoolToBitmap(true) +} + +func (b *BinaryViewBuilder) AppendEmptyValues(n int) { + b.Reserve(n) + b.unsafeAppendBoolsToBitmap(nil, n) +} + +func (b *BinaryViewBuilder) UnsafeAppend(v []byte) { + hdr := &b.rawData[b.length] + hdr.SetBytes(v) + if !hdr.IsInline() { + b.blockBuilder.UnsafeAppend(hdr, v) + } + b.UnsafeAppendBoolToBitmap(true) +} + +func (b *BinaryViewBuilder) AppendValues(v [][]byte, valid []bool) { + if len(v) != len(valid) && len(valid) != 0 { + panic("len(v) != len(valid) && len(valid) != 0") + } + + if len(v) == 0 { + return + } + + b.Reserve(len(v)) + outOfLineTotal := 0 + for i, vv := range v { + if len(valid) == 0 || valid[i] { + if !arrow.IsViewInline(len(vv)) { + outOfLineTotal += len(vv) + } + } + } + + b.ReserveData(outOfLineTotal) + for i, vv := range v { + if len(valid) == 0 || valid[i] { + hdr := &b.rawData[b.length+i] + hdr.SetBytes(vv) + if !hdr.IsInline() { + b.blockBuilder.UnsafeAppend(hdr, vv) + } + } + } + + b.builder.unsafeAppendBoolsToBitmap(valid, len(v)) +} + +func (b *BinaryViewBuilder) AppendStringValues(v []string, valid []bool) { + if len(v) != len(valid) && len(valid) != 0 { + panic("len(v) != len(valid) && len(valid) != 0") + } + + if len(v) == 0 { + return + } + + b.Reserve(len(v)) + outOfLineTotal := 0 + for i, vv := range v { + if len(valid) == 0 || valid[i] { + if !arrow.IsViewInline(len(vv)) { + outOfLineTotal += len(vv) + } + } + } + + b.ReserveData(outOfLineTotal) + for i, vv := range v { + if len(valid) == 0 || valid[i] { + hdr := &b.rawData[b.length+i] + hdr.SetString(vv) + if !hdr.IsInline() { + b.blockBuilder.UnsafeAppendString(hdr, vv) + } + } + } + + b.builder.unsafeAppendBoolsToBitmap(valid, len(v)) +} + +// AppendValueFromString is paired with ValueStr for fulfilling the +// base Builder interface. This is intended to read in a human-readable +// string such as from CSV or JSON and append it to the array. +// +// For Binary values are expected to be base64 encoded (and will be +// decoded as such before being appended). +func (b *BinaryViewBuilder) AppendValueFromString(s string) error { + if s == NullValueStr { + b.AppendNull() + return nil + } + + if b.dtype.IsUtf8() { + b.Append([]byte(s)) + return nil + } + + decodedVal, err := base64.StdEncoding.DecodeString(s) + if err != nil { + return fmt.Errorf("could not decode base64 string: %w", err) + } + b.Append(decodedVal) + return nil +} + +func (b *BinaryViewBuilder) UnmarshalOne(dec *json.Decoder) error { + t, err := dec.Token() + if err != nil { + return err + } + + switch v := t.(type) { + case string: + data, err := base64.StdEncoding.DecodeString(v) + if err != nil { + return err + } + b.Append(data) + case []byte: + b.Append(v) + case nil: + b.AppendNull() + default: + return &json.UnmarshalTypeError{ + Value: fmt.Sprint(t), + Type: reflect.TypeOf([]byte{}), + Offset: dec.InputOffset(), + } + } + return nil +} + +func (b *BinaryViewBuilder) Unmarshal(dec *json.Decoder) error { + for dec.More() { + if err := b.UnmarshalOne(dec); err != nil { + return err + } + } + return nil +} + +func (b *BinaryViewBuilder) UnmarshalJSON(data []byte) error { + dec := json.NewDecoder(bytes.NewReader(data)) + t, err := dec.Token() + if err != nil { + return err + } + + if delim, ok := t.(json.Delim); !ok || delim != '[' { + return fmt.Errorf("binary view builder must unpack from json array, found %s", delim) + } + + return b.Unmarshal(dec) +} + +func (b *BinaryViewBuilder) newData() (data *Data) { + bytesRequired := arrow.ViewHeaderTraits.BytesRequired(b.length) + if bytesRequired > 0 && bytesRequired < b.data.Len() { + // trim buffers + b.data.Resize(bytesRequired) + } + + dataBuffers := b.blockBuilder.Finish() + data = NewData(b.dtype, b.length, append([]*memory.Buffer{ + b.nullBitmap, b.data}, dataBuffers...), nil, b.nulls, 0) + b.reset() + + if b.data != nil { + b.data.Release() + b.data = nil + b.rawData = nil + for _, buf := range dataBuffers { + buf.Release() + } + } + return +} + +func (b *BinaryViewBuilder) NewBinaryViewArray() (a *BinaryView) { + data := b.newData() + a = NewBinaryViewData(data) + data.Release() + return +} + +func (b *BinaryViewBuilder) NewArray() arrow.Array { + return b.NewBinaryViewArray() +} + var ( _ Builder = (*BinaryBuilder)(nil) + _ Builder = (*BinaryViewBuilder)(nil) ) diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/boolean.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/boolean.go index 464cef48b..43bac64a4 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/boolean.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/boolean.go @@ -21,10 +21,10 @@ import ( "strconv" "strings" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // A type which represents an immutable sequence of boolean values. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/booleanbuilder.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/booleanbuilder.go index 10b7405aa..cd0cffd5e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/booleanbuilder.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/booleanbuilder.go @@ -23,11 +23,11 @@ import ( "strconv" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) type BooleanBuilder struct { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder.go index e023b0d90..13741ba89 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder.go @@ -18,10 +18,12 @@ package array import ( "sync/atomic" + "unsafe" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" ) type bufBuilder interface { @@ -151,3 +153,109 @@ func (b *bufferBuilder) unsafeAppend(data []byte) { copy(b.bytes[b.length:], data) b.length += len(data) } + +type multiBufferBuilder struct { + refCount int64 + blockSize int + + mem memory.Allocator + blocks []*memory.Buffer + currentOutBuffer int +} + +// Retain increases the reference count by 1. +// Retain may be called simultaneously from multiple goroutines. +func (b *multiBufferBuilder) Retain() { + atomic.AddInt64(&b.refCount, 1) +} + +// Release decreases the reference count by 1. +// When the reference count goes to zero, the memory is freed. +// Release may be called simultaneously from multiple goroutines. +func (b *multiBufferBuilder) Release() { + debug.Assert(atomic.LoadInt64(&b.refCount) > 0, "too many releases") + + if atomic.AddInt64(&b.refCount, -1) == 0 { + b.Reset() + } +} + +func (b *multiBufferBuilder) Reserve(nbytes int) { + if len(b.blocks) == 0 { + out := memory.NewResizableBuffer(b.mem) + if nbytes < b.blockSize { + nbytes = b.blockSize + } + out.Reserve(nbytes) + b.currentOutBuffer = 0 + b.blocks = []*memory.Buffer{out} + return + } + + curBuf := b.blocks[b.currentOutBuffer] + remain := curBuf.Cap() - curBuf.Len() + if nbytes <= remain { + return + } + + // search for underfull block that has enough bytes + for i, block := range b.blocks { + remaining := block.Cap() - block.Len() + if nbytes <= remaining { + b.currentOutBuffer = i + return + } + } + + // current buffer doesn't have enough space, no underfull buffers + // make new buffer and set that as our current. + newBuf := memory.NewResizableBuffer(b.mem) + if nbytes < b.blockSize { + nbytes = b.blockSize + } + + newBuf.Reserve(nbytes) + b.currentOutBuffer = len(b.blocks) + b.blocks = append(b.blocks, newBuf) +} + +func (b *multiBufferBuilder) RemainingBytes() int { + if len(b.blocks) == 0 { + return 0 + } + + buf := b.blocks[b.currentOutBuffer] + return buf.Cap() - buf.Len() +} + +func (b *multiBufferBuilder) Reset() { + b.currentOutBuffer = 0 + for _, block := range b.Finish() { + block.Release() + } +} + +func (b *multiBufferBuilder) UnsafeAppend(hdr *arrow.ViewHeader, val []byte) { + buf := b.blocks[b.currentOutBuffer] + idx, offset := b.currentOutBuffer, buf.Len() + hdr.SetIndexOffset(int32(idx), int32(offset)) + + n := copy(buf.Buf()[offset:], val) + buf.ResizeNoShrink(offset + n) +} + +func (b *multiBufferBuilder) UnsafeAppendString(hdr *arrow.ViewHeader, val string) { + // create a byte slice with zero-copies + // in go1.20 this would be equivalent to unsafe.StringData + v := *(*[]byte)(unsafe.Pointer(&struct { + string + int + }{val, len(val)})) + b.UnsafeAppend(hdr, v) +} + +func (b *multiBufferBuilder) Finish() (out []*memory.Buffer) { + b.currentOutBuffer = 0 + out, b.blocks = b.blocks, nil + return +} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder_byte.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder_byte.go index 00a0d1c21..9b2b559ba 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder_byte.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder_byte.go @@ -16,7 +16,7 @@ package array -import "github.com/apache/arrow/go/v14/arrow/memory" +import "github.com/apache/arrow/go/v15/arrow/memory" type byteBufferBuilder struct { bufferBuilder diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder_numeric.gen.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder_numeric.gen.go index 879bc9f57..a7961166c 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder_numeric.gen.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder_numeric.gen.go @@ -19,9 +19,9 @@ package array import ( - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/memory" ) type int64BufferBuilder struct { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder_numeric.gen.go.tmpl b/vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder_numeric.gen.go.tmpl index e859b5bff..845d7ef01 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/bufferbuilder_numeric.gen.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/bufferbuilder_numeric.gen.go.tmpl @@ -17,9 +17,9 @@ package array import ( - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/memory" ) {{range .In}} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/builder.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/builder.go index 2f15ac965..279804a1c 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/builder.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/builder.go @@ -20,10 +20,10 @@ import ( "fmt" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) const ( @@ -364,6 +364,10 @@ func NewBuilder(mem memory.Allocator, dtype arrow.DataType) Builder { case arrow.RUN_END_ENCODED: typ := dtype.(*arrow.RunEndEncodedType) return NewRunEndEncodedBuilder(mem, typ.RunEnds(), typ.Encoded()) + case arrow.BINARY_VIEW: + return NewBinaryViewBuilder(mem) + case arrow.STRING_VIEW: + return NewStringViewBuilder(mem) } panic(fmt.Errorf("arrow/array: unsupported builder for %T", dtype)) } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/compare.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/compare.go index e70716bee..372293a61 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/compare.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/compare.go @@ -20,9 +20,9 @@ import ( "fmt" "math" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/float16" - "github.com/apache/arrow/go/v14/internal/bitutils" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/float16" + "github.com/apache/arrow/go/v15/internal/bitutils" ) // RecordEqual reports whether the two provided records are equal. @@ -232,6 +232,12 @@ func Equal(left, right arrow.Array) bool { case *LargeString: r := right.(*LargeString) return arrayEqualLargeString(l, r) + case *BinaryView: + r := right.(*BinaryView) + return arrayEqualBinaryView(l, r) + case *StringView: + r := right.(*StringView) + return arrayEqualStringView(l, r) case *Int8: r := right.(*Int8) return arrayEqualInt8(l, r) @@ -482,6 +488,12 @@ func arrayApproxEqual(left, right arrow.Array, opt equalOption) bool { case *LargeString: r := right.(*LargeString) return arrayEqualLargeString(l, r) + case *BinaryView: + r := right.(*BinaryView) + return arrayEqualBinaryView(l, r) + case *StringView: + r := right.(*StringView) + return arrayEqualStringView(l, r) case *Int8: r := right.(*Int8) return arrayEqualInt8(l, r) diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/concat.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/concat.go index 9d815023c..f0bc2855e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/concat.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/concat.go @@ -23,13 +23,13 @@ import ( "math/bits" "unsafe" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/encoded" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/bitutils" - "github.com/apache/arrow/go/v14/internal/utils" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/encoded" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/bitutils" + "github.com/apache/arrow/go/v15/internal/utils" ) // Concatenate creates a new arrow.Array which is the concatenation of the @@ -600,6 +600,35 @@ func concat(data []arrow.ArrayData, mem memory.Allocator) (arr arrow.ArrayData, } case arrow.FixedWidthDataType: out.buffers[1] = concatBuffers(gatherBuffersFixedWidthType(data, 1, dt), mem) + case arrow.BinaryViewDataType: + out.buffers = out.buffers[:2] + for _, d := range data { + for _, buf := range d.Buffers()[2:] { + buf.Retain() + out.buffers = append(out.buffers, buf) + } + } + + out.buffers[1] = concatBuffers(gatherFixedBuffers(data, 1, arrow.ViewHeaderSizeBytes), mem) + + var ( + s = arrow.ViewHeaderTraits.CastFromBytes(out.buffers[1].Bytes()) + i = data[0].Len() + precedingBufsCount int + ) + + for idx := 1; idx < len(data); idx++ { + precedingBufsCount += len(data[idx-1].Buffers()) - 2 + + for end := i + data[idx].Len(); i < end; i++ { + if s[i].IsInline() { + continue + } + + bufIndex := s[i].BufferIndex() + int32(precedingBufsCount) + s[i].SetIndexOffset(bufIndex, s[i].BufferOffset()) + } + } case arrow.BinaryDataType: offsetWidth := dt.Layout().Buffers[1].ByteWidth offsetBuffer, valueRanges, err := concatOffsets(gatherFixedBuffers(data, 1, offsetWidth), offsetWidth, mem) @@ -666,7 +695,7 @@ func concat(data []arrow.ArrayData, mem memory.Allocator) (arr arrow.ArrayData, } out.childData = []arrow.ArrayData{children} case *arrow.StructType: - out.childData = make([]arrow.ArrayData, len(dt.Fields())) + out.childData = make([]arrow.ArrayData, dt.NumFields()) for i := range dt.Fields() { children := gatherChildren(data, i) for _, c := range children { @@ -739,7 +768,6 @@ func concat(data []arrow.ArrayData, mem memory.Allocator) (arr arrow.ArrayData, out.childData[0].Release() return nil, err } - default: return nil, fmt.Errorf("concatenate not implemented for type %s", dt) } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/data.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/data.go index 49df06fb1..ddd9cf0c8 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/data.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/data.go @@ -22,9 +22,9 @@ import ( "sync/atomic" "unsafe" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" ) // Data represents the memory and metadata of an Arrow array. @@ -190,9 +190,34 @@ func (d *Data) SetDictionary(dict arrow.ArrayData) { } } +// SizeInBytes returns the size of the Data and any children and/or dictionary in bytes by +// recursively examining the nested structures of children and/or dictionary. +// The value returned is an upper-bound since offset is not taken into account. +func (d *Data) SizeInBytes() uint64 { + var size uint64 + + if d == nil { + return 0 + } + + for _, b := range d.Buffers() { + size += uint64(b.Len()) + } + for _, c := range d.Children() { + size += c.SizeInBytes() + } + if d.dictionary != nil { + size += d.dictionary.SizeInBytes() + } + + return size +} + // NewSliceData returns a new slice that shares backing data with the input. // The returned Data slice starts at i and extends j-i elements, such as: -// slice := data[i:j] +// +// slice := data[i:j] +// // The returned value must be Release'd after use. // // NewSliceData panics if the slice is outside the valid range of the input Data. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/decimal128.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/decimal128.go index 331753168..16a492db0 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/decimal128.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/decimal128.go @@ -25,12 +25,12 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/decimal128" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/decimal128" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // A type which represents an immutable sequence of 128-bit decimal values. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/decimal256.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/decimal256.go index d63544f78..8f72e414d 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/decimal256.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/decimal256.go @@ -25,12 +25,12 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/decimal256" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/decimal256" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // Decimal256 is a type that represents an immutable sequence of 256-bit decimal values. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/dictionary.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/dictionary.go index d0a1c4dc9..125c02391 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/dictionary.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/dictionary.go @@ -25,16 +25,16 @@ import ( "sync/atomic" "unsafe" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/decimal128" - "github.com/apache/arrow/go/v14/arrow/decimal256" - "github.com/apache/arrow/go/v14/arrow/float16" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/hashing" - "github.com/apache/arrow/go/v14/internal/json" - "github.com/apache/arrow/go/v14/internal/utils" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/decimal128" + "github.com/apache/arrow/go/v15/arrow/decimal256" + "github.com/apache/arrow/go/v15/arrow/float16" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/hashing" + "github.com/apache/arrow/go/v15/internal/json" + "github.com/apache/arrow/go/v15/internal/utils" ) // Dictionary represents the type for dictionary-encoded data with a data @@ -739,7 +739,7 @@ func (b *dictionaryBuilder) UnmarshalJSON(data []byte) error { } if delim, ok := t.(json.Delim); !ok || delim != '[' { - return fmt.Errorf("dictionary builder must upack from json array, found %s", delim) + return fmt.Errorf("dictionary builder must unpack from json array, found %s", delim) } return b.Unmarshal(dec) @@ -1533,7 +1533,7 @@ type DictionaryUnifier interface { // values, an error will be returned instead. The new unified dictionary // is returned. GetResultWithIndexType(indexType arrow.DataType) (arrow.Array, error) - // Release should be called to clean up any allocated scrach memo-table used + // Release should be called to clean up any allocated scratch memo-table used // for building the unified dictionary. Release() } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/diff.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/diff.go index 026a27b98..6bf637253 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/diff.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/diff.go @@ -20,7 +20,7 @@ import ( "fmt" "strings" - "github.com/apache/arrow/go/v14/arrow" + "github.com/apache/arrow/go/v15/arrow" ) // Edit represents one entry in the edit script to compare two arrays. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/doc.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/doc.go index 5cf854086..5cf854086 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/doc.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/doc.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/encoded.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/encoded.go index bf4a942cf..8ca1416b9 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/encoded.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/encoded.go @@ -23,12 +23,12 @@ import ( "reflect" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/encoded" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" - "github.com/apache/arrow/go/v14/internal/utils" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/encoded" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" + "github.com/apache/arrow/go/v15/internal/utils" ) // RunEndEncoded represents an array containing two children: @@ -150,19 +150,19 @@ func (r *RunEndEncoded) LogicalRunEndsArray(mem memory.Allocator) arrow.Array { case *Int16: for _, v := range e.Int16Values()[physOffset : physOffset+physLength] { v -= int16(r.data.offset) - v = int16(utils.MinInt(int(v), r.data.length)) + v = int16(utils.Min(int(v), r.data.length)) bldr.(*Int16Builder).Append(v) } case *Int32: for _, v := range e.Int32Values()[physOffset : physOffset+physLength] { v -= int32(r.data.offset) - v = int32(utils.MinInt(int(v), r.data.length)) + v = int32(utils.Min(int(v), r.data.length)) bldr.(*Int32Builder).Append(v) } case *Int64: for _, v := range e.Int64Values()[physOffset : physOffset+physLength] { v -= int64(r.data.offset) - v = int64(utils.MinInt(int(v), r.data.length)) + v = int64(utils.Min(int(v), r.data.length)) bldr.(*Int64Builder).Append(v) } } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/extension.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/extension.go index 03e8c1734..021b8e7bc 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/extension.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/extension.go @@ -20,9 +20,9 @@ import ( "fmt" "reflect" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // ExtensionArray is the interface that needs to be implemented to handle diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/extension_builder.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/extension_builder.go index a71287faf..a71287faf 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/extension_builder.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/extension_builder.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/fixed_size_list.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/fixed_size_list.go index 62c321386..5923d6859 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/fixed_size_list.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/fixed_size_list.go @@ -22,11 +22,11 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // FixedSizeList represents an immutable sequence of N array values. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/fixedsize_binary.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/fixedsize_binary.go index 5466156d5..6cdaeace9 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/fixedsize_binary.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/fixedsize_binary.go @@ -22,8 +22,8 @@ import ( "fmt" "strings" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/internal/json" ) // A type which represents an immutable sequence of fixed-length binary strings. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/fixedsize_binarybuilder.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/fixedsize_binarybuilder.go index ba4b474a8..230a65fd2 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/fixedsize_binarybuilder.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/fixedsize_binarybuilder.go @@ -23,10 +23,10 @@ import ( "reflect" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // A FixedSizeBinaryBuilder is used to build a FixedSizeBinary array using the Append methods. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/float16.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/float16.go index de499e267..4260f8e37 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/float16.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/float16.go @@ -20,9 +20,9 @@ import ( "fmt" "strings" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/float16" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/float16" + "github.com/apache/arrow/go/v15/internal/json" ) // A type which represents an immutable sequence of Float16 values. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/float16_builder.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/float16_builder.go index f96ab6037..033b9fa2d 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/float16_builder.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/float16_builder.go @@ -23,12 +23,12 @@ import ( "strconv" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/float16" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/float16" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) type Float16Builder struct { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/interval.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/interval.go index ff059c92c..2a5529f1c 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/interval.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/interval.go @@ -23,11 +23,11 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) func NewIntervalData(data arrow.ArrayData) arrow.Array { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/json_reader.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/json_reader.go index e09717c41..2f05d4b70 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/json_reader.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/json_reader.go @@ -22,10 +22,10 @@ import ( "io" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) type Option func(config) diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/list.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/list.go index d8d8b8c76..9d959b5e4 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/list.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/list.go @@ -19,15 +19,14 @@ package array import ( "bytes" "fmt" - "math" "strings" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) type ListLike interface { @@ -926,7 +925,7 @@ func (a *LargeListView) Release() { a.values.Release() } -// Acessors for offsets and sizes to make ListView and LargeListView validation generic. +// Accessors for offsets and sizes to make ListView and LargeListView validation generic. type offsetsAndSizes interface { offsetAt(slot int64) int64 sizeAt(slot int64) int64 @@ -1411,118 +1410,19 @@ func (b *baseListViewBuilder) UnmarshalJSON(data []byte) error { return b.Unmarshal(dec) } -// Pre-conditions: -// -// input.DataType() is ListViewType -// input.Len() > 0 && input.NullN() != input.Len() -func minListViewOffset32(input arrow.ArrayData) int32 { - var bitmap []byte - if input.Buffers()[0] != nil { - bitmap = input.Buffers()[0].Bytes() - } - offsets := arrow.Int32Traits.CastFromBytes(input.Buffers()[1].Bytes())[input.Offset():] - sizes := arrow.Int32Traits.CastFromBytes(input.Buffers()[2].Bytes())[input.Offset():] - - isNull := func(i int) bool { - return bitmap != nil && bitutil.BitIsNotSet(bitmap, input.Offset()+i) - } - - // It's very likely that the first non-null non-empty list-view starts at - // offset 0 of the child array. - i := 0 - for i < input.Len() && (isNull(i) || sizes[i] == 0) { - i += 1 - } - if i >= input.Len() { - return 0 - } - minOffset := offsets[i] - if minOffset == 0 { - // early exit: offset 0 found already - return 0 - } - - // Slow path: scan the buffers entirely. - i += 1 - for ; i < input.Len(); i += 1 { - if isNull(i) { - continue - } - offset := offsets[i] - if offset < minOffset && sizes[i] > 0 { - minOffset = offset - } - } - return minOffset -} - -// Find the maximum offset+size in a LIST_VIEW array. +// Find the minimum offset+size in a LIST_VIEW/LARGE_LIST_VIEW array. // // Pre-conditions: // -// input.DataType() is ListViewType -// input.Len() > 0 && input.NullN() != input.Len() -func maxListViewOffset32(input arrow.ArrayData) int { - inputOffset := input.Offset() - var bitmap []byte - if input.Buffers()[0] != nil { - bitmap = input.Buffers()[0].Bytes() - } - offsets := arrow.Int32Traits.CastFromBytes(input.Buffers()[1].Bytes())[inputOffset:] - sizes := arrow.Int32Traits.CastFromBytes(input.Buffers()[2].Bytes())[inputOffset:] - - isNull := func(i int) bool { - return bitmap != nil && bitutil.BitIsNotSet(bitmap, inputOffset+i) - } - - i := input.Len() - 1 // safe because input.Len() > 0 - for i != 0 && (isNull(i) || sizes[i] == 0) { - i -= 1 - } - offset := offsets[i] - size := sizes[i] - if i == 0 { - if isNull(i) || sizes[i] == 0 { - return 0 - } else { - return int(offset + size) - } - } - - values := input.Children()[0] - maxEnd := int(offsets[i] + sizes[i]) - if maxEnd == values.Len() { - // Early-exit: maximum possible view-end found already. - return maxEnd - } - - // Slow path: scan the buffers entirely. - for ; i >= 0; i -= 1 { - offset := offsets[i] - size := sizes[i] - if size > 0 && !isNull(i) { - if int(offset+size) > maxEnd { - maxEnd = int(offset + size) - if maxEnd == values.Len() { - return maxEnd - } - } - } - } - return maxEnd -} - -// Pre-conditions: -// -// input.DataType() is LargeListViewType +// input.DataType() is ListViewType if Offset=int32 or LargeListViewType if Offset=int64 // input.Len() > 0 && input.NullN() != input.Len() -func minLargeListViewOffset64(input arrow.ArrayData) int64 { +func minListViewOffset[Offset int32 | int64](input arrow.ArrayData) Offset { var bitmap []byte if input.Buffers()[0] != nil { bitmap = input.Buffers()[0].Bytes() } - offsets := arrow.Int64Traits.CastFromBytes(input.Buffers()[1].Bytes())[input.Offset():] - sizes := arrow.Int64Traits.CastFromBytes(input.Buffers()[2].Bytes())[input.Offset():] + offsets := arrow.GetData[Offset](input.Buffers()[1].Bytes())[input.Offset():] + sizes := arrow.GetData[Offset](input.Buffers()[2].Bytes())[input.Offset():] isNull := func(i int) bool { return bitmap != nil && bitutil.BitIsNotSet(bitmap, input.Offset()+i) @@ -1557,27 +1457,25 @@ func minLargeListViewOffset64(input arrow.ArrayData) int64 { return minOffset } -// Find the maximum offset+size in a LARGE_LIST_VIEW array. +// Find the maximum offset+size in a LIST_VIEW/LARGE_LIST_VIEW array. // // Pre-conditions: // -// input.DataType() is LargeListViewType +// input.DataType() is ListViewType if Offset=int32 or LargeListViewType if Offset=int64 // input.Len() > 0 && input.NullN() != input.Len() -func maxLargeListViewOffset64(input arrow.ArrayData) int64 { +func maxListViewEnd[Offset int32 | int64](input arrow.ArrayData) Offset { inputOffset := input.Offset() var bitmap []byte if input.Buffers()[0] != nil { bitmap = input.Buffers()[0].Bytes() } - offsets := arrow.Int64Traits.CastFromBytes(input.Buffers()[1].Bytes())[inputOffset:] - sizes := arrow.Int64Traits.CastFromBytes(input.Buffers()[2].Bytes())[inputOffset:] + offsets := arrow.GetData[Offset](input.Buffers()[1].Bytes())[inputOffset:] + sizes := arrow.GetData[Offset](input.Buffers()[2].Bytes())[inputOffset:] isNull := func(i int) bool { return bitmap != nil && bitutil.BitIsNotSet(bitmap, inputOffset+i) } - // It's very likely that the first non-null non-empty list-view starts at - // offset zero, so we check that first and potentially early-return a 0. i := input.Len() - 1 // safe because input.Len() > 0 for i != 0 && (isNull(i) || sizes[i] == 0) { i -= 1 @@ -1592,15 +1490,9 @@ func maxLargeListViewOffset64(input arrow.ArrayData) int64 { } } - if offset > math.MaxInt64-size { - // Early-exit: 64-bit overflow detected. This is not possible on a - // valid list-view, but we return the maximum possible value to - // avoid undefined behavior. - return math.MaxInt64 - } values := input.Children()[0] maxEnd := offsets[i] + sizes[i] - if maxEnd == int64(values.Len()) { + if maxEnd == Offset(values.Len()) { // Early-exit: maximum possible view-end found already. return maxEnd } @@ -1611,14 +1503,8 @@ func maxLargeListViewOffset64(input arrow.ArrayData) int64 { size := sizes[i] if size > 0 && !isNull(i) { if offset+size > maxEnd { - if offset > math.MaxInt64-size { - // 64-bit overflow detected. This is not possible on a valid list-view, - // but we saturate maxEnd to the maximum possible value to avoid - // undefined behavior. - return math.MaxInt64 - } maxEnd = offset + size - if maxEnd == int64(values.Len()) { + if maxEnd == Offset(values.Len()) { return maxEnd } } @@ -1634,11 +1520,11 @@ func rangeOfValuesUsed(input arrow.ArrayData) (int, int) { var minOffset, maxEnd int switch input.DataType().(type) { case *arrow.ListViewType: - minOffset = int(minListViewOffset32(input)) - maxEnd = maxListViewOffset32(input) + minOffset = int(minListViewOffset[int32](input)) + maxEnd = int(maxListViewEnd[int32](input)) case *arrow.LargeListViewType: - minOffset = int(minLargeListViewOffset64(input)) - maxEnd = int(maxLargeListViewOffset64(input)) + minOffset = int(minListViewOffset[int64](input)) + maxEnd = int(maxListViewEnd[int64](input)) case *arrow.ListType: offsets := arrow.Int32Traits.CastFromBytes(input.Buffers()[1].Bytes())[input.Offset():] minOffset = int(offsets[0]) diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/map.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/map.go index 9945a90ce..fe07a6878 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/map.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/map.go @@ -20,9 +20,9 @@ import ( "bytes" "fmt" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // Map represents an immutable sequence of Key/Value structs. It is a diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/null.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/null.go index 150a1030e..2735a88a9 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/null.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/null.go @@ -23,10 +23,10 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // Null represents an immutable, degenerate array with no physical storage. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/numeric.gen.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/numeric.gen.go index a3e110151..59c9a9797 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/numeric.gen.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/numeric.gen.go @@ -23,8 +23,8 @@ import ( "strconv" "strings" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/internal/json" ) // A type which represents an immutable sequence of int64 values. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/numeric.gen.go.tmpl b/vendor/github.com/apache/arrow/go/v15/arrow/array/numeric.gen.go.tmpl index 34d17fbfc..027456009 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/numeric.gen.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/numeric.gen.go.tmpl @@ -21,8 +21,8 @@ import ( "strings" "time" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/internal/json" ) {{range .In}} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/numericbuilder.gen.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/numericbuilder.gen.go index 7f01180f5..52b189d6e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/numericbuilder.gen.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/numericbuilder.gen.go @@ -27,11 +27,11 @@ import ( "sync/atomic" "time" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) type Int64Builder struct { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/numericbuilder.gen.go.tmpl b/vendor/github.com/apache/arrow/go/v15/arrow/array/numericbuilder.gen.go.tmpl index cf663c031..82ac35465 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/numericbuilder.gen.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/numericbuilder.gen.go.tmpl @@ -17,11 +17,11 @@ package array import ( - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) {{range .In}} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/numericbuilder.gen_test.go.tmpl b/vendor/github.com/apache/arrow/go/v15/arrow/array/numericbuilder.gen_test.go.tmpl index bc8c99337..eddd884e2 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/numericbuilder.gen_test.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/numericbuilder.gen_test.go.tmpl @@ -19,9 +19,9 @@ package array_test import ( "testing" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/array" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/array" + "github.com/apache/arrow/go/v15/arrow/memory" "github.com/stretchr/testify/assert" ) diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/record.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/record.go index 0b0fe4c38..f25e7c9a8 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/record.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/record.go @@ -22,10 +22,10 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // RecordReader reads a stream of records. @@ -185,7 +185,7 @@ func (rec *simpleRecord) validate() error { return nil } - if len(rec.arrs) != len(rec.schema.Fields()) { + if len(rec.arrs) != rec.schema.NumFields() { return fmt.Errorf("arrow/array: number of columns/fields mismatch") } @@ -285,11 +285,11 @@ func NewRecordBuilder(mem memory.Allocator, schema *arrow.Schema) *RecordBuilder refCount: 1, mem: mem, schema: schema, - fields: make([]Builder, len(schema.Fields())), + fields: make([]Builder, schema.NumFields()), } - for i, f := range schema.Fields() { - b.fields[i] = NewBuilder(b.mem, f.Type) + for i := 0; i < schema.NumFields(); i++ { + b.fields[i] = NewBuilder(b.mem, schema.Field(i).Type) } return b @@ -397,8 +397,8 @@ func (b *RecordBuilder) UnmarshalJSON(data []byte) error { } } - for i, f := range b.schema.Fields() { - if !keylist[f.Name] { + for i := 0; i < b.schema.NumFields(); i++ { + if !keylist[b.schema.Field(i).Name] { b.fields[i].AppendNull() } } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/string.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/string.go index 86e27c970..c8517ba30 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/string.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/string.go @@ -23,11 +23,17 @@ import ( "strings" "unsafe" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) +type StringLike interface { + arrow.Array + Value(int) string + ValueLen(int) int +} + // String represents an immutable sequence of variable-length UTF-8 strings. type String struct { array @@ -220,6 +226,14 @@ func (a *LargeString) ValueOffset64(i int) int64 { return a.ValueOffset(i) } +func (a *LargeString) ValueLen(i int) int { + if i < 0 || i >= a.array.data.length { + panic("arrow/array: index out of range") + } + beg := a.array.data.offset + i + return int(a.offsets[beg+1] - a.offsets[beg]) +} + func (a *LargeString) ValueOffsets() []int64 { beg := a.array.data.offset end := beg + a.array.data.length + 1 @@ -310,6 +324,113 @@ func arrayEqualLargeString(left, right *LargeString) bool { return true } +type StringView struct { + array + values []arrow.ViewHeader + dataBuffers []*memory.Buffer +} + +func NewStringViewData(data arrow.ArrayData) *StringView { + a := &StringView{} + a.refCount = 1 + a.setData(data.(*Data)) + return a +} + +// Reset resets the String with a different set of Data. +func (a *StringView) Reset(data arrow.ArrayData) { + a.setData(data.(*Data)) +} + +func (a *StringView) setData(data *Data) { + if len(data.buffers) < 2 { + panic("len(data.buffers) < 2") + } + a.array.setData(data) + + if valueData := data.buffers[1]; valueData != nil { + a.values = arrow.ViewHeaderTraits.CastFromBytes(valueData.Bytes()) + } + + a.dataBuffers = data.buffers[2:] +} + +func (a *StringView) ValueHeader(i int) *arrow.ViewHeader { + if i < 0 || i >= a.array.data.length { + panic("arrow/array: index out of range") + } + return &a.values[a.array.data.offset+i] +} + +func (a *StringView) Value(i int) string { + s := a.ValueHeader(i) + if s.IsInline() { + return s.InlineString() + } + start := s.BufferOffset() + buf := a.dataBuffers[s.BufferIndex()] + value := buf.Bytes()[start : start+int32(s.Len())] + return *(*string)(unsafe.Pointer(&value)) +} + +func (a *StringView) ValueLen(i int) int { + s := a.ValueHeader(i) + return s.Len() +} + +func (a *StringView) String() string { + var o strings.Builder + o.WriteString("[") + for i := 0; i < a.Len(); i++ { + if i > 0 { + o.WriteString(" ") + } + switch { + case a.IsNull(i): + o.WriteString(NullValueStr) + default: + fmt.Fprintf(&o, "%q", a.Value(i)) + } + } + o.WriteString("]") + return o.String() +} + +func (a *StringView) ValueStr(i int) string { + if a.IsNull(i) { + return NullValueStr + } + return a.Value(i) +} + +func (a *StringView) GetOneForMarshal(i int) interface{} { + if a.IsNull(i) { + return nil + } + return a.Value(i) +} + +func (a *StringView) MarshalJSON() ([]byte, error) { + vals := make([]interface{}, a.Len()) + for i := 0; i < a.Len(); i++ { + vals[i] = a.GetOneForMarshal(i) + } + return json.Marshal(vals) +} + +func arrayEqualStringView(left, right *StringView) bool { + leftBufs, rightBufs := left.dataBuffers, right.dataBuffers + for i := 0; i < left.Len(); i++ { + if left.IsNull(i) { + continue + } + if !left.ValueHeader(i).Equals(leftBufs, right.ValueHeader(i), rightBufs) { + return false + } + } + return true +} + // A StringBuilder is used to build a String array using the Append methods. type StringBuilder struct { *BinaryBuilder @@ -344,10 +465,6 @@ func (b *StringBuilder) Value(i int) string { return string(b.BinaryBuilder.Value(i)) } -// func (b *StringBuilder) UnsafeAppend(v string) { -// b.BinaryBuilder.UnsafeAppend([]byte(v)) -// } - // NewArray creates a String array from the memory buffers used by the builder and resets the StringBuilder // so it can be used to build a new array. func (b *StringBuilder) NewArray() arrow.Array { @@ -441,10 +558,6 @@ func (b *LargeStringBuilder) Value(i int) string { return string(b.BinaryBuilder.Value(i)) } -// func (b *LargeStringBuilder) UnsafeAppend(v string) { -// b.BinaryBuilder.UnsafeAppend([]byte(v)) -// } - // NewArray creates a String array from the memory buffers used by the builder and resets the StringBuilder // so it can be used to build a new array. func (b *LargeStringBuilder) NewArray() arrow.Array { @@ -504,9 +617,87 @@ func (b *LargeStringBuilder) UnmarshalJSON(data []byte) error { return b.Unmarshal(dec) } +type StringViewBuilder struct { + *BinaryViewBuilder +} + +func NewStringViewBuilder(mem memory.Allocator) *StringViewBuilder { + bldr := &StringViewBuilder{ + BinaryViewBuilder: NewBinaryViewBuilder(mem), + } + bldr.dtype = arrow.BinaryTypes.StringView + return bldr +} + +func (b *StringViewBuilder) Append(v string) { + b.BinaryViewBuilder.AppendString(v) +} + +func (b *StringViewBuilder) AppendValues(v []string, valid []bool) { + b.BinaryViewBuilder.AppendStringValues(v, valid) +} + +func (b *StringViewBuilder) UnmarshalOne(dec *json.Decoder) error { + t, err := dec.Token() + if err != nil { + return err + } + + switch v := t.(type) { + case string: + b.Append(v) + case []byte: + b.BinaryViewBuilder.Append(v) + case nil: + b.AppendNull() + default: + return &json.UnmarshalTypeError{ + Value: fmt.Sprint(t), + Type: reflect.TypeOf([]byte{}), + Offset: dec.InputOffset(), + } + } + return nil +} + +func (b *StringViewBuilder) Unmarshal(dec *json.Decoder) error { + for dec.More() { + if err := b.UnmarshalOne(dec); err != nil { + return err + } + } + return nil +} + +func (b *StringViewBuilder) UnmarshalJSON(data []byte) error { + dec := json.NewDecoder(bytes.NewReader(data)) + t, err := dec.Token() + if err != nil { + return err + } + + if delim, ok := t.(json.Delim); !ok || delim != '[' { + return fmt.Errorf("binary view builder must unpack from json array, found %s", delim) + } + + return b.Unmarshal(dec) +} + +func (b *StringViewBuilder) NewArray() arrow.Array { + return b.NewStringViewArray() +} + +func (b *StringViewBuilder) NewStringViewArray() (a *StringView) { + data := b.newData() + a = NewStringViewData(data) + data.Release() + return +} + type StringLikeBuilder interface { Builder Append(string) + AppendValues([]string, []bool) UnsafeAppend([]byte) ReserveData(int) } @@ -514,8 +705,14 @@ type StringLikeBuilder interface { var ( _ arrow.Array = (*String)(nil) _ arrow.Array = (*LargeString)(nil) + _ arrow.Array = (*StringView)(nil) _ Builder = (*StringBuilder)(nil) _ Builder = (*LargeStringBuilder)(nil) + _ Builder = (*StringViewBuilder)(nil) _ StringLikeBuilder = (*StringBuilder)(nil) _ StringLikeBuilder = (*LargeStringBuilder)(nil) + _ StringLikeBuilder = (*StringViewBuilder)(nil) + _ StringLike = (*String)(nil) + _ StringLike = (*LargeString)(nil) + _ StringLike = (*StringView)(nil) ) diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/struct.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/struct.go index 248a25bf6..5e723c9dc 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/struct.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/struct.go @@ -23,11 +23,11 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // Struct represents an ordered sequence of relative types. @@ -224,7 +224,7 @@ func NewStructBuilder(mem memory.Allocator, dtype *arrow.StructType) *StructBuil b := &StructBuilder{ builder: builder{refCount: 1, mem: mem}, dtype: dtype, - fields: make([]Builder, len(dtype.Fields())), + fields: make([]Builder, dtype.NumFields()), } for i, f := range dtype.Fields() { b.fields[i] = NewBuilder(b.mem, f.Type) diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/table.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/table.go index 6456992e3..b34650e18 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/table.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/table.go @@ -23,8 +23,8 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/internal/debug" ) // NewColumnSlice returns a new zero-copy slice of the column with the indicated @@ -137,11 +137,11 @@ func NewTable(schema *arrow.Schema, cols []arrow.Column, rows int64) *simpleTabl // - the total length of each column's array slice (ie: number of rows // in the column) aren't the same for all columns. func NewTableFromSlice(schema *arrow.Schema, data [][]arrow.Array) *simpleTable { - if len(data) != len(schema.Fields()) { + if len(data) != schema.NumFields() { panic("array/table: mismatch in number of columns and data for creating a table") } - cols := make([]arrow.Column, len(schema.Fields())) + cols := make([]arrow.Column, schema.NumFields()) for i, arrs := range data { field := schema.Field(i) chunked := arrow.NewChunked(field.Type, arrs) @@ -177,7 +177,7 @@ func NewTableFromSlice(schema *arrow.Schema, data [][]arrow.Array) *simpleTable // NewTableFromRecords panics if the records and schema are inconsistent. func NewTableFromRecords(schema *arrow.Schema, recs []arrow.Record) *simpleTable { arrs := make([]arrow.Array, len(recs)) - cols := make([]arrow.Column, len(schema.Fields())) + cols := make([]arrow.Column, schema.NumFields()) defer func(cols []arrow.Column) { for i := range cols { @@ -224,7 +224,7 @@ func (tbl *simpleTable) NumCols() int64 { return int64(len(tbl.cols) func (tbl *simpleTable) Column(i int) *arrow.Column { return &tbl.cols[i] } func (tbl *simpleTable) validate() { - if len(tbl.cols) != len(tbl.schema.Fields()) { + if len(tbl.cols) != tbl.schema.NumFields() { panic(errors.New("arrow/array: table schema mismatch")) } for i, col := range tbl.cols { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/timestamp.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/timestamp.go index 2928b1fc7..6ffb43e06 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/timestamp.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/timestamp.go @@ -24,11 +24,11 @@ import ( "sync/atomic" "time" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/json" ) // Timestamp represents an immutable sequence of arrow.Timestamp values. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/union.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/union.go index 869355ac7..1af3e7047 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/union.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/union.go @@ -25,12 +25,12 @@ import ( "strings" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/bitutils" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/bitutils" + "github.com/apache/arrow/go/v15/internal/json" ) // Union is a convenience interface to encompass both Sparse and Dense @@ -69,7 +69,7 @@ type Union interface { // or arrow.DenseMode. Mode() arrow.UnionMode // Field returns the requested child array for this union. Returns nil if a - // non-existent position is passed in. + // nonexistent position is passed in. // // The appropriate child for an index can be retrieved with Field(ChildID(index)) Field(pos int) arrow.Array @@ -896,7 +896,7 @@ func NewEmptySparseUnionBuilder(mem memory.Allocator) *SparseUnionBuilder { // children and type codes. Builders will be constructed for each child // using the fields in typ func NewSparseUnionBuilder(mem memory.Allocator, typ *arrow.SparseUnionType) *SparseUnionBuilder { - children := make([]Builder, len(typ.Fields())) + children := make([]Builder, typ.NumFields()) for i, f := range typ.Fields() { children[i] = NewBuilder(mem, f.Type) defer children[i].Release() @@ -980,7 +980,7 @@ func (b *SparseUnionBuilder) AppendEmptyValues(n int) { // // After appending to the corresponding child builder, all other child // builders should have a null or empty value appended to them (although -// this is not enfoced and any value is theoretically allowed and will be +// this is not enforced and any value is theoretically allowed and will be // ignored). func (b *SparseUnionBuilder) Append(nextType arrow.UnionTypeCode) { b.typesBuilder.AppendValue(nextType) @@ -1129,7 +1129,7 @@ func NewEmptyDenseUnionBuilder(mem memory.Allocator) *DenseUnionBuilder { // children and type codes. Builders will be constructed for each child // using the fields in typ func NewDenseUnionBuilder(mem memory.Allocator, typ *arrow.DenseUnionType) *DenseUnionBuilder { - children := make([]Builder, 0, len(typ.Fields())) + children := make([]Builder, 0, typ.NumFields()) defer func() { for _, child := range children { child.Release() diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/array/util.go b/vendor/github.com/apache/arrow/go/v15/arrow/array/util.go index 54d15a809..c9b730b04 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/array/util.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/array/util.go @@ -22,11 +22,11 @@ import ( "io" "strings" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/memory" - "github.com/apache/arrow/go/v14/internal/hashing" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/hashing" + "github.com/apache/arrow/go/v15/internal/json" ) func min(a, b int) int { @@ -428,7 +428,7 @@ func (n *nullArrayFactory) create() *Data { } if nf, ok := dt.(arrow.NestedType); ok { - childData = make([]arrow.ArrayData, len(nf.Fields())) + childData = make([]arrow.ArrayData, nf.NumFields()) } switch dt := dt.(type) { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/arrio/arrio.go b/vendor/github.com/apache/arrow/go/v15/arrow/arrio/arrio.go index 466a93a68..51cf6dc46 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/arrio/arrio.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/arrio/arrio.go @@ -22,7 +22,7 @@ import ( "errors" "io" - "github.com/apache/arrow/go/v14/arrow" + "github.com/apache/arrow/go/v15/arrow" ) // Reader is the interface that wraps the Read method. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/Makefile b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/Makefile index 12dd1d349..12dd1d349 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/Makefile +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/Makefile diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops.go index 7db750a6d..7db750a6d 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_amd64.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_amd64.go index ad0fd674a..ad0fd674a 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_arm64.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_arm64.go index 28d95d84a..28d95d84a 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_arm64.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_avx2_amd64.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_avx2_amd64.go index 1c01bd0f3..1c01bd0f3 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_avx2_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_avx2_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_avx2_amd64.s b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_avx2_amd64.s index 00172e865..00172e865 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_avx2_amd64.s +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_avx2_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_noasm.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_noasm.go index e25347791..e25347791 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_noasm.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_noasm.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_ppc64le.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_ppc64le.go index 28d95d84a..28d95d84a 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_ppc64le.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_ppc64le.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_s390x.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_s390x.go index 28d95d84a..28d95d84a 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_s390x.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_s390x.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_sse4_amd64.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_sse4_amd64.go index f16bce12b..f16bce12b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_sse4_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_sse4_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_sse4_amd64.s b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_sse4_amd64.s index c15e18625..c15e18625 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmap_ops_sse4_amd64.s +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmap_ops_sse4_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmaps.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmaps.go index 2e9c0601c..887a1920b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitmaps.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitmaps.go @@ -22,9 +22,9 @@ import ( "math/bits" "unsafe" - "github.com/apache/arrow/go/v14/arrow/endian" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" ) // BitmapReader is a simple bitmap reader for a byte slice. @@ -360,7 +360,7 @@ func (bm *BitmapWordWriter) PutNextTrailingByte(b byte, validBits int) { bm.bitmap = bm.bitmap[1:] } else { debug.Assert(validBits > 0 && validBits < 8, "invalid valid bits in bitmap word writer") - debug.Assert(BytesForBits(int64(bm.offset+validBits)) <= int64(len(bm.bitmap)), "writing trailiing byte outside of bounds of bitmap") + debug.Assert(BytesForBits(int64(bm.offset+validBits)) <= int64(len(bm.bitmap)), "writing trailing byte outside of bounds of bitmap") wr := NewBitmapWriter(bm.bitmap, int(bm.offset), validBits) for i := 0; i < validBits; i++ { if b&0x01 != 0 { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitutil.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitutil.go index a4a1519b8..dc510a8b3 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/bitutil.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/bitutil.go @@ -22,7 +22,7 @@ import ( "reflect" "unsafe" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow/memory" ) var ( diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/endian_default.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/endian_default.go index 9f5d3cdc7..ecbbaa70d 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/endian_default.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/endian_default.go @@ -14,6 +14,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !s390x // +build !s390x package bitutil diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/endian_s390x.go b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/endian_s390x.go index a9bba4391..e99605f58 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/bitutil/endian_s390x.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/bitutil/endian_s390x.go @@ -18,7 +18,7 @@ package bitutil import ( "math/bits" - "unsafe" + "unsafe" ) var toFromLEFunc = bits.ReverseBytes64 diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/compare.go b/vendor/github.com/apache/arrow/go/v15/arrow/compare.go index 58569b332..58569b332 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/compare.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/compare.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/datatype.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype.go index f0fb24ec8..b2f2329e5 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/datatype.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype.go @@ -21,7 +21,7 @@ import ( "hash/maphash" "strings" - "github.com/apache/arrow/go/v14/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/internal/debug" ) // Type is a logical type. They can be expressed as @@ -144,7 +144,7 @@ const ( // like BINARY but with 64-bit offsets, not yet implemented LARGE_BINARY - // like LIST but with 64-bit offsets. not yet implmented + // like LIST but with 64-bit offsets. not yet implemented LARGE_LIST // calendar interval with three fields @@ -210,6 +210,11 @@ type BinaryDataType interface { binary() } +type BinaryViewDataType interface { + BinaryDataType + view() +} + type OffsetsDataType interface { DataType OffsetTypeTraits() OffsetTraits @@ -272,6 +277,8 @@ func (b BufferSpec) Equals(other BufferSpec) bool { type DataTypeLayout struct { Buffers []BufferSpec HasDict bool + // VariadicSpec is what the buffers beyond len(Buffers) are expected to conform to. + VariadicSpec *BufferSpec } func SpecFixedWidth(w int) BufferSpec { return BufferSpec{KindFixedWidth, w} } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_binary.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_binary.go index a3a856864..f3e601f08 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_binary.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_binary.go @@ -83,16 +83,57 @@ func (t *LargeStringType) Layout() DataTypeLayout { func (t *LargeStringType) OffsetTypeTraits() OffsetTraits { return Int64Traits } func (LargeStringType) IsUtf8() bool { return true } +type BinaryViewType struct{} + +func (*BinaryViewType) ID() Type { return BINARY_VIEW } +func (*BinaryViewType) Name() string { return "binary_view" } +func (*BinaryViewType) String() string { return "binary_view" } +func (*BinaryViewType) IsUtf8() bool { return false } +func (*BinaryViewType) binary() {} +func (*BinaryViewType) view() {} +func (t *BinaryViewType) Fingerprint() string { return typeFingerprint(t) } +func (*BinaryViewType) Layout() DataTypeLayout { + variadic := SpecVariableWidth() + return DataTypeLayout{ + Buffers: []BufferSpec{SpecBitmap(), SpecFixedWidth(ViewHeaderSizeBytes)}, + VariadicSpec: &variadic, + } +} + +type StringViewType struct{} + +func (*StringViewType) ID() Type { return STRING_VIEW } +func (*StringViewType) Name() string { return "string_view" } +func (*StringViewType) String() string { return "string_view" } +func (*StringViewType) IsUtf8() bool { return true } +func (*StringViewType) binary() {} +func (*StringViewType) view() {} +func (t *StringViewType) Fingerprint() string { return typeFingerprint(t) } +func (*StringViewType) Layout() DataTypeLayout { + variadic := SpecVariableWidth() + return DataTypeLayout{ + Buffers: []BufferSpec{SpecBitmap(), SpecFixedWidth(ViewHeaderSizeBytes)}, + VariadicSpec: &variadic, + } +} + var ( BinaryTypes = struct { Binary BinaryDataType String BinaryDataType LargeBinary BinaryDataType LargeString BinaryDataType + BinaryView BinaryDataType + StringView BinaryDataType }{ Binary: &BinaryType{}, String: &StringType{}, LargeBinary: &LargeBinaryType{}, LargeString: &LargeStringType{}, + BinaryView: &BinaryViewType{}, + StringView: &StringViewType{}, } + + _ BinaryViewDataType = (*StringViewType)(nil) + _ BinaryViewDataType = (*BinaryViewType)(nil) ) diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_encoded.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_encoded.go index c1750a889..749f03a58 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_encoded.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_encoded.go @@ -58,6 +58,8 @@ func (t *RunEndEncodedType) Fields() []Field { } } +func (t *RunEndEncodedType) NumFields() int { return 2 } + func (*RunEndEncodedType) ValidRunEndsType(dt DataType) bool { switch dt.ID() { case INT16, INT32, INT64: diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_extension.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_extension.go index 271c8b0db..f0bcccdf2 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_extension.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_extension.go @@ -46,7 +46,7 @@ func getExtTypeRegistry() *sync.Map { } // RegisterExtensionType registers the provided ExtensionType by calling ExtensionName -// to use as a Key for registrying the type. If a type with the same name is already +// to use as a Key for registering the type. If a type with the same name is already // registered then this will return an error saying so, otherwise it will return nil // if successful registering the type. // This function is safe to call from multiple goroutines simultaneously. @@ -117,7 +117,7 @@ type ExtensionType interface { // concurrently. Serialize() string // Deserialize is called when reading in extension arrays and types via the IPC format - // in order to construct an instance of the appropriate extension type. The data passed in + // in order to construct an instance of the appropriate extension type. The passed in data // is pulled from the ARROW:extension:metadata key and may be nil or an empty slice. // If the storage type is incorrect or something else is invalid with the data this should // return nil and an appropriate error. @@ -161,6 +161,13 @@ func (e *ExtensionBase) Fields() []Field { return nil } +func (e *ExtensionBase) NumFields() int { + if nested, ok := e.Storage.(NestedType); ok { + return nested.NumFields() + } + return 0 +} + func (e *ExtensionBase) Layout() DataTypeLayout { return e.Storage.Layout() } // this no-op exists to ensure that this type must be embedded in any user-defined extension type. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_fixedwidth.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_fixedwidth.go index fc0b3aea5..6a7071422 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_fixedwidth.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_fixedwidth.go @@ -19,9 +19,10 @@ package arrow import ( "fmt" "strconv" + "sync" "time" - "github.com/apache/arrow/go/v14/internal/json" + "github.com/apache/arrow/go/v15/internal/json" "golang.org/x/xerrors" ) @@ -69,11 +70,6 @@ type ( // Date32FromTime returns a Date32 value from a time object func Date32FromTime(t time.Time) Date32 { - if _, offset := t.Zone(); offset != 0 { - // properly account for timezone adjustments before we calculate - // the number of days by adjusting the time and converting to UTC - t = t.Add(time.Duration(offset) * time.Second).UTC() - } return Date32(t.Truncate(24*time.Hour).Unix() / int64((time.Hour * 24).Seconds())) } @@ -87,11 +83,6 @@ func (d Date32) FormattedString() string { // Date64FromTime returns a Date64 value from a time object func Date64FromTime(t time.Time) Date64 { - if _, offset := t.Zone(); offset != 0 { - // properly account for timezone adjustments before we calculate - // the actual value by adjusting the time and converting to UTC - t = t.Add(time.Duration(offset) * time.Second).UTC() - } // truncate to the start of the day to get the correct value t = t.Truncate(24 * time.Hour) return Date64(t.Unix()*1e3 + int64(t.Nanosecond())/1e6) @@ -354,6 +345,7 @@ type TimestampType struct { TimeZone string loc *time.Location + mx sync.RWMutex } func (*TimestampType) ID() Type { return TIMESTAMP } @@ -386,6 +378,8 @@ func (t *TimestampType) TimeUnit() TimeUnit { return t.Unit } // This should be called if you change the value of the TimeZone after having // potentially called GetZone. func (t *TimestampType) ClearCachedLocation() { + t.mx.Lock() + defer t.mx.Unlock() t.loc = nil } @@ -398,10 +392,20 @@ func (t *TimestampType) ClearCachedLocation() { // so if you change the value of TimeZone after calling this, make sure to call // ClearCachedLocation. func (t *TimestampType) GetZone() (*time.Location, error) { + t.mx.RLock() if t.loc != nil { + defer t.mx.RUnlock() return t.loc, nil } + t.mx.RUnlock() + t.mx.Lock() + defer t.mx.Unlock() + // in case GetZone() was called in between releasing the read lock and + // getting the write lock + if t.loc != nil { + return t.loc, nil + } // the TimeZone string is allowed to be either a valid tzdata string // such as "America/New_York" or an absolute offset of the form -XX:XX // or +XX:XX @@ -415,7 +419,7 @@ func (t *TimestampType) GetZone() (*time.Location, error) { if loc, err := time.LoadLocation(t.TimeZone); err == nil { t.loc = loc - return t.loc, err + return loc, err } // at this point we know that the timezone isn't empty, and didn't match diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_nested.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_nested.go index 4ae488033..9a8873a50 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_nested.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_nested.go @@ -22,7 +22,7 @@ import ( "strconv" "strings" - "github.com/apache/arrow/go/v14/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/internal/debug" ) type ( @@ -32,6 +32,8 @@ type ( // Fields method provides a copy of NestedType fields // (so it can be safely mutated and will not result in updating the NestedType). Fields() []Field + // NumFields provides the number of fields without allocating. + NumFields() int } ListLikeType interface { @@ -109,6 +111,8 @@ func (t *ListType) ElemField() Field { func (t *ListType) Fields() []Field { return []Field{t.ElemField()} } +func (t *ListType) NumFields() int { return 1 } + func (*ListType) Layout() DataTypeLayout { return DataTypeLayout{Buffers: []BufferSpec{SpecBitmap(), SpecFixedWidth(Int32SizeBytes)}} } @@ -242,6 +246,8 @@ func (t *FixedSizeListType) Fingerprint() string { func (t *FixedSizeListType) Fields() []Field { return []Field{t.ElemField()} } +func (t *FixedSizeListType) NumFields() int { return 1 } + func (*FixedSizeListType) Layout() DataTypeLayout { return DataTypeLayout{Buffers: []BufferSpec{SpecBitmap()}} } @@ -308,6 +314,8 @@ func (t *ListViewType) ElemField() Field { func (t *ListViewType) Fields() []Field { return []Field{t.ElemField()} } +func (t *ListViewType) NumFields() int { return 1 } + func (*ListViewType) Layout() DataTypeLayout { return DataTypeLayout{Buffers: []BufferSpec{SpecBitmap(), SpecFixedWidth(Int32SizeBytes), SpecFixedWidth(Int32SizeBytes)}} } @@ -376,6 +384,8 @@ func (t *LargeListViewType) ElemField() Field { func (t *LargeListViewType) Fields() []Field { return []Field{t.ElemField()} } +func (t *LargeListViewType) NumFields() int { return 1 } + func (*LargeListViewType) Layout() DataTypeLayout { return DataTypeLayout{Buffers: []BufferSpec{SpecBitmap(), SpecFixedWidth(Int64SizeBytes), SpecFixedWidth(Int64SizeBytes)}} } @@ -447,6 +457,8 @@ func (t *StructType) Fields() []Field { return fields } +func (t *StructType) NumFields() int { return len(t.fields) } + func (t *StructType) Field(i int) Field { return t.fields[i] } // FieldByName gets the field with the given name. @@ -464,7 +476,7 @@ func (t *StructType) FieldByName(name string) (Field, bool) { // FieldIdx gets the index of the field with the given name. // // If there are multiple fields with the given name, FieldIdx returns -// the index of the first first such field. +// the index of the first such field. func (t *StructType) FieldIdx(name string) (int, bool) { i, ok := t.index[name] if ok { @@ -598,6 +610,8 @@ func (t *MapType) Fingerprint() string { func (t *MapType) Fields() []Field { return []Field{t.ElemField()} } +func (t *MapType) NumFields() int { return 1 } + func (t *MapType) Layout() DataTypeLayout { return t.value.Layout() } @@ -690,6 +704,8 @@ func (t *unionType) Fields() []Field { return fields } +func (t *unionType) NumFields() int { return len(t.children) } + func (t *unionType) TypeCodes() []UnionTypeCode { return t.typeCodes } func (t *unionType) ChildIDs() []int { return t.childIDs[:] } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_null.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_null.go index 2d2454c65..2d2454c65 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_null.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_null.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_numeric.gen.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_numeric.gen.go index 62cbd9001..62cbd9001 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_numeric.gen.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_numeric.gen.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_numeric.gen.go.tmpl b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_numeric.gen.go.tmpl index 611046afc..611046afc 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_numeric.gen.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_numeric.gen.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_numeric.gen.go.tmpldata b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_numeric.gen.go.tmpldata index 12e69fe60..12e69fe60 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/datatype_numeric.gen.go.tmpldata +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_numeric.gen.go.tmpldata diff --git a/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader.go new file mode 100644 index 000000000..54b9256b3 --- /dev/null +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader.go @@ -0,0 +1,141 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package arrow + +import ( + "bytes" + "unsafe" + + "github.com/apache/arrow/go/v15/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/memory" +) + +const ( + ViewPrefixLen = 4 + viewInlineSize = 12 +) + +func IsViewInline(length int) bool { + return length < viewInlineSize +} + +// ViewHeader is a variable length string (utf8) or byte slice with +// a 4 byte prefix and inline optimization for small values (12 bytes +// or fewer). This is similar to Go's standard string but limited by +// a length of Uint32Max and up to the first four bytes of the string +// are copied into the struct. This prefix allows failing comparisons +// early and can reduce CPU cache working set when dealing with short +// strings. +// +// There are two situations: +// +// Entirely inlined string data +// |----|------------| +// ^ ^ +// | | +// size inline string data, zero padded +// +// Reference into buffer +// |----|----|----|----| +// ^ ^ ^ ^ +// | | | | +// size prefix buffer index and offset to out-of-line portion +// +// Adapted from TU Munich's UmbraDB [1], Velox, DuckDB. +// +// [1]: https://db.in.tum.de/~freitag/papers/p29-neumann-cidr20.pdf +type ViewHeader struct { + size int32 + // the first 4 bytes of this are the prefix for the string + // if size <= StringHeaderInlineSize, then the entire string + // is in the data array and is zero padded. + // if size > StringHeaderInlineSize, the next 8 bytes are 2 uint32 + // values which are the buffer index and offset in that buffer + // containing the full string. + data [viewInlineSize]byte +} + +func (sh *ViewHeader) IsInline() bool { + return sh.size <= int32(viewInlineSize) +} + +func (sh *ViewHeader) Len() int { return int(sh.size) } +func (sh *ViewHeader) Prefix() [ViewPrefixLen]byte { + return *(*[4]byte)(unsafe.Pointer(&sh.data)) +} + +func (sh *ViewHeader) BufferIndex() int32 { + return int32(endian.Native.Uint32(sh.data[ViewPrefixLen:])) +} + +func (sh *ViewHeader) BufferOffset() int32 { + return int32(endian.Native.Uint32(sh.data[ViewPrefixLen+4:])) +} + +func (sh *ViewHeader) InlineBytes() (data []byte) { + debug.Assert(sh.IsInline(), "calling InlineBytes on non-inline ViewHeader") + return sh.data[:sh.size] +} + +func (sh *ViewHeader) SetBytes(data []byte) int { + sh.size = int32(len(data)) + if sh.IsInline() { + return copy(sh.data[:], data) + } + return copy(sh.data[:4], data) +} + +func (sh *ViewHeader) SetString(data string) int { + sh.size = int32(len(data)) + if sh.IsInline() { + return copy(sh.data[:], data) + } + return copy(sh.data[:4], data) +} + +func (sh *ViewHeader) SetIndexOffset(bufferIndex, offset int32) { + endian.Native.PutUint32(sh.data[ViewPrefixLen:], uint32(bufferIndex)) + endian.Native.PutUint32(sh.data[ViewPrefixLen+4:], uint32(offset)) +} + +func (sh *ViewHeader) Equals(buffers []*memory.Buffer, other *ViewHeader, otherBuffers []*memory.Buffer) bool { + if sh.sizeAndPrefixAsInt64() != other.sizeAndPrefixAsInt64() { + return false + } + + if sh.IsInline() { + return sh.inlinedAsInt64() == other.inlinedAsInt64() + } + + return bytes.Equal(sh.getBufferBytes(buffers), other.getBufferBytes(otherBuffers)) +} + +func (sh *ViewHeader) getBufferBytes(buffers []*memory.Buffer) []byte { + offset := sh.BufferOffset() + return buffers[sh.BufferIndex()].Bytes()[offset : offset+sh.size] +} + +func (sh *ViewHeader) inlinedAsInt64() int64 { + s := unsafe.Slice((*int64)(unsafe.Pointer(sh)), 2) + return s[1] +} + +func (sh *ViewHeader) sizeAndPrefixAsInt64() int64 { + s := unsafe.Slice((*int64)(unsafe.Pointer(sh)), 2) + return s[0] +} diff --git a/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline.go new file mode 100644 index 000000000..89ac1d06a --- /dev/null +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline.go @@ -0,0 +1,31 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build go1.20 + +package arrow + +import ( + "unsafe" + + "github.com/apache/arrow/go/v15/arrow/internal/debug" +) + +func (sh *ViewHeader) InlineString() (data string) { + debug.Assert(sh.IsInline(), "calling InlineString on non-inline ViewHeader") + + return unsafe.String((*byte)(unsafe.Pointer(&sh.data)), sh.size) +} diff --git a/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline_go1.19.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline_go1.19.go new file mode 100644 index 000000000..aec66009d --- /dev/null +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline_go1.19.go @@ -0,0 +1,35 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build !go1.20 && !tinygo + +package arrow + +import ( + "reflect" + "unsafe" + + "github.com/apache/arrow/go/v15/arrow/internal/debug" +) + +func (sh *ViewHeader) InlineString() (data string) { + debug.Assert(sh.IsInline(), "calling InlineString on non-inline ViewHeader") + + h := (*reflect.StringHeader)(unsafe.Pointer(&data)) + h.Data = uintptr(unsafe.Pointer(&sh.data)) + h.Len = int(sh.size) + return +} diff --git a/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline_tinygo.go b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline_tinygo.go new file mode 100644 index 000000000..bff63a273 --- /dev/null +++ b/vendor/github.com/apache/arrow/go/v15/arrow/datatype_viewheader_inline_tinygo.go @@ -0,0 +1,35 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build !go1.20 && tinygo + +package arrow + +import ( + "reflect" + "unsafe" + + "github.com/apache/arrow/go/v15/arrow/internal/debug" +) + +func (sh *ViewHeader) InlineString() (data string) { + debug.Assert(sh.IsInline(), "calling InlineString on non-inline ViewHeader") + + h := (*reflect.StringHeader)(unsafe.Pointer(&data)) + h.Data = uintptr(unsafe.Pointer(&sh.data)) + h.Len = uintptr(sh.size) + return +} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/decimal128/decimal128.go b/vendor/github.com/apache/arrow/go/v15/arrow/decimal128/decimal128.go index 898d7b427..7ce8cd51b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/decimal128/decimal128.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/decimal128/decimal128.go @@ -23,7 +23,7 @@ import ( "math/big" "math/bits" - "github.com/apache/arrow/go/v14/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/internal/debug" ) const ( @@ -237,7 +237,7 @@ func FromString(v string, prec, scale int32) (n Num, err error) { // math/big library refers to precision in floating point terms // where it refers to the "number of bits of precision in the mantissa". // So we need to figure out how many bits we should use for precision, - // based on the input precision. Too much precision and we're not rounding + // based on the input precision. Too much precision and we aren't rounding // when we should. Too little precision and we round when we shouldn't. // // In general, the number of decimal digits you get from a given number @@ -261,28 +261,40 @@ func FromString(v string, prec, scale int32) (n Num, err error) { var precInBits = uint(math.Round(float64(prec+scale+1)/math.Log10(2))) + 1 var out *big.Float - out, _, err = big.ParseFloat(v, 10, 127, big.ToNearestEven) + out, _, err = big.ParseFloat(v, 10, 128, big.ToNearestEven) if err != nil { return } - // Since we're going to truncate this to get an integer, we need to round - // the value instead because of edge cases so that we match how other implementations - // (e.g. C++) handles Decimal values. So if we're negative we'll subtract 0.5 and if - // we're positive we'll add 0.5. - out.Mul(out, big.NewFloat(math.Pow10(int(scale)))).SetPrec(precInBits) - if out.Signbit() { - out.Sub(out, pt5) + if scale < 0 { + var tmp big.Int + val, _ := out.Int(&tmp) + if val.BitLen() > 127 { + return Num{}, errors.New("bitlen too large for decimal128") + } + n = FromBigInt(val) + n, _ = n.Div(scaleMultipliers[-scale]) } else { - out.Add(out, pt5) - } + // Since we're going to truncate this to get an integer, we need to round + // the value instead because of edge cases so that we match how other implementations + // (e.g. C++) handles Decimal values. So if we're negative we'll subtract 0.5 and if + // we're positive we'll add 0.5. + p := (&big.Float{}).SetInt(scaleMultipliers[scale].BigInt()) + out.SetPrec(precInBits).Mul(out, p) + if out.Signbit() { + out.Sub(out, pt5) + } else { + out.Add(out, pt5) + } - var tmp big.Int - val, _ := out.Int(&tmp) - if val.BitLen() > 127 { - return Num{}, errors.New("bitlen too large for decimal128") + var tmp big.Int + val, _ := out.Int(&tmp) + if val.BitLen() > 127 { + return Num{}, errors.New("bitlen too large for decimal128") + } + n = FromBigInt(val) } - n = FromBigInt(val) + if !n.FitsInPrecision(prec) { err = fmt.Errorf("val %v doesn't fit in precision %d", n, prec) } @@ -505,7 +517,11 @@ func (n Num) FitsInPrecision(prec int32) bool { func (n Num) ToString(scale int32) string { f := (&big.Float{}).SetInt(n.BigInt()) - f.Quo(f, (&big.Float{}).SetInt(scaleMultipliers[scale].BigInt())) + if scale < 0 { + f.SetPrec(128).Mul(f, (&big.Float{}).SetInt(scaleMultipliers[-scale].BigInt())) + } else { + f.SetPrec(128).Quo(f, (&big.Float{}).SetInt(scaleMultipliers[scale].BigInt())) + } return f.Text('f', int(scale)) } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/decimal256/decimal256.go b/vendor/github.com/apache/arrow/go/v15/arrow/decimal256/decimal256.go index 4bfcd4e04..65be0df9d 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/decimal256/decimal256.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/decimal256/decimal256.go @@ -23,8 +23,8 @@ import ( "math/big" "math/bits" - "github.com/apache/arrow/go/v14/arrow/decimal128" - "github.com/apache/arrow/go/v14/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/decimal128" + "github.com/apache/arrow/go/v15/arrow/internal/debug" ) const ( @@ -125,7 +125,7 @@ func FromString(v string, prec, scale int32) (n Num, err error) { // math/big library refers to precision in floating point terms // where it refers to the "number of bits of precision in the mantissa". // So we need to figure out how many bits we should use for precision, - // based on the input precision. Too much precision and we're not rounding + // based on the input precision. Too much precision and we aren't rounding // when we should. Too little precision and we round when we shouldn't. // // In general, the number of decimal digits you get from a given number @@ -154,23 +154,34 @@ func FromString(v string, prec, scale int32) (n Num, err error) { return } - out.Mul(out, big.NewFloat(math.Pow10(int(scale)))).SetPrec(precInBits) - // Since we're going to truncate this to get an integer, we need to round - // the value instead because of edge cases so that we match how other implementations - // (e.g. C++) handles Decimal values. So if we're negative we'll subtract 0.5 and if - // we're positive we'll add 0.5. - if out.Signbit() { - out.Sub(out, pt5) + if scale < 0 { + var tmp big.Int + val, _ := out.Int(&tmp) + if val.BitLen() > 255 { + return Num{}, errors.New("bitlen too large for decimal256") + } + n = FromBigInt(val) + + n, _ = n.Div(scaleMultipliers[-scale]) } else { - out.Add(out, pt5) - } + out.Mul(out, (&big.Float{}).SetInt(scaleMultipliers[scale].BigInt())).SetPrec(precInBits) + // Since we're going to truncate this to get an integer, we need to round + // the value instead because of edge cases so that we match how other implementations + // (e.g. C++) handles Decimal values. So if we're negative we'll subtract 0.5 and if + // we're positive we'll add 0.5. + if out.Signbit() { + out.Sub(out, pt5) + } else { + out.Add(out, pt5) + } - var tmp big.Int - val, _ := out.Int(&tmp) - if val.BitLen() > 255 { - return Num{}, errors.New("bitlen too large for decimal256") + var tmp big.Int + val, _ := out.Int(&tmp) + if val.BitLen() > 255 { + return Num{}, errors.New("bitlen too large for decimal256") + } + n = FromBigInt(val) } - n = FromBigInt(val) if !n.FitsInPrecision(prec) { err = fmt.Errorf("value %v doesn't fit in precision %d", n, prec) } @@ -506,7 +517,11 @@ func (n Num) FitsInPrecision(prec int32) bool { func (n Num) ToString(scale int32) string { f := (&big.Float{}).SetInt(n.BigInt()) - f.Quo(f, (&big.Float{}).SetInt(scaleMultipliers[scale].BigInt())) + if scale < 0 { + f.SetPrec(256).Mul(f, (&big.Float{}).SetInt(scaleMultipliers[-scale].BigInt())) + } else { + f.SetPrec(256).Quo(f, (&big.Float{}).SetInt(scaleMultipliers[scale].BigInt())) + } return f.Text('f', int(scale)) } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/doc.go b/vendor/github.com/apache/arrow/go/v15/arrow/doc.go index e923d05d6..d146bc277 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/doc.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/doc.go @@ -36,7 +36,7 @@ To build with tinygo include the noasm build tag. */ package arrow -const PkgVersion = "14.0.2" +const PkgVersion = "15.0.2" //go:generate go run _tools/tmpl/main.go -i -data=numeric.tmpldata type_traits_numeric.gen.go.tmpl type_traits_numeric.gen_test.go.tmpl array/numeric.gen.go.tmpl array/numericbuilder.gen.go.tmpl array/bufferbuilder_numeric.gen.go.tmpl //go:generate go run _tools/tmpl/main.go -i -data=datatype_numeric.gen.go.tmpldata datatype_numeric.gen.go.tmpl tensor/numeric.gen.go.tmpl tensor/numeric.gen_test.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/encoded/ree_utils.go b/vendor/github.com/apache/arrow/go/v15/arrow/encoded/ree_utils.go index 1f71e7b52..2ff4e7cad 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/encoded/ree_utils.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/encoded/ree_utils.go @@ -20,7 +20,7 @@ import ( "math" "sort" - "github.com/apache/arrow/go/v14/arrow" + "github.com/apache/arrow/go/v15/arrow" ) // FindPhysicalIndex performs a binary search on the run-ends to return diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/endian/big.go b/vendor/github.com/apache/arrow/go/v15/arrow/endian/big.go index 0b9258574..0b9258574 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/endian/big.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/endian/big.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/endian/endian.go b/vendor/github.com/apache/arrow/go/v15/arrow/endian/endian.go index 3ecda7b36..d4865025b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/endian/endian.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/endian/endian.go @@ -17,8 +17,8 @@ package endian import ( - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/internal/flatbuf" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/internal/flatbuf" ) type Endianness flatbuf.Endianness diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/endian/little.go b/vendor/github.com/apache/arrow/go/v15/arrow/endian/little.go index def1fc64b..def1fc64b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/endian/little.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/endian/little.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/errors.go b/vendor/github.com/apache/arrow/go/v15/arrow/errors.go index 72e6fd8bf..72e6fd8bf 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/errors.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/errors.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/float16/float16.go b/vendor/github.com/apache/arrow/go/v15/arrow/float16/float16.go index 4e03d13df..e0192495e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/float16/float16.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/float16/float16.go @@ -17,6 +17,7 @@ package float16 import ( + "encoding/binary" "math" "strconv" ) @@ -29,6 +30,11 @@ type Num struct { bits uint16 } +var ( + MaxNum = Num{bits: 0b0111101111111111} + MinNum = MaxNum.Negate() +) + // New creates a new half-precision floating point value from the provided // float32 value. func New(f float32) Num { @@ -86,6 +92,11 @@ func (n Num) Div(rhs Num) Num { return New(n.Float32() / rhs.Float32()) } +// Equal returns true if the value represented by n is == other +func (n Num) Equal(other Num) bool { + return n.Float32() == other.Float32() +} + // Greater returns true if the value represented by n is > other func (n Num) Greater(other Num) bool { return n.Float32() > other.Float32() @@ -152,14 +163,39 @@ func (n Num) Abs() Num { } func (n Num) Sign() int { - f := n.Float32() - if f > 0 { - return 1 - } else if f == 0 { + if n.IsZero() { return 0 + } else if n.Signbit() { + return -1 } - return -1 + return 1 } +func (n Num) Signbit() bool { return (n.bits & 0x8000) != 0 } + +func (n Num) IsNaN() bool { return (n.bits & 0x7fff) > 0x7c00 } + +func (n Num) IsZero() bool { return (n.bits & 0x7fff) == 0 } + func (f Num) Uint16() uint16 { return f.bits } func (f Num) String() string { return strconv.FormatFloat(float64(f.Float32()), 'g', -1, 32) } + +func Inf() Num { return Num{bits: 0x7c00} } + +func NaN() Num { return Num{bits: 0x7fff} } + +func FromBits(src uint16) Num { return Num{bits: src} } + +func FromLEBytes(src []byte) Num { + return Num{bits: binary.LittleEndian.Uint16(src)} +} + +func (f Num) PutLEBytes(dst []byte) { + binary.LittleEndian.PutUint16(dst, f.bits) +} + +func (f Num) ToLEBytes() []byte { + dst := make([]byte, 2) + f.PutLEBytes(dst) + return dst +} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/assert_off.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/assert_off.go index 52b9a2331..52b9a2331 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/assert_off.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/assert_off.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/assert_on.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/assert_on.go index 2aa5d6ace..2aa5d6ace 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/assert_on.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/assert_on.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/doc.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/doc.go index 3ee1783ca..3ee1783ca 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/doc.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/doc.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/log_off.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/log_off.go index 48da8e1ee..48da8e1ee 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/log_off.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/log_off.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/log_on.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/log_on.go index 99d0c8ae3..99d0c8ae3 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/log_on.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/log_on.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/util.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/util.go index 7bd3d5389..7bd3d5389 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/debug/util.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/debug/util.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/dictutils/dict.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/dictutils/dict.go index e09a2f4a0..5c0bf54da 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/dictutils/dict.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/dictutils/dict.go @@ -21,9 +21,9 @@ import ( "fmt" "hash/maphash" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/array" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/array" + "github.com/apache/arrow/go/v15/arrow/memory" ) type Kind int8 @@ -104,7 +104,7 @@ func (d *Mapper) InsertPath(pos FieldPos) { d.hasher.Reset() } -func (d *Mapper) ImportField(pos FieldPos, field *arrow.Field) { +func (d *Mapper) ImportField(pos FieldPos, field arrow.Field) { dt := field.Type if dt.ID() == arrow.EXTENSION { dt = dt.(arrow.ExtensionType).StorageType() @@ -126,13 +126,18 @@ func (d *Mapper) ImportField(pos FieldPos, field *arrow.Field) { func (d *Mapper) ImportFields(pos FieldPos, fields []arrow.Field) { for i := range fields { - d.ImportField(pos.Child(int32(i)), &fields[i]) + d.ImportField(pos.Child(int32(i)), fields[i]) } } func (d *Mapper) ImportSchema(schema *arrow.Schema) { d.pathToID = make(map[uint64]int64) - d.ImportFields(NewFieldPos(), schema.Fields()) + // This code path intentionally avoids calling ImportFields with + // schema.Fields to avoid allocations. + pos := NewFieldPos() + for i := 0; i < schema.NumFields(); i++ { + d.ImportField(pos.Child(int32(i)), schema.Field(i)) + } } func hasUnresolvedNestedDict(data arrow.ArrayData) bool { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Binary.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Binary.go index e8018e74c..e8018e74c 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Binary.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Binary.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/BinaryView.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/BinaryView.go index 09ca5e7db..09ca5e7db 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/BinaryView.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/BinaryView.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Block.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Block.go index 57a697b19..57a697b19 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Block.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Block.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/BodyCompression.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/BodyCompression.go index 6468e2313..6468e2313 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/BodyCompression.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/BodyCompression.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/BodyCompressionMethod.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/BodyCompressionMethod.go index 108ab3e07..108ab3e07 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/BodyCompressionMethod.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/BodyCompressionMethod.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Bool.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Bool.go index 6a4a9d268..6a4a9d268 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Bool.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Bool.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Buffer.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Buffer.go index eba8d99b2..eba8d99b2 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Buffer.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Buffer.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/CompressionType.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/CompressionType.go index 96e9df072..96e9df072 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/CompressionType.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/CompressionType.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Date.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Date.go index 32983ec54..32983ec54 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Date.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Date.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DateUnit.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DateUnit.go index 8a12eec17..8a12eec17 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DateUnit.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DateUnit.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Decimal.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Decimal.go index c9de254d1..c9de254d1 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Decimal.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Decimal.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DictionaryBatch.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DictionaryBatch.go index 25b5384e4..25b5384e4 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DictionaryBatch.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DictionaryBatch.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DictionaryEncoding.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DictionaryEncoding.go index a9b09530b..a9b09530b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DictionaryEncoding.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DictionaryEncoding.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DictionaryKind.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DictionaryKind.go index 126ba5f7f..126ba5f7f 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/DictionaryKind.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/DictionaryKind.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Duration.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Duration.go index 57b7b2a03..57b7b2a03 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Duration.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Duration.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Endianness.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Endianness.go index cefa2ff9c..cefa2ff9c 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Endianness.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Endianness.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Feature.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Feature.go index ae5a0398b..ae5a0398b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Feature.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Feature.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Field.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Field.go index c03cf2f87..c03cf2f87 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Field.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Field.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FieldNode.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FieldNode.go index 606b30bfe..606b30bfe 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FieldNode.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FieldNode.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FixedSizeBinary.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FixedSizeBinary.go index 4e660d507..4e660d507 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FixedSizeBinary.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FixedSizeBinary.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FixedSizeList.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FixedSizeList.go index dabf5cc85..dabf5cc85 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FixedSizeList.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FixedSizeList.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FloatingPoint.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FloatingPoint.go index 241d448dc..241d448dc 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/FloatingPoint.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/FloatingPoint.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Footer.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Footer.go index 65b0ff095..65b0ff095 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Footer.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Footer.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Int.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Int.go index 9f4b19117..9f4b19117 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Int.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Int.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Interval.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Interval.go index 12c56d5c2..12c56d5c2 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Interval.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Interval.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/IntervalUnit.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/IntervalUnit.go index f3ed1ae7b..f3ed1ae7b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/IntervalUnit.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/IntervalUnit.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/KeyValue.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/KeyValue.go index c1b85318e..c1b85318e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/KeyValue.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/KeyValue.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeBinary.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeBinary.go index 2c3befcc1..2c3befcc1 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeBinary.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeBinary.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeList.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeList.go index 92f228458..92f228458 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeList.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeList.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeListView.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeListView.go index 5b1df149c..5b1df149c 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeListView.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeListView.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeUtf8.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeUtf8.go index e78b33e11..e78b33e11 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/LargeUtf8.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/LargeUtf8.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/List.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/List.go index ba84319d3..ba84319d3 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/List.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/List.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/ListView.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/ListView.go index 46b1e0b3c..46b1e0b3c 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/ListView.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/ListView.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Map.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Map.go index 8802aba1e..8802aba1e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Map.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Map.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Message.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Message.go index f4b4a0ff8..f4b4a0ff8 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Message.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Message.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/MessageHeader.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/MessageHeader.go index c12fc1058..c12fc1058 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/MessageHeader.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/MessageHeader.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/MetadataVersion.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/MetadataVersion.go index 21b234f9c..bb5e99dd5 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/MetadataVersion.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/MetadataVersion.go @@ -31,7 +31,7 @@ const ( MetadataVersionV3 MetadataVersion = 2 /// >= 0.8.0 (December 2017). Non-backwards compatible with V3. MetadataVersionV4 MetadataVersion = 3 - /// >= 1.0.0 (July 2020. Backwards compatible with V4 (V5 readers can read V4 + /// >= 1.0.0 (July 2020). Backwards compatible with V4 (V5 readers can read V4 /// metadata and IPC messages). Implementations are recommended to provide a /// V4 compatibility mode with V5 format changes disabled. /// diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Null.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Null.go index 3c3eb4bda..3c3eb4bda 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Null.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Null.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Precision.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Precision.go index d8021ccc4..d8021ccc4 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Precision.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Precision.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/RecordBatch.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/RecordBatch.go index c50f4a6e8..c50f4a6e8 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/RecordBatch.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/RecordBatch.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/RunEndEncoded.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/RunEndEncoded.go index fa414c1bf..fa414c1bf 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/RunEndEncoded.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/RunEndEncoded.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/RunLengthEncoded.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/RunLengthEncoded.go index 8822c0660..8822c0660 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/RunLengthEncoded.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/RunLengthEncoded.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Schema.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Schema.go index 4ee5ecc9e..4ee5ecc9e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Schema.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Schema.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go index 2d86fdef7..2d86fdef7 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseMatrixCompressedAxis.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseMatrixIndexCSR.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseMatrixIndexCSR.go index de8217650..de8217650 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseMatrixIndexCSR.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseMatrixIndexCSR.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseMatrixIndexCSX.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseMatrixIndexCSX.go index c28cc5d08..c28cc5d08 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseMatrixIndexCSX.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseMatrixIndexCSX.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensor.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensor.go index 6f3f55797..6f3f55797 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensor.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensor.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensorIndex.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensorIndex.go index 42aa818b0..42aa818b0 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensorIndex.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensorIndex.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensorIndexCOO.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensorIndexCOO.go index f8eee99fa..f8eee99fa 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensorIndexCOO.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensorIndexCOO.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensorIndexCSF.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensorIndexCSF.go index a824c84eb..a824c84eb 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/SparseTensorIndexCSF.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/SparseTensorIndexCSF.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Struct_.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Struct_.go index 427e70603..427e70603 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Struct_.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Struct_.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Tensor.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Tensor.go index 39d70e351..39d70e351 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Tensor.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Tensor.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/TensorDim.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/TensorDim.go index 14b821208..14b821208 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/TensorDim.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/TensorDim.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Time.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Time.go index 2fb6e4c11..2fb6e4c11 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Time.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Time.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/TimeUnit.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/TimeUnit.go index df14ece4f..df14ece4f 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/TimeUnit.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/TimeUnit.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Timestamp.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Timestamp.go index f53211455..d0058e13e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Timestamp.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Timestamp.go @@ -121,7 +121,7 @@ import ( /// no indication of how to map this information to a physical point in time. /// Naive date-times must be handled with care because of this missing /// information, and also because daylight saving time (DST) may make -/// some values ambiguous or non-existent. A naive date-time may be +/// some values ambiguous or nonexistent. A naive date-time may be /// stored as a struct with Date and Time fields. However, it may also be /// encoded into a Timestamp column with an empty timezone. The timestamp /// values should be computed "as if" the timezone of the date-time values diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Type.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Type.go index ab2bce9c6..ab2bce9c6 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Type.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Type.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Union.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Union.go index e34121d47..e34121d47 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Union.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Union.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/UnionMode.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/UnionMode.go index 357c1f3cb..357c1f3cb 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/UnionMode.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/UnionMode.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Utf8.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Utf8.go index 4ff365a37..4ff365a37 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Utf8.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Utf8.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Utf8View.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Utf8View.go index 9cf821490..9cf821490 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/flatbuf/Utf8View.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/flatbuf/Utf8View.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/internal/utils.go b/vendor/github.com/apache/arrow/go/v15/arrow/internal/utils.go index 265f030df..7b5df167e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/internal/utils.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/internal/utils.go @@ -17,8 +17,8 @@ package internal import ( - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/internal/flatbuf" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/internal/flatbuf" ) const CurMetadataVersion = flatbuf.MetadataVersionV5 @@ -45,3 +45,15 @@ func HasValidityBitmap(id arrow.Type, version flatbuf.MetadataVersion) bool { } return true } + +// HasBufferSizesBuffer returns whether a given type has an extra buffer +// in the C ABI to store the sizes of other buffers. Currently this is only +// StringView and BinaryView. +func HasBufferSizesBuffer(id arrow.Type) bool { + switch id { + case arrow.STRING_VIEW, arrow.BINARY_VIEW: + return true + default: + return false + } +} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/compression.go b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/compression.go index 73fb91650..06a9cf67c 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/compression.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/compression.go @@ -19,9 +19,9 @@ package ipc import ( "io" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/internal/flatbuf" + "github.com/apache/arrow/go/v15/arrow/memory" "github.com/klauspost/compress/zstd" "github.com/pierrec/lz4/v4" ) @@ -104,7 +104,9 @@ type lz4Decompressor struct { *lz4.Reader } -func (z *lz4Decompressor) Close() {} +func (z *lz4Decompressor) Close() { + z.Reader.Reset(nil) +} func getDecompressor(codec flatbuf.CompressionType) decompressor { switch codec { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/endian_swap.go b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/endian_swap.go index d98fec108..35ba0e4e7 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/endian_swap.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/endian_swap.go @@ -18,11 +18,12 @@ package ipc import ( "errors" + "fmt" "math/bits" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/array" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/array" + "github.com/apache/arrow/go/v15/arrow/memory" ) // swap the endianness of the array's buffers as needed in-place to save @@ -119,7 +120,10 @@ func swapType(dt arrow.DataType, data *array.Data) (err error) { return swapType(dt.IndexType, data) case arrow.FixedWidthDataType: byteSwapBuffer(dt.BitWidth(), data.Buffers()[1]) + default: + err = fmt.Errorf("%w: swapping endianness of %s", arrow.ErrNotImplemented, dt) } + return } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/file_reader.go b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/file_reader.go index 10cb2cae7..7bc7f6ebf 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/file_reader.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/file_reader.go @@ -23,14 +23,14 @@ import ( "fmt" "io" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/array" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/endian" - "github.com/apache/arrow/go/v14/arrow/internal" - "github.com/apache/arrow/go/v14/arrow/internal/dictutils" - "github.com/apache/arrow/go/v14/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/array" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/internal" + "github.com/apache/arrow/go/v15/arrow/internal/dictutils" + "github.com/apache/arrow/go/v15/arrow/internal/flatbuf" + "github.com/apache/arrow/go/v15/arrow/memory" ) // FileReader is an Arrow file reader. @@ -351,9 +351,9 @@ func newRecord(schema *arrow.Schema, memo *dictutils.Memo, meta *memory.Buffer, } pos := dictutils.NewFieldPos() - cols := make([]arrow.Array, len(schema.Fields())) - for i, field := range schema.Fields() { - data := ctx.loadArray(field.Type) + cols := make([]arrow.Array, schema.NumFields()) + for i := 0; i < schema.NumFields(); i++ { + data := ctx.loadArray(schema.Field(i).Type) defer data.Release() if err := dictutils.ResolveFieldDict(memo, data, pos.Child(int32(i)), mem); err != nil { @@ -430,13 +430,18 @@ func (src *ipcSource) fieldMetadata(i int) *flatbuf.FieldNode { return &node } +func (src *ipcSource) variadicCount(i int) int64 { + return src.meta.VariadicBufferCounts(i) +} + type arrayLoaderContext struct { - src ipcSource - ifield int - ibuffer int - max int - memo *dictutils.Memo - version MetadataVersion + src ipcSource + ifield int + ibuffer int + ivariadic int + max int + memo *dictutils.Memo + version MetadataVersion } func (ctx *arrayLoaderContext) field() *flatbuf.FieldNode { @@ -451,6 +456,12 @@ func (ctx *arrayLoaderContext) buffer() *memory.Buffer { return buf } +func (ctx *arrayLoaderContext) variadic() int64 { + v := ctx.src.variadicCount(ctx.ivariadic) + ctx.ivariadic++ + return v +} + func (ctx *arrayLoaderContext) loadArray(dt arrow.DataType) arrow.ArrayData { switch dt := dt.(type) { case *arrow.NullType: @@ -476,6 +487,9 @@ func (ctx *arrayLoaderContext) loadArray(dt arrow.DataType) arrow.ArrayData { case *arrow.BinaryType, *arrow.StringType, *arrow.LargeStringType, *arrow.LargeBinaryType: return ctx.loadBinary(dt) + case arrow.BinaryViewDataType: + return ctx.loadBinaryView(dt) + case *arrow.FixedSizeBinaryType: return ctx.loadFixedSizeBinary(dt) @@ -507,7 +521,7 @@ func (ctx *arrayLoaderContext) loadArray(dt arrow.DataType) arrow.ArrayData { case *arrow.RunEndEncodedType: field, buffers := ctx.loadCommon(dt.ID(), 1) - defer releaseBuffers(buffers) + defer memory.ReleaseBuffers(buffers) runEnds := ctx.loadChild(dt.RunEnds()) defer runEnds.Release() @@ -569,7 +583,7 @@ func (ctx *arrayLoaderContext) loadPrimitive(dt arrow.DataType) arrow.ArrayData buffers = append(buffers, ctx.buffer()) } - defer releaseBuffers(buffers) + defer memory.ReleaseBuffers(buffers) return array.NewData(dt, int(field.Length()), buffers, nil, int(field.NullCount()), 0) } @@ -577,7 +591,19 @@ func (ctx *arrayLoaderContext) loadPrimitive(dt arrow.DataType) arrow.ArrayData func (ctx *arrayLoaderContext) loadBinary(dt arrow.DataType) arrow.ArrayData { field, buffers := ctx.loadCommon(dt.ID(), 3) buffers = append(buffers, ctx.buffer(), ctx.buffer()) - defer releaseBuffers(buffers) + defer memory.ReleaseBuffers(buffers) + + return array.NewData(dt, int(field.Length()), buffers, nil, int(field.NullCount()), 0) +} + +func (ctx *arrayLoaderContext) loadBinaryView(dt arrow.DataType) arrow.ArrayData { + nVariadicBufs := ctx.variadic() + field, buffers := ctx.loadCommon(dt.ID(), 2+int(nVariadicBufs)) + buffers = append(buffers, ctx.buffer()) + for i := 0; i < int(nVariadicBufs); i++ { + buffers = append(buffers, ctx.buffer()) + } + defer memory.ReleaseBuffers(buffers) return array.NewData(dt, int(field.Length()), buffers, nil, int(field.NullCount()), 0) } @@ -585,7 +611,7 @@ func (ctx *arrayLoaderContext) loadBinary(dt arrow.DataType) arrow.ArrayData { func (ctx *arrayLoaderContext) loadFixedSizeBinary(dt *arrow.FixedSizeBinaryType) arrow.ArrayData { field, buffers := ctx.loadCommon(dt.ID(), 2) buffers = append(buffers, ctx.buffer()) - defer releaseBuffers(buffers) + defer memory.ReleaseBuffers(buffers) return array.NewData(dt, int(field.Length()), buffers, nil, int(field.NullCount()), 0) } @@ -593,7 +619,7 @@ func (ctx *arrayLoaderContext) loadFixedSizeBinary(dt *arrow.FixedSizeBinaryType func (ctx *arrayLoaderContext) loadMap(dt *arrow.MapType) arrow.ArrayData { field, buffers := ctx.loadCommon(dt.ID(), 2) buffers = append(buffers, ctx.buffer()) - defer releaseBuffers(buffers) + defer memory.ReleaseBuffers(buffers) sub := ctx.loadChild(dt.Elem()) defer sub.Release() @@ -604,7 +630,7 @@ func (ctx *arrayLoaderContext) loadMap(dt *arrow.MapType) arrow.ArrayData { func (ctx *arrayLoaderContext) loadList(dt arrow.ListLikeType) arrow.ArrayData { field, buffers := ctx.loadCommon(dt.ID(), 2) buffers = append(buffers, ctx.buffer()) - defer releaseBuffers(buffers) + defer memory.ReleaseBuffers(buffers) sub := ctx.loadChild(dt.Elem()) defer sub.Release() @@ -615,7 +641,7 @@ func (ctx *arrayLoaderContext) loadList(dt arrow.ListLikeType) arrow.ArrayData { func (ctx *arrayLoaderContext) loadListView(dt arrow.VarLenListLikeType) arrow.ArrayData { field, buffers := ctx.loadCommon(dt.ID(), 3) buffers = append(buffers, ctx.buffer(), ctx.buffer()) - defer releaseBuffers(buffers) + defer memory.ReleaseBuffers(buffers) sub := ctx.loadChild(dt.Elem()) defer sub.Release() @@ -625,7 +651,7 @@ func (ctx *arrayLoaderContext) loadListView(dt arrow.VarLenListLikeType) arrow.A func (ctx *arrayLoaderContext) loadFixedSizeList(dt *arrow.FixedSizeListType) arrow.ArrayData { field, buffers := ctx.loadCommon(dt.ID(), 1) - defer releaseBuffers(buffers) + defer memory.ReleaseBuffers(buffers) sub := ctx.loadChild(dt.Elem()) defer sub.Release() @@ -635,9 +661,9 @@ func (ctx *arrayLoaderContext) loadFixedSizeList(dt *arrow.FixedSizeListType) ar func (ctx *arrayLoaderContext) loadStruct(dt *arrow.StructType) arrow.ArrayData { field, buffers := ctx.loadCommon(dt.ID(), 1) - defer releaseBuffers(buffers) + defer memory.ReleaseBuffers(buffers) - subs := make([]arrow.ArrayData, len(dt.Fields())) + subs := make([]arrow.ArrayData, dt.NumFields()) for i, f := range dt.Fields() { subs[i] = ctx.loadChild(f.Type) } @@ -678,8 +704,8 @@ func (ctx *arrayLoaderContext) loadUnion(dt arrow.UnionType) arrow.ArrayData { } } - defer releaseBuffers(buffers) - subs := make([]arrow.ArrayData, len(dt.Fields())) + defer memory.ReleaseBuffers(buffers) + subs := make([]arrow.ArrayData, dt.NumFields()) for i, f := range dt.Fields() { subs[i] = ctx.loadChild(f.Type) } @@ -704,6 +730,7 @@ func readDictionary(memo *dictutils.Memo, meta *memory.Buffer, body ReadAtSeeker bodyCompress := data.Compression(nil) if bodyCompress != nil { codec = getDecompressor(bodyCompress.Codec()) + defer codec.Close() } id := md.Id() @@ -741,11 +768,3 @@ func readDictionary(memo *dictutils.Memo, meta *memory.Buffer, body ReadAtSeeker } return dictutils.KindReplacement, nil } - -func releaseBuffers(buffers []*memory.Buffer) { - for _, b := range buffers { - if b != nil { - b.Release() - } - } -} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/file_writer.go b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/file_writer.go index 12384225b..55e4d7c2d 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/file_writer.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/file_writer.go @@ -21,11 +21,11 @@ import ( "fmt" "io" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal/dictutils" - "github.com/apache/arrow/go/v14/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal/dictutils" + "github.com/apache/arrow/go/v15/arrow/internal/flatbuf" + "github.com/apache/arrow/go/v15/arrow/memory" ) // PayloadWriter is an interface for injecting a different payloadwriter diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/ipc.go b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/ipc.go index 6c04b6f5a..8cf56e833 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/ipc.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/ipc.go @@ -19,10 +19,10 @@ package ipc import ( "io" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/arrio" - "github.com/apache/arrow/go/v14/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/arrio" + "github.com/apache/arrow/go/v15/arrow/internal/flatbuf" + "github.com/apache/arrow/go/v15/arrow/memory" ) const ( diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/message.go b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/message.go index c5d0ec68d..5295c5df3 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/message.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/message.go @@ -22,20 +22,20 @@ import ( "io" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/internal/flatbuf" + "github.com/apache/arrow/go/v15/arrow/memory" ) // MetadataVersion represents the Arrow metadata version. type MetadataVersion flatbuf.MetadataVersion const ( - MetadataV1 = MetadataVersion(flatbuf.MetadataVersionV1) // version for Arrow-0.1.0 - MetadataV2 = MetadataVersion(flatbuf.MetadataVersionV2) // version for Arrow-0.2.0 - MetadataV3 = MetadataVersion(flatbuf.MetadataVersionV3) // version for Arrow-0.3.0 to 0.7.1 - MetadataV4 = MetadataVersion(flatbuf.MetadataVersionV4) // version for >= Arrow-0.8.0 - MetadataV5 = MetadataVersion(flatbuf.MetadataVersionV5) // version for >= Arrow-1.0.0, backward compatible with v4 + MetadataV1 = MetadataVersion(flatbuf.MetadataVersionV1) // version for Arrow Format-0.1.0 + MetadataV2 = MetadataVersion(flatbuf.MetadataVersionV2) // version for Arrow Format-0.2.0 + MetadataV3 = MetadataVersion(flatbuf.MetadataVersionV3) // version for Arrow Format-0.3.0 to 0.7.1 + MetadataV4 = MetadataVersion(flatbuf.MetadataVersionV4) // version for >= Arrow Format-0.8.0 + MetadataV5 = MetadataVersion(flatbuf.MetadataVersionV5) // version for >= Arrow Format-1.0.0, backward compatible with v4 ) func (m MetadataVersion) String() string { diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/metadata.go b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/metadata.go index 9bab47d6f..7a7f9b3e2 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/metadata.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/metadata.go @@ -23,11 +23,11 @@ import ( "io" "sort" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/endian" - "github.com/apache/arrow/go/v14/arrow/internal/dictutils" - "github.com/apache/arrow/go/v14/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/internal/dictutils" + "github.com/apache/arrow/go/v15/arrow/internal/flatbuf" + "github.com/apache/arrow/go/v15/arrow/memory" flatbuffers "github.com/google/flatbuffers/go" ) @@ -323,6 +323,16 @@ func (fv *fieldVisitor) visit(field arrow.Field) { flatbuf.LargeUtf8Start(fv.b) fv.offset = flatbuf.LargeUtf8End(fv.b) + case *arrow.BinaryViewType: + fv.dtype = flatbuf.TypeBinaryView + flatbuf.BinaryViewStart(fv.b) + fv.offset = flatbuf.BinaryViewEnd(fv.b) + + case *arrow.StringViewType: + fv.dtype = flatbuf.TypeUtf8View + flatbuf.Utf8ViewStart(fv.b) + fv.offset = flatbuf.Utf8ViewEnd(fv.b) + case *arrow.Date32Type: fv.dtype = flatbuf.TypeDate flatbuf.DateStart(fv.b) @@ -363,7 +373,7 @@ func (fv *fieldVisitor) visit(field arrow.Field) { case *arrow.StructType: fv.dtype = flatbuf.TypeStruct_ - offsets := make([]flatbuffers.UOffsetT, len(dt.Fields())) + offsets := make([]flatbuffers.UOffsetT, dt.NumFields()) for i, field := range dt.Fields() { offsets[i] = fieldToFB(fv.b, fv.pos.Child(int32(i)), field, fv.memo) } @@ -462,7 +472,7 @@ func (fv *fieldVisitor) visit(field arrow.Field) { case arrow.UnionType: fv.dtype = flatbuf.TypeUnion - offsets := make([]flatbuffers.UOffsetT, len(dt.Fields())) + offsets := make([]flatbuffers.UOffsetT, dt.NumFields()) for i, field := range dt.Fields() { offsets[i] = fieldToFB(fv.b, fv.pos.Child(int32(i)), field, fv.memo) } @@ -713,6 +723,12 @@ func concreteTypeFromFB(typ flatbuf.Type, data flatbuffers.Table, children []arr case flatbuf.TypeLargeUtf8: return arrow.BinaryTypes.LargeString, nil + case flatbuf.TypeUtf8View: + return arrow.BinaryTypes.StringView, nil + + case flatbuf.TypeBinaryView: + return arrow.BinaryTypes.BinaryView, nil + case flatbuf.TypeBool: return arrow.FixedWidthTypes.Boolean, nil @@ -1084,10 +1100,10 @@ func schemaFromFB(schema *flatbuf.Schema, memo *dictutils.Memo) (*arrow.Schema, } func schemaToFB(b *flatbuffers.Builder, schema *arrow.Schema, memo *dictutils.Mapper) flatbuffers.UOffsetT { - fields := make([]flatbuffers.UOffsetT, len(schema.Fields())) + fields := make([]flatbuffers.UOffsetT, schema.NumFields()) pos := dictutils.NewFieldPos() - for i, field := range schema.Fields() { - fields[i] = fieldToFB(b, pos.Child(int32(i)), field, memo) + for i := 0; i < schema.NumFields(); i++ { + fields[i] = fieldToFB(b, pos.Child(int32(i)), schema.Field(i), memo) } flatbuf.SchemaStartFieldsVector(b, len(fields)) @@ -1168,15 +1184,15 @@ func writeFileFooter(schema *arrow.Schema, dicts, recs []fileBlock, w io.Writer) return err } -func writeRecordMessage(mem memory.Allocator, size, bodyLength int64, fields []fieldMetadata, meta []bufferMetadata, codec flatbuf.CompressionType) *memory.Buffer { +func writeRecordMessage(mem memory.Allocator, size, bodyLength int64, fields []fieldMetadata, meta []bufferMetadata, codec flatbuf.CompressionType, variadicCounts []int64) *memory.Buffer { b := flatbuffers.NewBuilder(0) - recFB := recordToFB(b, size, bodyLength, fields, meta, codec) + recFB := recordToFB(b, size, bodyLength, fields, meta, codec, variadicCounts) return writeMessageFB(b, mem, flatbuf.MessageHeaderRecordBatch, recFB, bodyLength) } -func writeDictionaryMessage(mem memory.Allocator, id int64, isDelta bool, size, bodyLength int64, fields []fieldMetadata, meta []bufferMetadata, codec flatbuf.CompressionType) *memory.Buffer { +func writeDictionaryMessage(mem memory.Allocator, id int64, isDelta bool, size, bodyLength int64, fields []fieldMetadata, meta []bufferMetadata, codec flatbuf.CompressionType, variadicCounts []int64) *memory.Buffer { b := flatbuffers.NewBuilder(0) - recFB := recordToFB(b, size, bodyLength, fields, meta, codec) + recFB := recordToFB(b, size, bodyLength, fields, meta, codec, variadicCounts) flatbuf.DictionaryBatchStart(b) flatbuf.DictionaryBatchAddId(b, id) @@ -1186,7 +1202,7 @@ func writeDictionaryMessage(mem memory.Allocator, id int64, isDelta bool, size, return writeMessageFB(b, mem, flatbuf.MessageHeaderDictionaryBatch, dictFB, bodyLength) } -func recordToFB(b *flatbuffers.Builder, size, bodyLength int64, fields []fieldMetadata, meta []bufferMetadata, codec flatbuf.CompressionType) flatbuffers.UOffsetT { +func recordToFB(b *flatbuffers.Builder, size, bodyLength int64, fields []fieldMetadata, meta []bufferMetadata, codec flatbuf.CompressionType, variadicCounts []int64) flatbuffers.UOffsetT { fieldsFB := writeFieldNodes(b, fields, flatbuf.RecordBatchStartNodesVector) metaFB := writeBuffers(b, meta, flatbuf.RecordBatchStartBuffersVector) var bodyCompressFB flatbuffers.UOffsetT @@ -1194,10 +1210,24 @@ func recordToFB(b *flatbuffers.Builder, size, bodyLength int64, fields []fieldMe bodyCompressFB = writeBodyCompression(b, codec) } + var vcFB *flatbuffers.UOffsetT + if len(variadicCounts) > 0 { + flatbuf.RecordBatchStartVariadicBufferCountsVector(b, len(variadicCounts)) + for i := len(variadicCounts) - 1; i >= 0; i-- { + b.PrependInt64(variadicCounts[i]) + } + vcFBVal := b.EndVector(len(variadicCounts)) + vcFB = &vcFBVal + } + flatbuf.RecordBatchStart(b) flatbuf.RecordBatchAddLength(b, size) flatbuf.RecordBatchAddNodes(b, fieldsFB) flatbuf.RecordBatchAddBuffers(b, metaFB) + if vcFB != nil { + flatbuf.RecordBatchAddVariadicBufferCounts(b, *vcFB) + } + if codec != -1 { flatbuf.RecordBatchAddCompression(b, bodyCompressFB) } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/reader.go b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/reader.go index 1f684c1f6..826062faf 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/reader.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/reader.go @@ -23,13 +23,13 @@ import ( "io" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/array" - "github.com/apache/arrow/go/v14/arrow/endian" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/internal/dictutils" - "github.com/apache/arrow/go/v14/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/array" + "github.com/apache/arrow/go/v15/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/internal/dictutils" + "github.com/apache/arrow/go/v15/arrow/internal/flatbuf" + "github.com/apache/arrow/go/v15/arrow/memory" ) // Reader reads records from an io.Reader. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/writer.go b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/writer.go index a97f47ef4..31ce53a0f 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/ipc/writer.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/ipc/writer.go @@ -26,14 +26,15 @@ import ( "sync" "unsafe" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/array" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/arrow/internal" - "github.com/apache/arrow/go/v14/arrow/internal/debug" - "github.com/apache/arrow/go/v14/arrow/internal/dictutils" - "github.com/apache/arrow/go/v14/arrow/internal/flatbuf" - "github.com/apache/arrow/go/v14/arrow/memory" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/array" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/internal" + "github.com/apache/arrow/go/v15/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/internal/dictutils" + "github.com/apache/arrow/go/v15/arrow/internal/flatbuf" + "github.com/apache/arrow/go/v15/arrow/memory" + "github.com/apache/arrow/go/v15/internal/utils" ) type swriter struct { @@ -277,7 +278,7 @@ type dictEncoder struct { } func (d *dictEncoder) encodeMetadata(p *Payload, isDelta bool, id, nrows int64) error { - p.meta = writeDictionaryMessage(d.mem, id, isDelta, nrows, p.size, d.fields, d.meta, d.codec) + p.meta = writeDictionaryMessage(d.mem, id, isDelta, nrows, p.size, d.fields, d.meta, d.codec, d.variadicCounts) return nil } @@ -300,8 +301,9 @@ func (d *dictEncoder) Encode(p *Payload, id int64, isDelta bool, dict arrow.Arra type recordEncoder struct { mem memory.Allocator - fields []fieldMetadata - meta []bufferMetadata + fields []fieldMetadata + meta []bufferMetadata + variadicCounts []int64 depth int64 start int64 @@ -602,6 +604,33 @@ func (w *recordEncoder) visit(p *Payload, arr arrow.Array) error { p.body = append(p.body, voffsets) p.body = append(p.body, values) + case arrow.BinaryViewDataType: + data := arr.Data() + values := data.Buffers()[1] + arrLen := int64(arr.Len()) + typeWidth := int64(arrow.ViewHeaderSizeBytes) + minLength := paddedLength(arrLen*typeWidth, kArrowAlignment) + + switch { + case needTruncate(int64(data.Offset()), values, minLength): + // non-zero offset: slice the buffer + offset := data.Offset() * int(typeWidth) + // send padding if available + len := int(minI64(bitutil.CeilByte64(arrLen*typeWidth), int64(values.Len()-offset))) + values = memory.SliceBuffer(values, offset, len) + default: + if values != nil { + values.Retain() + } + } + p.body = append(p.body, values) + + w.variadicCounts = append(w.variadicCounts, int64(len(data.Buffers())-2)) + for _, b := range data.Buffers()[2:] { + b.Retain() + p.body = append(p.body, b) + } + case *arrow.StructType: w.depth-- arr := arr.(*array.Struct) @@ -718,42 +747,22 @@ func (w *recordEncoder) visit(p *Payload, arr arrow.Array) error { w.depth++ case *arrow.ListViewType, *arrow.LargeListViewType: - data := arr.Data() arr := arr.(array.VarLenListLike) - offsetTraits := arr.DataType().(arrow.OffsetsDataType).OffsetTypeTraits() - rngOff, rngLen := array.RangeOfValuesUsed(arr) - voffsets := w.getValueOffsetsAtBaseValue(arr, rngOff) - p.body = append(p.body, voffsets) - vsizes := data.Buffers()[2] - if vsizes != nil { - if data.Offset() != 0 || vsizes.Len() > offsetTraits.BytesRequired(arr.Len()) { - beg := offsetTraits.BytesRequired(data.Offset()) - end := beg + offsetTraits.BytesRequired(data.Len()) - vsizes = memory.NewBufferBytes(vsizes.Bytes()[beg:end]) - } else { - vsizes.Retain() - } - } + voffsets, minOffset, maxEnd := w.getZeroBasedListViewOffsets(arr) + vsizes := w.getListViewSizes(arr) + + p.body = append(p.body, voffsets) p.body = append(p.body, vsizes) w.depth-- var ( - values = arr.ListValues() - mustRelease = false - values_offset = int64(rngOff) - values_end = int64(rngOff + rngLen) + values = arr.ListValues() ) - defer func() { - if mustRelease { - values.Release() - } - }() - if arr.Len() > 0 && values_end < int64(values.Len()) { - // must also slice the values - values = array.NewSlice(values, values_offset, values_end) - mustRelease = true + if minOffset != 0 || maxEnd < int64(values.Len()) { + values = array.NewSlice(values, minOffset, maxEnd) + defer values.Release() } err := w.visit(p, values) @@ -854,61 +863,92 @@ func (w *recordEncoder) getZeroBasedValueOffsets(arr arrow.Array) *memory.Buffer return voffsets } -// Truncates the offsets if needed and shifts the values if minOffset > 0. -// The offsets returned are corrected assuming the child values are truncated -// and now start at minOffset. -// -// This function only works on offset buffers of ListViews and LargeListViews. -// TODO(felipecrv): Unify this with getZeroBasedValueOffsets. -func (w *recordEncoder) getValueOffsetsAtBaseValue(arr arrow.Array, minOffset int) *memory.Buffer { - data := arr.Data() - voffsets := data.Buffers()[1] - offsetTraits := arr.DataType().(arrow.OffsetsDataType).OffsetTypeTraits() - offsetBytesNeeded := offsetTraits.BytesRequired(data.Len()) +func getZeroBasedListViewOffsets[OffsetT int32 | int64](mem memory.Allocator, arr array.VarLenListLike) (valueOffsets *memory.Buffer, minOffset, maxEnd OffsetT) { + requiredBytes := int(unsafe.Sizeof(minOffset)) * arr.Len() + if arr.Data().Offset() == 0 { + // slice offsets to used extent, in case we have truncated slice + minOffset, maxEnd = 0, OffsetT(arr.ListValues().Len()) + valueOffsets = arr.Data().Buffers()[1] + if valueOffsets.Len() > requiredBytes { + valueOffsets = memory.SliceBuffer(valueOffsets, 0, requiredBytes) + } else { + valueOffsets.Retain() + } + return + } - if voffsets == nil || voffsets.Len() == 0 { - return nil + // non-zero offset, it's likely that the smallest offset is not zero + // we must a) create a new offsets array with shifted offsets and + // b) slice the values array accordingly + + valueOffsets = memory.NewResizableBuffer(mem) + valueOffsets.Resize(requiredBytes) + if arr.Len() > 0 { + // max value of int32/int64 based on type + minOffset = (^OffsetT(0)) << ((8 * unsafe.Sizeof(minOffset)) - 1) + for i := 0; i < arr.Len(); i++ { + start, end := arr.ValueOffsets(i) + minOffset = utils.Min(minOffset, OffsetT(start)) + maxEnd = utils.Max(maxEnd, OffsetT(end)) + } } - needsTruncate := data.Offset() != 0 || offsetBytesNeeded < voffsets.Len() - needsShift := minOffset > 0 + offsets := arrow.GetData[OffsetT](arr.Data().Buffers()[1].Bytes())[arr.Data().Offset():] + destOffset := arrow.GetData[OffsetT](valueOffsets.Bytes()) + for i := 0; i < arr.Len(); i++ { + destOffset[i] = offsets[i] - minOffset + } + return +} - if needsTruncate || needsShift { - shiftedOffsets := memory.NewResizableBuffer(w.mem) - shiftedOffsets.Resize(offsetBytesNeeded) +func getListViewSizes[OffsetT int32 | int64](arr array.VarLenListLike) *memory.Buffer { + var z OffsetT + requiredBytes := int(unsafe.Sizeof(z)) * arr.Len() + sizes := arr.Data().Buffers()[2] - switch arr.DataType().Layout().Buffers[1].ByteWidth { - case 8: - dest := arrow.Int64Traits.CastFromBytes(shiftedOffsets.Bytes()) - offsets := arrow.Int64Traits.CastFromBytes(voffsets.Bytes())[data.Offset() : data.Offset()+data.Len()] + if arr.Data().Offset() != 0 || sizes.Len() > requiredBytes { + // slice offsets to used extent, in case we have truncated slice + offsetBytes := arr.Data().Offset() * int(unsafe.Sizeof(z)) + sizes = memory.SliceBuffer(sizes, offsetBytes, requiredBytes) + } else { + sizes.Retain() + } + return sizes +} - if minOffset > 0 { - for i, o := range offsets { - dest[i] = o - int64(minOffset) - } - } else { - copy(dest, offsets) - } - default: - debug.Assert(arr.DataType().Layout().Buffers[1].ByteWidth == 4, "invalid offset bytewidth") - dest := arrow.Int32Traits.CastFromBytes(shiftedOffsets.Bytes()) - offsets := arrow.Int32Traits.CastFromBytes(voffsets.Bytes())[data.Offset() : data.Offset()+data.Len()] +func (w *recordEncoder) getZeroBasedListViewOffsets(arr array.VarLenListLike) (*memory.Buffer, int64, int64) { + if arr.Len() == 0 { + return nil, 0, 0 + } - if minOffset > 0 { - for i, o := range offsets { - dest[i] = o - int32(minOffset) - } - } else { - copy(dest, offsets) - } - } + var ( + outOffsets *memory.Buffer + minOff, maxEnd int64 + ) - voffsets = shiftedOffsets - } else { - voffsets.Retain() + switch v := arr.(type) { + case *array.ListView: + voffsets, outOff, outEnd := getZeroBasedListViewOffsets[int32](w.mem, v) + outOffsets = voffsets + minOff, maxEnd = int64(outOff), int64(outEnd) + case *array.LargeListView: + outOffsets, minOff, maxEnd = getZeroBasedListViewOffsets[int64](w.mem, v) } + return outOffsets, minOff, maxEnd +} - return voffsets +func (w *recordEncoder) getListViewSizes(arr array.VarLenListLike) *memory.Buffer { + if arr.Len() == 0 { + return nil + } + + switch v := arr.(type) { + case *array.ListView: + return getListViewSizes[int32](v) + case *array.LargeListView: + return getListViewSizes[int64](v) + } + return nil } func (w *recordEncoder) rebaseDenseUnionValueOffsets(arr *array.DenseUnion, offsets, lengths []int32) *memory.Buffer { @@ -946,7 +986,7 @@ func (w *recordEncoder) Encode(p *Payload, rec arrow.Record) error { } func (w *recordEncoder) encodeMetadata(p *Payload, nrows int64) error { - p.meta = writeRecordMessage(w.mem, nrows, p.size, w.fields, w.meta, w.codec) + p.meta = writeRecordMessage(w.mem, nrows, p.size, w.fields, w.meta, w.codec, w.variadicCounts) return nil } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/Makefile b/vendor/github.com/apache/arrow/go/v15/arrow/memory/Makefile index 1cc4079c4..1cc4079c4 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/Makefile +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/Makefile diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/allocator.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/allocator.go index 1427190ea..1427190ea 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/allocator.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/allocator.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/buffer.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/buffer.go index 2ddb3f829..ffdb41e3d 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/buffer.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/buffer.go @@ -19,7 +19,7 @@ package memory import ( "sync/atomic" - "github.com/apache/arrow/go/v14/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/internal/debug" ) // Buffer is a wrapper type for a buffer of bytes. @@ -33,6 +33,18 @@ type Buffer struct { parent *Buffer } +// NewBufferWithAllocator returns a buffer with the mutable flag set +// as false. The intention here is to allow wrapping a byte slice along +// with an allocator as a buffer to track the lifetime via refcounts +// in order to call Free when the refcount goes to zero. +// +// The primary example this is used for, is currently importing data +// through the c data interface and tracking the lifetime of the +// imported buffers. +func NewBufferWithAllocator(data []byte, mem Allocator) *Buffer { + return &Buffer{refCount: 1, buf: data, length: len(data), mem: mem} +} + // NewBufferBytes creates a fixed-size buffer from the specified data. func NewBufferBytes(data []byte) *Buffer { return &Buffer{refCount: 0, buf: data, length: len(data)} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/cgo_allocator.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/cgo_allocator.go index 85ee44521..af25d1899 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/cgo_allocator.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/cgo_allocator.go @@ -22,7 +22,7 @@ package memory import ( "runtime" - cga "github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc" + cga "github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc" ) // CgoArrowAllocator is an allocator which exposes the C++ memory pool class diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/cgo_allocator_defaults.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/cgo_allocator_defaults.go index 501431a0e..501431a0e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/cgo_allocator_defaults.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/cgo_allocator_defaults.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/cgo_allocator_logging.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/cgo_allocator_logging.go index 01ad6b394..01ad6b394 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/cgo_allocator_logging.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/cgo_allocator_logging.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/checked_allocator.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/checked_allocator.go index 78a09a57d..78a09a57d 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/checked_allocator.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/checked_allocator.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/default_allocator.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/default_allocator.go index f60caccdb..f60caccdb 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/default_allocator.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/default_allocator.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/default_mallocator.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/default_mallocator.go index 12ad08466..4a9ef942f 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/default_mallocator.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/default_mallocator.go @@ -19,7 +19,7 @@ package memory import ( - "github.com/apache/arrow/go/v14/arrow/memory/mallocator" + "github.com/apache/arrow/go/v15/arrow/memory/mallocator" ) // DefaultAllocator is a default implementation of Allocator and can be used anywhere diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/doc.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/doc.go index 20a28e4e2..20a28e4e2 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/doc.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/doc.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/go_allocator.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/go_allocator.go index 1017eb688..1017eb688 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/go_allocator.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/go_allocator.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/allocator.cc b/vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/allocator.cc index b2b037374..b2b037374 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/allocator.cc +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/allocator.cc diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/allocator.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/allocator.go index 48f34d862..48f34d862 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/allocator.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/allocator.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/allocator.h b/vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/allocator.h index 0c8744375..0c8744375 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/allocator.h +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/allocator.h diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/helpers.h b/vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/helpers.h index fa5feb6a9..fa5feb6a9 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/internal/cgoalloc/helpers.h +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/internal/cgoalloc/helpers.h diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/mallocator/doc.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/mallocator/doc.go index a399d85ee..a399d85ee 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/mallocator/doc.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/mallocator/doc.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/mallocator/mallocator.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/mallocator/mallocator.go index 18e0377c4..a111f009e 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/mallocator/mallocator.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/mallocator/mallocator.go @@ -37,7 +37,7 @@ import ( // Mallocator is an allocator which defers to libc malloc. // -// The priamry reason to use this is when exporting data across the C Data +// The primary reason to use this is when exporting data across the C Data // Interface. CGO requires that pointers to Go memory are not stored in C // memory, which is exactly what the C Data Interface would otherwise // require. By allocating with Mallocator up front, we can safely export the diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory.go index 43627f5ed..43627f5ed 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_amd64.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_amd64.go index 58356d648..58356d648 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_arm64.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_arm64.go index 3db5d1101..3db5d1101 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_arm64.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_avx2_amd64.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_avx2_amd64.go index 2bd851ea5..2bd851ea5 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_avx2_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_avx2_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_avx2_amd64.s b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_avx2_amd64.s index 2a77807cb..2a77807cb 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_avx2_amd64.s +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_avx2_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_js_wasm.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_js_wasm.go index 9b94d99ff..9b94d99ff 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_js_wasm.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_js_wasm.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_neon_arm64.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_neon_arm64.go index 6cb0400c9..6cb0400c9 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_neon_arm64.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_neon_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_neon_arm64.s b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_neon_arm64.s index 18655cc7a..18655cc7a 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_neon_arm64.s +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_neon_arm64.s diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_noasm.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_noasm.go index bf8846fa2..bf8846fa2 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_noasm.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_noasm.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_sse4_amd64.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_sse4_amd64.go index 716c0d270..716c0d270 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_sse4_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_sse4_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_sse4_amd64.s b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_sse4_amd64.s index b1906f99b..b1906f99b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/memory_sse4_amd64.s +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/memory_sse4_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/memory/util.go b/vendor/github.com/apache/arrow/go/v15/arrow/memory/util.go index 3b0d3a5cb..6cc7ec91b 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/memory/util.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/memory/util.go @@ -35,3 +35,11 @@ func isMultipleOfPowerOf2(v int, d int) bool { func addressOf(b []byte) uintptr { return uintptr(unsafe.Pointer(&b[0])) } + +func ReleaseBuffers(buffers []*Buffer) { + for _, b := range buffers { + if b != nil { + b.Release() + } + } +} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/numeric.schema.json b/vendor/github.com/apache/arrow/go/v15/arrow/numeric.schema.json index 7fa2800a5..7fa2800a5 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/numeric.schema.json +++ b/vendor/github.com/apache/arrow/go/v15/arrow/numeric.schema.json diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/numeric.tmpldata b/vendor/github.com/apache/arrow/go/v15/arrow/numeric.tmpldata index 3c2d63b7c..3c2d63b7c 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/numeric.tmpldata +++ b/vendor/github.com/apache/arrow/go/v15/arrow/numeric.tmpldata diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/record.go b/vendor/github.com/apache/arrow/go/v15/arrow/record.go index d98c7732e..885af3803 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/record.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/record.go @@ -16,7 +16,7 @@ package arrow -import "github.com/apache/arrow/go/v14/internal/json" +import "github.com/apache/arrow/go/v15/internal/json" // Record is a collection of equal-length arrays matching a particular Schema. // Also known as a RecordBatch in the spec and in some implementations. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/schema.go b/vendor/github.com/apache/arrow/go/v15/arrow/schema.go index a7fa43413..7a05bb188 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/schema.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/schema.go @@ -21,7 +21,7 @@ import ( "sort" "strings" - "github.com/apache/arrow/go/v14/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/endian" ) type Metadata struct { @@ -259,8 +259,8 @@ func (s *Schema) AddField(i int, field Field) (*Schema, error) { func (s *Schema) String() string { o := new(strings.Builder) - fmt.Fprintf(o, "schema:\n fields: %d\n", len(s.Fields())) - for i, f := range s.Fields() { + fmt.Fprintf(o, "schema:\n fields: %d\n", s.NumFields()) + for i, f := range s.fields { if i > 0 { o.WriteString("\n") } @@ -282,7 +282,7 @@ func (s *Schema) Fingerprint() string { var b strings.Builder b.WriteString("S{") - for _, f := range s.Fields() { + for _, f := range s.fields { fieldFingerprint := f.Fingerprint() if fieldFingerprint == "" { return "" diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/table.go b/vendor/github.com/apache/arrow/go/v15/arrow/table.go index 5a68085f8..82dc28370 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/table.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/table.go @@ -20,7 +20,7 @@ import ( "fmt" "sync/atomic" - "github.com/apache/arrow/go/v14/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/internal/debug" ) // Table represents a logical sequence of chunked arrays of equal length. It is diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/tools.go b/vendor/github.com/apache/arrow/go/v15/arrow/tools.go index 37b6dde36..37b6dde36 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/tools.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/tools.go diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/type_string.go b/vendor/github.com/apache/arrow/go/v15/arrow/type_string.go index ee3ccb7ef..ee3ccb7ef 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/type_string.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_string.go diff --git a/vendor/github.com/apache/arrow/go/v15/arrow/type_traits.go b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits.go new file mode 100644 index 000000000..67fa8a266 --- /dev/null +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits.go @@ -0,0 +1,162 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package arrow + +import ( + "reflect" + "unsafe" + + "github.com/apache/arrow/go/v15/arrow/decimal128" + "github.com/apache/arrow/go/v15/arrow/decimal256" + "github.com/apache/arrow/go/v15/arrow/float16" + "golang.org/x/exp/constraints" +) + +// IntType is a type constraint for raw values represented as signed +// integer types by We aren't just using constraints.Signed +// because we don't want to include the raw `int` type here whose size +// changes based on the architecture (int32 on 32-bit architectures and +// int64 on 64-bit architectures). +// +// This will also cover types like MonthInterval or the time types +// as their underlying types are int32 and int64 which will get covered +// by using the ~ +type IntType interface { + ~int8 | ~int16 | ~int32 | ~int64 +} + +// UintType is a type constraint for raw values represented as unsigned +// integer types by We aren't just using constraints.Unsigned +// because we don't want to include the raw `uint` type here whose size +// changes based on the architecture (uint32 on 32-bit architectures and +// uint64 on 64-bit architectures). We also don't want to include uintptr +type UintType interface { + ~uint8 | ~uint16 | ~uint32 | ~uint64 +} + +// FloatType is a type constraint for raw values for representing +// floating point values in This consists of constraints.Float and +// float16.Num +type FloatType interface { + float16.Num | constraints.Float +} + +// NumericType is a type constraint for just signed/unsigned integers +// and float32/float64. +type NumericType interface { + IntType | UintType | constraints.Float +} + +// FixedWidthType is a type constraint for raw values in Arrow that +// can be represented as FixedWidth byte slices. Specifically this is for +// using Go generics to easily re-type a byte slice to a properly-typed +// slice. Booleans are excluded here since they are represented by Arrow +// as a bitmap and thus the buffer can't be just reinterpreted as a []bool +type FixedWidthType interface { + IntType | UintType | + FloatType | decimal128.Num | decimal256.Num | + DayTimeInterval | MonthDayNanoInterval +} + +type TemporalType interface { + Date32 | Date64 | Time32 | Time64 | + Timestamp | Duration | DayTimeInterval | + MonthInterval | MonthDayNanoInterval +} + +func reinterpretSlice[Out, T any](b []T) []Out { + if cap(b) == 0 { + return nil + } + out := (*Out)(unsafe.Pointer(&b[:1][0])) + + lenBytes := len(b) * int(unsafe.Sizeof(b[0])) + capBytes := cap(b) * int(unsafe.Sizeof(b[0])) + + lenOut := lenBytes / int(unsafe.Sizeof(*out)) + capOut := capBytes / int(unsafe.Sizeof(*out)) + + return unsafe.Slice(out, capOut)[:lenOut] +} + +// GetValues reinterprets the data.Buffers()[i] to a slice of T with len=data.Len(). +// +// If the buffer is nil, nil will be returned. +// +// NOTE: the buffer's length must be a multiple of Sizeof(T). +func GetValues[T FixedWidthType](data ArrayData, i int) []T { + if data.Buffers()[i] == nil || data.Buffers()[i].Len() == 0 { + return nil + } + return reinterpretSlice[T](data.Buffers()[i].Bytes())[data.Offset() : data.Offset()+data.Len()] +} + +// GetOffsets reinterprets the data.Buffers()[i] to a slice of T with len=data.Len()+1. +// +// NOTE: the buffer's length must be a multiple of Sizeof(T). +func GetOffsets[T int32 | int64](data ArrayData, i int) []T { + return reinterpretSlice[T](data.Buffers()[i].Bytes())[data.Offset() : data.Offset()+data.Len()+1] +} + +// GetBytes reinterprets a slice of T to a slice of bytes. +func GetBytes[T FixedWidthType | ViewHeader](in []T) []byte { + return reinterpretSlice[byte](in) +} + +// GetData reinterprets a slice of bytes to a slice of T. +// +// NOTE: the buffer's length must be a multiple of Sizeof(T). +func GetData[T FixedWidthType | ViewHeader](in []byte) []T { + return reinterpretSlice[T](in) +} + +var typMap = map[reflect.Type]DataType{ + reflect.TypeOf(false): FixedWidthTypes.Boolean, + reflect.TypeOf(int8(0)): PrimitiveTypes.Int8, + reflect.TypeOf(int16(0)): PrimitiveTypes.Int16, + reflect.TypeOf(int32(0)): PrimitiveTypes.Int32, + reflect.TypeOf(int64(0)): PrimitiveTypes.Int64, + reflect.TypeOf(uint8(0)): PrimitiveTypes.Uint8, + reflect.TypeOf(uint16(0)): PrimitiveTypes.Uint16, + reflect.TypeOf(uint32(0)): PrimitiveTypes.Uint32, + reflect.TypeOf(uint64(0)): PrimitiveTypes.Uint64, + reflect.TypeOf(float32(0)): PrimitiveTypes.Float32, + reflect.TypeOf(float64(0)): PrimitiveTypes.Float64, + reflect.TypeOf(string("")): BinaryTypes.String, + reflect.TypeOf(Date32(0)): FixedWidthTypes.Date32, + reflect.TypeOf(Date64(0)): FixedWidthTypes.Date64, + reflect.TypeOf(true): FixedWidthTypes.Boolean, + reflect.TypeOf(float16.Num{}): FixedWidthTypes.Float16, + reflect.TypeOf([]byte{}): BinaryTypes.Binary, +} + +// GetDataType returns the appropriate DataType for the given type T +// only for non-parametric types. This uses a map and reflection internally +// so don't call this in a tight loop, instead call this once and then use +// a closure with the result. +func GetDataType[T NumericType | bool | string | []byte | float16.Num]() DataType { + var z T + return typMap[reflect.TypeOf(z)] +} + +// GetType returns the appropriate Type type T, only for non-parametric +// types. This uses a map and reflection internally so don't call this in +// a tight loop, instead call it once and then use a closure with the result. +func GetType[T NumericType | bool | string]() Type { + var z T + return typMap[reflect.TypeOf(z)].ID() +} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_boolean.go b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_boolean.go index 6a46bdec7..c164d4595 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_boolean.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_boolean.go @@ -17,7 +17,7 @@ package arrow import ( - "github.com/apache/arrow/go/v14/arrow/bitutil" + "github.com/apache/arrow/go/v15/arrow/bitutil" ) type booleanTraits struct{} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_decimal128.go b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_decimal128.go index d2d3aae37..d600ba29c 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_decimal128.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_decimal128.go @@ -17,11 +17,10 @@ package arrow import ( - "reflect" "unsafe" - "github.com/apache/arrow/go/v14/arrow/decimal128" - "github.com/apache/arrow/go/v14/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/decimal128" + "github.com/apache/arrow/go/v15/arrow/endian" ) // Decimal128 traits @@ -47,16 +46,12 @@ func (decimal128Traits) PutValue(b []byte, v decimal128.Num) { // // NOTE: len(b) must be a multiple of Uint16SizeBytes. func (decimal128Traits) CastFromBytes(b []byte) []decimal128.Num { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*decimal128.Num)(unsafe.Pointer(h.Data)), cap(b)/Decimal128SizeBytes)[:len(b)/Decimal128SizeBytes] + return GetData[decimal128.Num](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (decimal128Traits) CastToBytes(b []decimal128.Num) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Decimal128SizeBytes)[:len(b)*Decimal128SizeBytes] + return GetBytes(b) } // Copy copies src to dst. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_decimal256.go b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_decimal256.go index 256ed68ff..fded46a0a 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_decimal256.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_decimal256.go @@ -17,11 +17,10 @@ package arrow import ( - "reflect" "unsafe" - "github.com/apache/arrow/go/v14/arrow/decimal256" - "github.com/apache/arrow/go/v14/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/decimal256" + "github.com/apache/arrow/go/v15/arrow/endian" ) // Decimal256 traits @@ -44,15 +43,11 @@ func (decimal256Traits) PutValue(b []byte, v decimal256.Num) { // CastFromBytes reinterprets the slice b to a slice of decimal256 func (decimal256Traits) CastFromBytes(b []byte) []decimal256.Num { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*decimal256.Num)(unsafe.Pointer(h.Data)), cap(b)/Decimal256SizeBytes)[:len(b)/Decimal256SizeBytes] + return GetData[decimal256.Num](b) } func (decimal256Traits) CastToBytes(b []decimal256.Num) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Decimal256SizeBytes)[:len(b)*Decimal256SizeBytes] + return GetBytes(b) } func (decimal256Traits) Copy(dst, src []decimal256.Num) { copy(dst, src) } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_float16.go b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_float16.go index c40363d37..5369ad352 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_float16.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_float16.go @@ -17,11 +17,10 @@ package arrow import ( - "reflect" "unsafe" - "github.com/apache/arrow/go/v14/arrow/endian" - "github.com/apache/arrow/go/v14/arrow/float16" + "github.com/apache/arrow/go/v15/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/float16" ) // Float16 traits @@ -46,16 +45,12 @@ func (float16Traits) PutValue(b []byte, v float16.Num) { // // NOTE: len(b) must be a multiple of Uint16SizeBytes. func (float16Traits) CastFromBytes(b []byte) []float16.Num { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*float16.Num)(unsafe.Pointer(h.Data)), cap(b)/Float16SizeBytes)[:len(b)/Float16SizeBytes] + return GetData[float16.Num](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (float16Traits) CastToBytes(b []float16.Num) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Float16SizeBytes)[:len(b)*Float16SizeBytes] + return GetBytes(b) } // Copy copies src to dst. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_interval.go b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_interval.go index 35e605709..ca530a723 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_interval.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_interval.go @@ -17,11 +17,10 @@ package arrow import ( - "reflect" "unsafe" - "github.com/apache/arrow/go/v14/arrow/endian" - "github.com/apache/arrow/go/v14/arrow/internal/debug" + "github.com/apache/arrow/go/v15/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/internal/debug" ) var ( @@ -57,16 +56,12 @@ func (monthTraits) PutValue(b []byte, v MonthInterval) { // // NOTE: len(b) must be a multiple of MonthIntervalSizeBytes. func (monthTraits) CastFromBytes(b []byte) []MonthInterval { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*MonthInterval)(unsafe.Pointer(h.Data)), cap(b)/MonthIntervalSizeBytes)[:len(b)/MonthIntervalSizeBytes] + return GetData[MonthInterval](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (monthTraits) CastToBytes(b []MonthInterval) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*MonthIntervalSizeBytes)[:len(b)*MonthIntervalSizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -94,16 +89,12 @@ func (daytimeTraits) PutValue(b []byte, v DayTimeInterval) { // // NOTE: len(b) must be a multiple of DayTimeIntervalSizeBytes. func (daytimeTraits) CastFromBytes(b []byte) []DayTimeInterval { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*DayTimeInterval)(unsafe.Pointer(h.Data)), cap(b)/DayTimeIntervalSizeBytes)[:len(b)/DayTimeIntervalSizeBytes] + return GetData[DayTimeInterval](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (daytimeTraits) CastToBytes(b []DayTimeInterval) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*DayTimeIntervalSizeBytes)[:len(b)*DayTimeIntervalSizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -132,16 +123,12 @@ func (monthDayNanoTraits) PutValue(b []byte, v MonthDayNanoInterval) { // // NOTE: len(b) must be a multiple of MonthDayNanoIntervalSizeBytes. func (monthDayNanoTraits) CastFromBytes(b []byte) []MonthDayNanoInterval { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*MonthDayNanoInterval)(unsafe.Pointer(h.Data)), cap(b)/MonthDayNanoIntervalSizeBytes)[:len(b)/MonthDayNanoIntervalSizeBytes] + return GetData[MonthDayNanoInterval](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (monthDayNanoTraits) CastToBytes(b []MonthDayNanoInterval) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*MonthDayNanoIntervalSizeBytes)[:len(b)*MonthDayNanoIntervalSizeBytes] + return GetBytes(b) } // Copy copies src to dst. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_numeric.gen.go b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_numeric.gen.go index 6edd75291..064124660 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_numeric.gen.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_numeric.gen.go @@ -20,10 +20,9 @@ package arrow import ( "math" - "reflect" "unsafe" - "github.com/apache/arrow/go/v14/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/endian" ) var ( @@ -65,16 +64,12 @@ func (int64Traits) PutValue(b []byte, v int64) { // // NOTE: len(b) must be a multiple of Int64SizeBytes. func (int64Traits) CastFromBytes(b []byte) []int64 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*int64)(unsafe.Pointer(h.Data)), cap(b)/Int64SizeBytes)[:len(b)/Int64SizeBytes] + return GetData[int64](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (int64Traits) CastToBytes(b []int64) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Int64SizeBytes)[:len(b)*Int64SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -101,16 +96,12 @@ func (uint64Traits) PutValue(b []byte, v uint64) { // // NOTE: len(b) must be a multiple of Uint64SizeBytes. func (uint64Traits) CastFromBytes(b []byte) []uint64 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*uint64)(unsafe.Pointer(h.Data)), cap(b)/Uint64SizeBytes)[:len(b)/Uint64SizeBytes] + return GetData[uint64](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (uint64Traits) CastToBytes(b []uint64) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Uint64SizeBytes)[:len(b)*Uint64SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -137,16 +128,12 @@ func (float64Traits) PutValue(b []byte, v float64) { // // NOTE: len(b) must be a multiple of Float64SizeBytes. func (float64Traits) CastFromBytes(b []byte) []float64 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*float64)(unsafe.Pointer(h.Data)), cap(b)/Float64SizeBytes)[:len(b)/Float64SizeBytes] + return GetData[float64](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (float64Traits) CastToBytes(b []float64) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Float64SizeBytes)[:len(b)*Float64SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -173,16 +160,12 @@ func (int32Traits) PutValue(b []byte, v int32) { // // NOTE: len(b) must be a multiple of Int32SizeBytes. func (int32Traits) CastFromBytes(b []byte) []int32 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*int32)(unsafe.Pointer(h.Data)), cap(b)/Int32SizeBytes)[:len(b)/Int32SizeBytes] + return GetData[int32](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (int32Traits) CastToBytes(b []int32) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Int32SizeBytes)[:len(b)*Int32SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -209,16 +192,12 @@ func (uint32Traits) PutValue(b []byte, v uint32) { // // NOTE: len(b) must be a multiple of Uint32SizeBytes. func (uint32Traits) CastFromBytes(b []byte) []uint32 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*uint32)(unsafe.Pointer(h.Data)), cap(b)/Uint32SizeBytes)[:len(b)/Uint32SizeBytes] + return GetData[uint32](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (uint32Traits) CastToBytes(b []uint32) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Uint32SizeBytes)[:len(b)*Uint32SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -245,16 +224,12 @@ func (float32Traits) PutValue(b []byte, v float32) { // // NOTE: len(b) must be a multiple of Float32SizeBytes. func (float32Traits) CastFromBytes(b []byte) []float32 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*float32)(unsafe.Pointer(h.Data)), cap(b)/Float32SizeBytes)[:len(b)/Float32SizeBytes] + return GetData[float32](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (float32Traits) CastToBytes(b []float32) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Float32SizeBytes)[:len(b)*Float32SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -281,16 +256,12 @@ func (int16Traits) PutValue(b []byte, v int16) { // // NOTE: len(b) must be a multiple of Int16SizeBytes. func (int16Traits) CastFromBytes(b []byte) []int16 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*int16)(unsafe.Pointer(h.Data)), cap(b)/Int16SizeBytes)[:len(b)/Int16SizeBytes] + return GetData[int16](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (int16Traits) CastToBytes(b []int16) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Int16SizeBytes)[:len(b)*Int16SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -317,16 +288,12 @@ func (uint16Traits) PutValue(b []byte, v uint16) { // // NOTE: len(b) must be a multiple of Uint16SizeBytes. func (uint16Traits) CastFromBytes(b []byte) []uint16 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*uint16)(unsafe.Pointer(h.Data)), cap(b)/Uint16SizeBytes)[:len(b)/Uint16SizeBytes] + return GetData[uint16](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (uint16Traits) CastToBytes(b []uint16) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Uint16SizeBytes)[:len(b)*Uint16SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -353,16 +320,12 @@ func (int8Traits) PutValue(b []byte, v int8) { // // NOTE: len(b) must be a multiple of Int8SizeBytes. func (int8Traits) CastFromBytes(b []byte) []int8 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*int8)(unsafe.Pointer(h.Data)), cap(b)/Int8SizeBytes)[:len(b)/Int8SizeBytes] + return GetData[int8](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (int8Traits) CastToBytes(b []int8) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Int8SizeBytes)[:len(b)*Int8SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -389,16 +352,12 @@ func (uint8Traits) PutValue(b []byte, v uint8) { // // NOTE: len(b) must be a multiple of Uint8SizeBytes. func (uint8Traits) CastFromBytes(b []byte) []uint8 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*uint8)(unsafe.Pointer(h.Data)), cap(b)/Uint8SizeBytes)[:len(b)/Uint8SizeBytes] + return GetData[uint8](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (uint8Traits) CastToBytes(b []uint8) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Uint8SizeBytes)[:len(b)*Uint8SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -425,16 +384,12 @@ func (time32Traits) PutValue(b []byte, v Time32) { // // NOTE: len(b) must be a multiple of Time32SizeBytes. func (time32Traits) CastFromBytes(b []byte) []Time32 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*Time32)(unsafe.Pointer(h.Data)), cap(b)/Time32SizeBytes)[:len(b)/Time32SizeBytes] + return GetData[Time32](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (time32Traits) CastToBytes(b []Time32) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Time32SizeBytes)[:len(b)*Time32SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -461,16 +416,12 @@ func (time64Traits) PutValue(b []byte, v Time64) { // // NOTE: len(b) must be a multiple of Time64SizeBytes. func (time64Traits) CastFromBytes(b []byte) []Time64 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*Time64)(unsafe.Pointer(h.Data)), cap(b)/Time64SizeBytes)[:len(b)/Time64SizeBytes] + return GetData[Time64](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (time64Traits) CastToBytes(b []Time64) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Time64SizeBytes)[:len(b)*Time64SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -497,16 +448,12 @@ func (date32Traits) PutValue(b []byte, v Date32) { // // NOTE: len(b) must be a multiple of Date32SizeBytes. func (date32Traits) CastFromBytes(b []byte) []Date32 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*Date32)(unsafe.Pointer(h.Data)), cap(b)/Date32SizeBytes)[:len(b)/Date32SizeBytes] + return GetData[Date32](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (date32Traits) CastToBytes(b []Date32) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Date32SizeBytes)[:len(b)*Date32SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -533,16 +480,12 @@ func (date64Traits) PutValue(b []byte, v Date64) { // // NOTE: len(b) must be a multiple of Date64SizeBytes. func (date64Traits) CastFromBytes(b []byte) []Date64 { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*Date64)(unsafe.Pointer(h.Data)), cap(b)/Date64SizeBytes)[:len(b)/Date64SizeBytes] + return GetData[Date64](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (date64Traits) CastToBytes(b []Date64) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*Date64SizeBytes)[:len(b)*Date64SizeBytes] + return GetBytes(b) } // Copy copies src to dst. @@ -569,16 +512,12 @@ func (durationTraits) PutValue(b []byte, v Duration) { // // NOTE: len(b) must be a multiple of DurationSizeBytes. func (durationTraits) CastFromBytes(b []byte) []Duration { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*Duration)(unsafe.Pointer(h.Data)), cap(b)/DurationSizeBytes)[:len(b)/DurationSizeBytes] + return GetData[Duration](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (durationTraits) CastToBytes(b []Duration) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*DurationSizeBytes)[:len(b)*DurationSizeBytes] + return GetBytes(b) } // Copy copies src to dst. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_numeric.gen.go.tmpl b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_numeric.gen.go.tmpl index ffae975c1..e98f59528 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_numeric.gen.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_numeric.gen.go.tmpl @@ -18,10 +18,9 @@ package arrow import ( "math" - "reflect" "unsafe" - "github.com/apache/arrow/go/v14/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/endian" ) var ( @@ -66,16 +65,12 @@ func ({{.name}}Traits) PutValue(b []byte, v {{.Type}}) { // // NOTE: len(b) must be a multiple of {{.Name}}SizeBytes. func ({{.name}}Traits) CastFromBytes(b []byte) []{{.Type}} { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*{{.Type}})(unsafe.Pointer(h.Data)), cap(b)/{{.Name}}SizeBytes)[:len(b)/{{.Name}}SizeBytes] + return GetData[{{.Type}}](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func ({{.name}}Traits) CastToBytes(b []{{.Type}}) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*{{.Name}}SizeBytes)[:len(b)*{{.Name}}SizeBytes] + return GetBytes(b) } // Copy copies src to dst. diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_numeric.gen_test.go.tmpl b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_numeric.gen_test.go.tmpl index 96685f313..4948f42cf 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_numeric.gen_test.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_numeric.gen_test.go.tmpl @@ -20,7 +20,7 @@ import ( "reflect" "testing" - "github.com/apache/arrow/go/v14/arrow" + "github.com/apache/arrow/go/v15/arrow" ) {{- range .In}} diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_timestamp.go b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_timestamp.go index 7c393b355..8e9970a71 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/type_traits_timestamp.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_timestamp.go @@ -17,10 +17,9 @@ package arrow import ( - "reflect" "unsafe" - "github.com/apache/arrow/go/v14/arrow/endian" + "github.com/apache/arrow/go/v15/arrow/endian" ) var TimestampTraits timestampTraits @@ -43,16 +42,12 @@ func (timestampTraits) PutValue(b []byte, v Timestamp) { // // NOTE: len(b) must be a multiple of TimestampSizeBytes. func (timestampTraits) CastFromBytes(b []byte) []Timestamp { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*Timestamp)(unsafe.Pointer(h.Data)), cap(b)/TimestampSizeBytes)[:len(b)/TimestampSizeBytes] + return GetData[Timestamp](b) } // CastToBytes reinterprets the slice b to a slice of bytes. func (timestampTraits) CastToBytes(b []Timestamp) []byte { - h := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - - return unsafe.Slice((*byte)(unsafe.Pointer(h.Data)), cap(b)*TimestampSizeBytes)[:len(b)*TimestampSizeBytes] + return GetBytes(b) } // Copy copies src to dst. diff --git a/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_view.go b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_view.go new file mode 100644 index 000000000..be3f15fed --- /dev/null +++ b/vendor/github.com/apache/arrow/go/v15/arrow/type_traits_view.go @@ -0,0 +1,48 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package arrow + +import ( + "unsafe" + + "github.com/apache/arrow/go/v15/arrow/endian" +) + +var ViewHeaderTraits viewHeaderTraits + +const ( + ViewHeaderSizeBytes = int(unsafe.Sizeof(ViewHeader{})) +) + +type viewHeaderTraits struct{} + +func (viewHeaderTraits) BytesRequired(n int) int { return ViewHeaderSizeBytes * n } + +func (viewHeaderTraits) PutValue(b []byte, v ViewHeader) { + endian.Native.PutUint32(b, uint32(v.size)) + copy(b[4:], v.data[:]) +} + +func (viewHeaderTraits) CastFromBytes(b []byte) (res []ViewHeader) { + return GetData[ViewHeader](b) +} + +func (viewHeaderTraits) CastToBytes(b []ViewHeader) (res []byte) { + return GetBytes(b) +} + +func (viewHeaderTraits) Copy(dst, src []ViewHeader) { copy(dst, src) } diff --git a/vendor/github.com/apache/arrow/go/v14/arrow/unionmode_string.go b/vendor/github.com/apache/arrow/go/v15/arrow/unionmode_string.go index 394d4f664..394d4f664 100644 --- a/vendor/github.com/apache/arrow/go/v14/arrow/unionmode_string.go +++ b/vendor/github.com/apache/arrow/go/v15/arrow/unionmode_string.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/bitutils/bit_block_counter.go b/vendor/github.com/apache/arrow/go/v15/internal/bitutils/bit_block_counter.go index 86818bfd4..50996b10e 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/bitutils/bit_block_counter.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/bitutils/bit_block_counter.go @@ -21,8 +21,8 @@ import ( "math/bits" "unsafe" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/internal/utils" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/internal/utils" ) func loadWord(byt []byte) uint64 { @@ -165,7 +165,7 @@ func (b *BitBlockCounter) NextWord() BitBlockCount { } // OptionalBitBlockCounter is a useful counter to iterate through a possibly -// non-existent validity bitmap to allow us to write one code path for both +// nonexistent validity bitmap to allow us to write one code path for both // the with-nulls and no-nulls cases without giving up a lot of performance. type OptionalBitBlockCounter struct { hasBitmap bool diff --git a/vendor/github.com/apache/arrow/go/v14/internal/bitutils/bit_run_reader.go b/vendor/github.com/apache/arrow/go/v15/internal/bitutils/bit_run_reader.go index a1686a490..f09149d7e 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/bitutils/bit_run_reader.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/bitutils/bit_run_reader.go @@ -22,9 +22,9 @@ import ( "math/bits" "unsafe" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/internal/utils" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/internal/utils" ) // BitRun represents a run of bits with the same value of length Len diff --git a/vendor/github.com/apache/arrow/go/v14/internal/bitutils/bit_set_run_reader.go b/vendor/github.com/apache/arrow/go/v15/internal/bitutils/bit_set_run_reader.go index a2269ffec..374b8d4aa 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/bitutils/bit_set_run_reader.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/bitutils/bit_set_run_reader.go @@ -20,8 +20,8 @@ import ( "encoding/binary" "math/bits" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/internal/utils" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/internal/utils" ) // IsMultipleOf64 returns whether v is a multiple of 64. @@ -113,7 +113,7 @@ func (br *baseSetBitRunReader) Reset(bitmap []byte, startOffset, length int64) { bitOffset := int8(startOffset % 8) if length > 0 && bitOffset != 0 { - br.curNumBits = int32(utils.MinInt(int(length), int(8-bitOffset))) + br.curNumBits = int32(utils.Min(int(length), int(8-bitOffset))) br.curWord = br.loadPartial(bitOffset, int64(br.curNumBits)) } return @@ -124,7 +124,7 @@ func (br *baseSetBitRunReader) Reset(bitmap []byte, startOffset, length int64) { endBitOffset := int8((startOffset + length) % 8) if length > 0 && endBitOffset != 0 { br.pos++ - br.curNumBits = int32(utils.MinInt(int(length), int(endBitOffset))) + br.curNumBits = int32(utils.Min(int(length), int(endBitOffset))) br.curWord = br.loadPartial(8-endBitOffset, int64(br.curNumBits)) } } @@ -219,7 +219,7 @@ func (br *baseSetBitRunReader) skipNextZeros() { if br.remaining > 0 { br.curWord = br.loadPartial(0, br.remaining) br.curNumBits = int32(br.remaining) - nzeros := int32(utils.MinInt(int(br.curNumBits), int(br.countFirstZeros(br.curWord)))) + nzeros := int32(utils.Min(int(br.curNumBits), int(br.countFirstZeros(br.curWord)))) br.curWord = br.consumeBits(br.curWord, nzeros) br.curNumBits -= nzeros br.remaining -= int64(nzeros) diff --git a/vendor/github.com/apache/arrow/go/v14/internal/bitutils/bitmap_generate.go b/vendor/github.com/apache/arrow/go/v15/internal/bitutils/bitmap_generate.go index 78219d812..08b5fceab 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/bitutils/bitmap_generate.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/bitutils/bitmap_generate.go @@ -16,7 +16,7 @@ package bitutils -import "github.com/apache/arrow/go/v14/arrow/bitutil" +import "github.com/apache/arrow/go/v15/arrow/bitutil" // GenerateBits writes sequential bits to a bitmap. Bits preceding the // initial start offset are preserved, bits following the bitmap may diff --git a/vendor/github.com/apache/arrow/go/v14/internal/hashing/hash_funcs.go b/vendor/github.com/apache/arrow/go/v15/internal/hashing/hash_funcs.go index c1bdfeb6d..c1bdfeb6d 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/hashing/hash_funcs.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/hashing/hash_funcs.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/hashing/hash_string.go b/vendor/github.com/apache/arrow/go/v15/internal/hashing/hash_string.go index b772c7d7f..b772c7d7f 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/hashing/hash_string.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/hashing/hash_string.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/hashing/hash_string_go1.19.go b/vendor/github.com/apache/arrow/go/v15/internal/hashing/hash_string_go1.19.go index f38eb5c52..f38eb5c52 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/hashing/hash_string_go1.19.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/hashing/hash_string_go1.19.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/hashing/types.tmpldata b/vendor/github.com/apache/arrow/go/v15/internal/hashing/types.tmpldata index 0ba6f765d..0ba6f765d 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/hashing/types.tmpldata +++ b/vendor/github.com/apache/arrow/go/v15/internal/hashing/types.tmpldata diff --git a/vendor/github.com/apache/arrow/go/v14/internal/hashing/xxh3_memo_table.gen.go b/vendor/github.com/apache/arrow/go/v15/internal/hashing/xxh3_memo_table.gen.go index cc996552b..39b82cdef 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/hashing/xxh3_memo_table.gen.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/hashing/xxh3_memo_table.gen.go @@ -21,9 +21,9 @@ package hashing import ( "math" - "github.com/apache/arrow/go/v14/arrow" - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/internal/utils" + "github.com/apache/arrow/go/v15/arrow" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/internal/utils" ) type payloadInt8 struct { diff --git a/vendor/github.com/apache/arrow/go/v14/internal/hashing/xxh3_memo_table.gen.go.tmpl b/vendor/github.com/apache/arrow/go/v15/internal/hashing/xxh3_memo_table.gen.go.tmpl index 25164341d..527008ad6 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/hashing/xxh3_memo_table.gen.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/internal/hashing/xxh3_memo_table.gen.go.tmpl @@ -17,8 +17,8 @@ package hashing import ( - "github.com/apache/arrow/go/v14/arrow/bitutil" - "github.com/apache/arrow/go/v14/internal/utils" + "github.com/apache/arrow/go/v15/arrow/bitutil" + "github.com/apache/arrow/go/v15/internal/utils" ) {{range .In}} diff --git a/vendor/github.com/apache/arrow/go/v14/internal/hashing/xxh3_memo_table.go b/vendor/github.com/apache/arrow/go/v15/internal/hashing/xxh3_memo_table.go index 81994f0a8..283bc1a95 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/hashing/xxh3_memo_table.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/hashing/xxh3_memo_table.go @@ -57,7 +57,7 @@ type MemoTable interface { // and a boolean indicating whether or not the value was found in // the table (if false, the value was inserted). An error is returned // if val is not the appropriate type for the table. This function is intended to be used by - // the BinaryMemoTable to prevent uncessary allocations of the data when converting from a []byte to interface{}. + // the BinaryMemoTable to prevent unnecessary allocations of the data when converting from a []byte to interface{}. GetOrInsertBytes(val []byte) (idx int, existed bool, err error) // GetOrInsertNull returns the index of the null value in the table, // inserting one if it hasn't already been inserted. It returns a boolean @@ -67,7 +67,7 @@ type MemoTable interface { // insert one if it doesn't already exist. Will return -1 if it doesn't exist // indicated by a false value for the boolean. GetNull() (idx int, exists bool) - // WriteOut copys the unique values of the memotable out to the byte slice + // WriteOut copies the unique values of the memotable out to the byte slice // provided. Must have allocated enough bytes for all the values. WriteOut(out []byte) // WriteOutSubset is like WriteOut, but only writes a subset of values diff --git a/vendor/github.com/apache/arrow/go/v14/internal/json/json.go b/vendor/github.com/apache/arrow/go/v15/internal/json/json.go index 319b12c55..319b12c55 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/json/json.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/json/json.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/json/json_tinygo.go b/vendor/github.com/apache/arrow/go/v15/internal/json/json_tinygo.go index 8e4f447b3..8e4f447b3 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/json/json_tinygo.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/json/json_tinygo.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/Makefile b/vendor/github.com/apache/arrow/go/v15/internal/utils/Makefile index fded9d1d5..fded9d1d5 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/Makefile +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/Makefile diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/buf_reader.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/buf_reader.go index 0b2381da1..0b2381da1 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/buf_reader.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/buf_reader.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/endians_default.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/endians_default.go index 5fd257f52..5fd257f52 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/endians_default.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/endians_default.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/endians_s390x.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/endians_s390x.go index 7bb27cd81..7bb27cd81 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/endians_s390x.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/endians_s390x.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/math.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/math.go index 62cf96ce4..c8311750e 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/math.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/math.go @@ -16,32 +16,16 @@ package utils -// Min is a convenience Min function for int64 -func Min(a, b int64) int64 { - if a < b { - return a - } - return b -} +import "golang.org/x/exp/constraints" -// MinInt is a convenience Min function for int -func MinInt(a, b int) int { +func Min[T constraints.Ordered](a, b T) T { if a < b { return a } return b } -// Max is a convenience Max function for int64 -func Max(a, b int64) int64 { - if a > b { - return a - } - return b -} - -// MaxInt is a convenience Max function for int -func MaxInt(a, b int) int { +func Max[T constraints.Ordered](a, b T) T { if a > b { return a } diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max.go index 3d7b0024a..3d7b0024a 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_amd64.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_amd64.go index 5fccddbee..5fccddbee 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_arm64.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_arm64.go index 7404e95d9..7404e95d9 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_arm64.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_avx2_amd64.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_avx2_amd64.go index af6726243..af6726243 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_avx2_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_avx2_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_avx2_amd64.s b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_avx2_amd64.s index fe0c36e0e..fe0c36e0e 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_avx2_amd64.s +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_avx2_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_neon_arm64.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_neon_arm64.go index f9d3c44e3..f9d3c44e3 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_neon_arm64.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_neon_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_neon_arm64.s b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_neon_arm64.s index b679bb6e3..b679bb6e3 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_neon_arm64.s +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_neon_arm64.s diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_noasm.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_noasm.go index 19c24b590..19c24b590 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_noasm.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_noasm.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_ppc64le.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_ppc64le.go index ffd2db006..ffd2db006 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_ppc64le.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_ppc64le.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_s390x.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_s390x.go index ffd2db006..ffd2db006 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_s390x.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_s390x.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_sse4_amd64.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_sse4_amd64.go index 1e12a8d17..1e12a8d17 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_sse4_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_sse4_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_sse4_amd64.s b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_sse4_amd64.s index 8f1eccf60..8f1eccf60 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/min_max_sse4_amd64.s +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/min_max_sse4_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints.go index 1666df129..1666df129 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints.go.tmpl b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints.go.tmpl index 680ae1ee7..680ae1ee7 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints.tmpldata b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints.tmpldata index 72eaf300c..72eaf300c 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints.tmpldata +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints.tmpldata diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_amd64.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_amd64.go index d4433d368..d4433d368 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_amd64.go.tmpl b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_amd64.go.tmpl index eac0208e5..eac0208e5 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_amd64.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_amd64.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_arm64.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_arm64.go index cc957cdaa..cc957cdaa 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_arm64.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_arm64.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_avx2_amd64.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_avx2_amd64.go index f1421ddf5..f1421ddf5 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_avx2_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_avx2_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_avx2_amd64.s b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_avx2_amd64.s index fbcc101eb..fbcc101eb 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_avx2_amd64.s +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_avx2_amd64.s diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_def.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_def.go index cc3b0abb5..c52598d71 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_def.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_def.go @@ -19,7 +19,7 @@ package utils import ( "errors" - "github.com/apache/arrow/go/v14/arrow" + "github.com/apache/arrow/go/v15/arrow" ) //go:generate go run ../../arrow/_tools/tmpl -i -data=transpose_ints.tmpldata -d arch=avx2 transpose_ints_simd.go.tmpl=transpose_ints_avx2_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_noasm.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_noasm.go index 461aaf31f..461aaf31f 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_noasm.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_noasm.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_noasm.go.tmpl b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_noasm.go.tmpl index faffdce35..faffdce35 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_noasm.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_noasm.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_ppc64le.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_ppc64le.go index cc957cdaa..cc957cdaa 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_ppc64le.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_ppc64le.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_s390x.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_s390x.go index cc957cdaa..cc957cdaa 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_s390x.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_s390x.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_s390x.go.tmpl b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_s390x.go.tmpl index d93c8779c..d93c8779c 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_s390x.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_s390x.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_simd.go.tmpl b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_simd.go.tmpl index 034d0e9d2..034d0e9d2 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_simd.go.tmpl +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_simd.go.tmpl diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_sse4_amd64.go b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_sse4_amd64.go index 241ca74a7..241ca74a7 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_sse4_amd64.go +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_sse4_amd64.go diff --git a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_sse4_amd64.s b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_sse4_amd64.s index ee5199a5a..ee5199a5a 100644 --- a/vendor/github.com/apache/arrow/go/v14/internal/utils/transpose_ints_sse4_amd64.s +++ b/vendor/github.com/apache/arrow/go/v15/internal/utils/transpose_ints_sse4_amd64.s |
