Skip to content

Commit

Permalink
fix(import): fix import path to match v3 (#88)
Browse files Browse the repository at this point in the history
Since we've had major version releases, we need the import path to match
accordingly using the /v3 suffix as described
[here](https://go.dev/ref/mod#major-version-suffixes)
  • Loading branch information
zeroshade authored Dec 16, 2024
1 parent a3c9f73 commit 36dd6de
Show file tree
Hide file tree
Showing 77 changed files with 219 additions and 239 deletions.
2 changes: 1 addition & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ version: v1
plugins:
- name: go
out: proto
opt: module=github.com/substrait-io/substrait-go/proto
opt: module=github.com/substrait-io/substrait-go/v3/proto
6 changes: 3 additions & 3 deletions expr/binding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"

"github.com/stretchr/testify/assert"
. "github.com/substrait-io/substrait-go/expr"
"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/types"
. "github.com/substrait-io/substrait-go/v3/expr"
"github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/types"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions expr/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
package expr

import (
"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/types"
)

// Builder is a basic interface for any type which can construct
Expand Down
6 changes: 3 additions & 3 deletions expr/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/substrait-io/substrait-go/expr"
"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/expr"
"github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/types"
)

func TestExprBuilder(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions expr/expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"strings"

substraitgo "github.com/substrait-io/substrait-go"
"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
substraitgo "github.com/substrait-io/substrait-go/v3"
"github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
"golang.org/x/exp/slices"
)

Expand Down
10 changes: 5 additions & 5 deletions expr/expressions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/substrait-io/substrait-go/expr"
ext "github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/types/parser"
"github.com/substrait-io/substrait-go/v3/expr"
ext "github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
"github.com/substrait-io/substrait-go/v3/types/parser"
"google.golang.org/protobuf/encoding/protojson"
pb "google.golang.org/protobuf/proto"
"gopkg.in/yaml.v3"
Expand Down
6 changes: 3 additions & 3 deletions expr/field_reference.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"
"strings"

substraitgo "github.com/substrait-io/substrait-go"
"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
substraitgo "github.com/substrait-io/substrait-go/v3"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
"golang.org/x/exp/slices"
)

Expand Down
8 changes: 4 additions & 4 deletions expr/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"strings"

substraitgo "github.com/substrait-io/substrait-go"
"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
substraitgo "github.com/substrait-io/substrait-go/v3"
"github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
"golang.org/x/exp/slices"
pb "google.golang.org/protobuf/proto"
)
Expand Down
4 changes: 2 additions & 2 deletions expr/interval_compound_literal.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"fmt"

"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
)

// IntervalCompoundLiteral creates an interval compound literal
Expand Down
4 changes: 2 additions & 2 deletions expr/interval_compound_literal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
"google.golang.org/protobuf/testing/protocmp"
)

Expand Down
4 changes: 2 additions & 2 deletions expr/interval_year_to_month.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package expr
import (
"fmt"

"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
)

// IntervalYearToMonthLiteral implements Literal interface for interval year to month type
Expand Down
4 changes: 2 additions & 2 deletions expr/interval_year_to_month_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
"google.golang.org/protobuf/testing/protocmp"
)

Expand Down
6 changes: 3 additions & 3 deletions expr/literals.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"fmt"
"reflect"

substraitgo "github.com/substrait-io/substrait-go"
"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
substraitgo "github.com/substrait-io/substrait-go/v3"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
"golang.org/x/exp/slices"
"google.golang.org/protobuf/types/known/anypb"
)
Expand Down
4 changes: 2 additions & 2 deletions expr/proto_literals_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
"google.golang.org/protobuf/testing/protocmp"
)

Expand Down
4 changes: 2 additions & 2 deletions expr/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/substrait-io/substrait-go/expr"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/expr"
"github.com/substrait-io/substrait-go/v3/types"
)

func MustLiteral(l expr.Literal, err error) expr.Literal {
Expand Down
2 changes: 1 addition & 1 deletion expr/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

package expr

import "github.com/substrait-io/substrait-go/extensions"
import "github.com/substrait-io/substrait-go/v3/extensions"

type ExtensionRegistry struct {
extensions.Set
Expand Down
4 changes: 2 additions & 2 deletions extensions/extension_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/creasty/defaults"
"github.com/goccy/go-yaml"
substrait "github.com/substrait-io/substrait"
substraitgo "github.com/substrait-io/substrait-go"
"github.com/substrait-io/substrait-go/proto/extensions"
substraitgo "github.com/substrait-io/substrait-go/v3"
"github.com/substrait-io/substrait-go/v3/proto/extensions"
)

type AdvancedExtension = extensions.AdvancedExtension
Expand Down
4 changes: 2 additions & 2 deletions extensions/extension_mgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/types"
)

const sampleYAML = `---
Expand Down
6 changes: 3 additions & 3 deletions extensions/simple_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"reflect"
"strings"

substraitgo "github.com/substrait-io/substrait-go"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/types/parser"
substraitgo "github.com/substrait-io/substrait-go/v3"
"github.com/substrait-io/substrait-go/v3/types"
"github.com/substrait-io/substrait-go/v3/types/parser"
)

type ParamType string
Expand Down
6 changes: 3 additions & 3 deletions extensions/simple_extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/goccy/go-yaml"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/proto"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/proto"
"github.com/substrait-io/substrait-go/v3/types"
)

func TestUnmarshalSimpleExtension(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions extensions/variants.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"fmt"
"strings"

substraitgo "github.com/substrait-io/substrait-go"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/types/integer_parameters"
"github.com/substrait-io/substrait-go/types/parser"
substraitgo "github.com/substrait-io/substrait-go/v3"
"github.com/substrait-io/substrait-go/v3/types"
"github.com/substrait-io/substrait-go/v3/types/integer_parameters"
"github.com/substrait-io/substrait-go/v3/types/parser"
)

type FunctionVariant interface {
Expand Down
8 changes: 4 additions & 4 deletions extensions/variants_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/types/integer_parameters"
"github.com/substrait-io/substrait-go/types/parser"
"github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/types"
"github.com/substrait-io/substrait-go/v3/types/integer_parameters"
"github.com/substrait-io/substrait-go/v3/types/parser"
)

func TestEvaluateTypeExpression(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions functions/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/creasty/defaults"
"github.com/goccy/go-yaml"
substraitgo "github.com/substrait-io/substrait-go"
"github.com/substrait-io/substrait-go/extensions"
substraitgo "github.com/substrait-io/substrait-go/v3"
"github.com/substrait-io/substrait-go/v3/extensions"
)

func LoadDialect(name string, r io.Reader) (Dialect, error) {
Expand Down
4 changes: 2 additions & 2 deletions functions/dialect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/types"
)

var gFunctionRegistry FunctionRegistry
Expand Down
2 changes: 1 addition & 1 deletion functions/functions.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package functions

import (
"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/v3/extensions"
)

type functionRegistryImpl struct {
Expand Down
2 changes: 1 addition & 1 deletion functions/local_functions.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package functions

import "github.com/substrait-io/substrait-go/extensions"
import "github.com/substrait-io/substrait-go/v3/extensions"

type localFunctionRegistryImpl struct {
dialect Dialect
Expand Down
4 changes: 2 additions & 2 deletions functions/registries.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package functions
import (
"strings"

"github.com/substrait-io/substrait-go/extensions"
"github.com/substrait-io/substrait-go/types"
"github.com/substrait-io/substrait-go/v3/extensions"
"github.com/substrait-io/substrait-go/v3/types"
)

type TypeRegistry interface {
Expand Down
4 changes: 2 additions & 2 deletions functions/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strconv"
"strings"

substraitgo "github.com/substrait-io/substrait-go"
"github.com/substrait-io/substrait-go/types"
substraitgo "github.com/substrait-io/substrait-go/v3"
"github.com/substrait-io/substrait-go/v3/types"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions functions/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"testing"

"github.com/stretchr/testify/assert"
substraitgo "github.com/substrait-io/substrait-go"
"github.com/substrait-io/substrait-go/types"
substraitgo "github.com/substrait-io/substrait-go/v3"
"github.com/substrait-io/substrait-go/v3/types"
)

func TestTypeRegistry(t *testing.T) {
Expand Down
23 changes: 12 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

module github.com/substrait-io/substrait-go
module github.com/substrait-io/substrait-go/v3

go 1.22.0

Expand All @@ -10,28 +10,29 @@ require (
github.com/antlr4-go/antlr/v4 v4.13.1
github.com/cockroachdb/apd/v3 v3.2.1
github.com/creasty/defaults v1.8.0
github.com/goccy/go-yaml v1.9.8
github.com/goccy/go-yaml v1.11.0
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/stretchr/testify v1.9.0
github.com/stretchr/testify v1.10.0
github.com/substrait-io/substrait v0.62.0
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
google.golang.org/protobuf v1.33.0
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
google.golang.org/protobuf v1.35.2
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/go-playground/validator/v10 v10.11.1 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
golang.org/x/crypto v0.30.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
)
Loading

0 comments on commit 36dd6de

Please sign in to comment.