Skip to content

Commit 3615d7f

Browse files
authored
ARROW-17456: [Go] Mark the compute module as a separate sub-module (#13910)
I noticed looking at pkg.go.dev that there really isn't anyone who is using the existing `compute` module, which makes sense since it isn't really finished and only provides limited utility currently. This change will mark the `compute` module as a separate sub-module inside of the `arrow` module, allowing us to use `go1.18` in this new code without forcing anyone who *isn't* using the compute module to upgrade. That way I can leverage the generics when writing the new compute code where appropriate. Authored-by: Matt Topol <[email protected]> Signed-off-by: Matt Topol <[email protected]>
1 parent b3a29f5 commit 3615d7f

5 files changed

Lines changed: 351 additions & 0 deletions

File tree

‎dev/release/post-11-bump-versions-test.rb‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,20 @@ def test_version_post_tag
195195
],
196196
]}
197197
next
198+
elsif path == "go/arrow/compute/go.mod"
199+
expected_changes << {
200+
path: path,
201+
hunks: [
202+
[
203+
"-module github.com/apache/arrow/go/v#{@snapshot_major_version}/arrow/compute",
204+
"+module github.com/apache/arrow/go/v#{@next_major_version}/arrow/compute",
205+
"-replace github.com/apache/arrow/go/v#{@snapshot_major_version} => ../../",
206+
"+replace github.com/apache/arrow/go/v#{@next_major_version} => ../../",
207+
"-\tgithub.com/apache/arrow/go/v#{@snapshot_major_version} v#{@snapshot_major_version}.0.0-00010101000000-000000000000",
208+
"+\tgithub.com/apache/arrow/go/v#{@next_major_version} v#{@next_major_version}.0.0-00010101000000-000000000000",
209+
],
210+
]}
211+
next
198212
end
199213
import_path = "github.com/apache/arrow/go/v#{@snapshot_major_version}"
200214
lines = File.readlines(path, chomp: true)

‎dev/release/rat_exclude_files.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ go/arrow/internal/cpu/*
141141
go/arrow/type_string.go
142142
go/arrow/cdata/test/go.sum
143143
go/arrow/unionmode_string.go
144+
go/arrow/compute/go.sum
144145
go/arrow/compute/datumkind_string.go
145146
go/arrow/compute/valueshape_string.go
146147
go/*.tmpldata

‎dev/release/utils-prepare.sh‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@ update_versions() {
159159
sed -i.bak -E -e \
160160
"s/const PkgVersion = \".*/const PkgVersion = \"${version}\"/" \
161161
arrow/doc.go
162+
# handle the pseudo version in the compute sub-module for now
163+
# subsequent changes will allow this to remove the pseudo version but
164+
# for now we have to overcome the slight conflict between the existing
165+
# "compute" package and the new go.mod file.
166+
sed -i.bak -E -e \
167+
"s|v[0-9]+\\.0\\.0-00010101000000-000000000000|v${major_version}.0.0-00010101000000-000000000000|" \
168+
arrow/compute/go.mod
169+
162170
find . -name "*.bak" -exec rm {} \;
163171
git add .
164172
popd

‎go/arrow/compute/go.mod‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
17+
module github.com/apache/arrow/go/v10/arrow/compute
18+
19+
go 1.18
20+
21+
replace github.com/apache/arrow/go/v10 => ../../
22+
23+
require (
24+
github.com/apache/arrow/go/v10 v10.0.0-00010101000000-000000000000
25+
github.com/stretchr/testify v1.8.0
26+
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f
27+
)
28+
29+
require (
30+
github.com/andybalholm/brotli v1.0.4 // indirect
31+
github.com/apache/thrift v0.16.0 // indirect
32+
github.com/davecgh/go-spew v1.1.1 // indirect
33+
github.com/goccy/go-json v0.9.10 // indirect
34+
github.com/golang/snappy v0.0.4 // indirect
35+
github.com/google/flatbuffers v2.0.6+incompatible // indirect
36+
github.com/klauspost/asmfmt v1.3.2 // indirect
37+
github.com/klauspost/compress v1.15.9 // indirect
38+
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
39+
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect
40+
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect
41+
github.com/pierrec/lz4/v4 v4.1.15 // indirect
42+
github.com/pmezard/go-difflib v1.0.0 // indirect
43+
github.com/zeebo/xxh3 v1.0.2 // indirect
44+
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
45+
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 // indirect
46+
golang.org/x/tools v0.1.12 // indirect
47+
gopkg.in/yaml.v3 v3.0.1 // indirect
48+
)

0 commit comments

Comments
 (0)