Debian Codegraph @

debian/patches/arrow-array-interface-fix.patch

raw
1 From: Simon Josefsson <[email protected]>
2 Date: Tue, 11 Feb 2025 19:50:18 +0100
3 Subject: [PATCH] Fix Apache Arrow Array.Interface usage
4 Forwarded: not-needed
5
6 diff --git a/dense_compat.go b/dense_compat.go
7 index dcbefa2..686d1f9 100644
8 --- a/dense_compat.go
9 +++ b/dense_compat.go
10 @@ -439,7 +439,7 @@ func ToMat64(t *Dense, opts ...FuncOpt) (retVal *mat.Dense, err error) {
11 }
12
13 // FromArrowArray converts an "arrow/array".Interface into a Tensor of matching DataType.
14 -func FromArrowArray(a arrowArray.Interface) *Dense {
15 +func FromArrowArray(a arrow.Array) *Dense {
16 a.Retain()
17 defer a.Release()
18
19 diff --git a/dense_compat_test.go b/dense_compat_test.go
20 index c641203..ca4ddeb 100644
21 --- a/dense_compat_test.go
22 +++ b/dense_compat_test.go
23 @@ -184,7 +184,7 @@ func TestFromArrowArray(t *testing.T) {
24 pool := memory.NewGoAllocator()
25
26 for i, taat := range toArrowArrayTests {
27 - var m arrowArray.Interface
28 + var m arrow.Array
29
30 switch taat.dt {
31 case arrow.BinaryTypes.String:
32 @@ -438,8 +438,8 @@ func TestFromArrowTensor(t *testing.T) {
33 pool := memory.NewGoAllocator()
34
35 for i, taat := range toArrowTensorTests {
36 - var rowMajorArr arrowArray.Interface
37 - var colMajorArr arrowArray.Interface
38 + var rowMajorArr arrow.Array
39 + var colMajorArr arrow.Array
40 var rowMajor arrowTensor.Interface
41 var colMajor arrowTensor.Interface
42
43 diff --git a/genlib2/dense_compat_tests.go b/genlib2/dense_compat_tests.go
44 index d21831a..bcf88ef 100644
45 --- a/genlib2/dense_compat_tests.go
46 +++ b/genlib2/dense_compat_tests.go
47 @@ -115,7 +115,7 @@ func TestFromArrowArray(t *testing.T){
48 pool := memory.NewGoAllocator()
49
50 for i, taat := range toArrowArrayTests {
51 - var m arrowArray.Interface
52 + var m arrow.Array
53
54 switch taat.dt {
55 {{range .BinaryTypes -}}
56 @@ -207,8 +207,8 @@ func TestFromArrowTensor(t *testing.T){
57 pool := memory.NewGoAllocator()
58
59 for i, taat := range toArrowTensorTests {
60 - var rowMajorArr arrowArray.Interface
61 - var colMajorArr arrowArray.Interface
62 + var rowMajorArr arrow.Array
63 + var colMajorArr arrow.Array
64 var rowMajor arrowTensor.Interface
65 var colMajor arrowTensor.Interface
66