Skip to content

Commit

Permalink
ARROW-17456: [Go] Mark the compute module as a separate sub-module (a…
Browse files Browse the repository at this point in the history
…pache#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]>
  • Loading branch information
zeroshade authored and zagto committed Oct 7, 2022
1 parent 2970e70 commit 1653d55
Show file tree
Hide file tree
Showing 5 changed files with 351 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dev/release/post-11-bump-versions-test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,20 @@ def test_version_post_tag
],
]}
next
elsif path == "go/arrow/compute/go.mod"
expected_changes << {
path: path,
hunks: [
[
"-module github.com/apache/arrow/go/v#{@snapshot_major_version}/arrow/compute",
"+module github.com/apache/arrow/go/v#{@next_major_version}/arrow/compute",
"-replace github.com/apache/arrow/go/v#{@snapshot_major_version} => ../../",
"+replace github.com/apache/arrow/go/v#{@next_major_version} => ../../",
"-\tgithub.com/apache/arrow/go/v#{@snapshot_major_version} v#{@snapshot_major_version}.0.0-00010101000000-000000000000",
"+\tgithub.com/apache/arrow/go/v#{@next_major_version} v#{@next_major_version}.0.0-00010101000000-000000000000",
],
]}
next
end
import_path = "github.com/apache/arrow/go/v#{@snapshot_major_version}"
lines = File.readlines(path, chomp: true)
Expand Down
1 change: 1 addition & 0 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ go/arrow/internal/cpu/*
go/arrow/type_string.go
go/arrow/cdata/test/go.sum
go/arrow/unionmode_string.go
go/arrow/compute/go.sum
go/arrow/compute/datumkind_string.go
go/arrow/compute/valueshape_string.go
go/*.tmpldata
Expand Down
8 changes: 8 additions & 0 deletions dev/release/utils-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ update_versions() {
sed -i.bak -E -e \
"s/const PkgVersion = \".*/const PkgVersion = \"${version}\"/" \
arrow/doc.go
# handle the pseudo version in the compute sub-module for now
# subsequent changes will allow this to remove the pseudo version but
# for now we have to overcome the slight conflict between the existing
# "compute" package and the new go.mod file.
sed -i.bak -E -e \
"s|v[0-9]+\\.0\\.0-00010101000000-000000000000|v${major_version}.0.0-00010101000000-000000000000|" \
arrow/compute/go.mod

find . -name "*.bak" -exec rm {} \;
git add .
popd
Expand Down
48 changes: 48 additions & 0 deletions go/arrow/compute/go.mod
Original file line number Diff line number Diff line change
@@ -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.

module github.com/apache/arrow/go/v10/arrow/compute

go 1.18

replace github.com/apache/arrow/go/v10 => ../../

require (
github.com/apache/arrow/go/v10 v10.0.0-00010101000000-000000000000
github.com/stretchr/testify v1.8.0
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f
)

require (
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/apache/thrift v0.16.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/goccy/go-json v0.9.10 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/flatbuffers v2.0.6+incompatible // indirect
github.com/klauspost/asmfmt v1.3.2 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 // indirect
github.com/pierrec/lz4/v4 v4.1.15 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 // indirect
golang.org/x/tools v0.1.12 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 1653d55

Please sign in to comment.