Skip to content

Commit

Permalink
apacheGH-36893: [Go][Flight] Expose underlying protobuf definitions (a…
Browse files Browse the repository at this point in the history
…pache#36895)

### What changes are included in this PR?
Shifting generated protobuf code for flight/flightsql to have the path `arrow/flight/gen/flight` rather than `arrow/flight/internal/flight` so that they are exposed and exported.

* Closes: apache#36893

Authored-by: Matt Topol <[email protected]>
Signed-off-by: Matt Topol <[email protected]>
  • Loading branch information
zeroshade authored and R-JunmingChen committed Aug 20, 2023
1 parent 7b86735 commit 98df0f9
Show file tree
Hide file tree
Showing 14 changed files with 430 additions and 287 deletions.
3 changes: 1 addition & 2 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ docs/requirements.txt
go.work.sum
go/go.sum
go/arrow/Gopkg.lock
go/arrow/flight/internal/flight/Flight.pb.go
go/arrow/flight/internal/flight/Flight_grpc.pb.go
go/arrow/flight/gen/flight/*.pb.go
go/arrow/internal/cpu/*
go/arrow/type_string.go
go/arrow/cdata/test/go.sum
Expand Down
2 changes: 1 addition & 1 deletion format/Flight.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ syntax = "proto3";
import "google/protobuf/timestamp.proto";

option java_package = "org.apache.arrow.flight.impl";
option go_package = "github.com/apache/arrow/go/arrow/flight/internal/flight";
option go_package = "github.com/apache/arrow/go/arrow/flight/gen/flight";
option csharp_namespace = "Apache.Arrow.Flight.Protocol";

package arrow.flight.protocol;
Expand Down
2 changes: 1 addition & 1 deletion format/FlightSql.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ syntax = "proto3";
import "google/protobuf/descriptor.proto";

option java_package = "org.apache.arrow.flight.sql.impl";
option go_package = "github.com/apache/arrow/go/arrow/flight/internal/flight";
option go_package = "github.com/apache/arrow/go/arrow/flight/gen/flight";
package arrow.flight.protocol.sql;

/*
Expand Down
2 changes: 1 addition & 1 deletion go/arrow/flight/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strings"
"sync/atomic"

"github.com/apache/arrow/go/v13/arrow/flight/internal/flight"
"github.com/apache/arrow/go/v13/arrow/flight/gen/flight"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
Expand Down
2 changes: 1 addition & 1 deletion go/arrow/flight/flightsql/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/apache/arrow/go/v13/arrow"
"github.com/apache/arrow/go/v13/arrow/array"
"github.com/apache/arrow/go/v13/arrow/flight"
pb "github.com/apache/arrow/go/v13/arrow/flight/internal/flight"
pb "github.com/apache/arrow/go/v13/arrow/flight/gen/flight"
"github.com/apache/arrow/go/v13/arrow/ipc"
"github.com/apache/arrow/go/v13/arrow/memory"
"google.golang.org/grpc"
Expand Down
2 changes: 1 addition & 1 deletion go/arrow/flight/flightsql/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/apache/arrow/go/v13/arrow/array"
"github.com/apache/arrow/go/v13/arrow/flight"
"github.com/apache/arrow/go/v13/arrow/flight/flightsql"
pb "github.com/apache/arrow/go/v13/arrow/flight/internal/flight"
pb "github.com/apache/arrow/go/v13/arrow/flight/gen/flight"
"github.com/apache/arrow/go/v13/arrow/memory"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion go/arrow/flight/flightsql/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/apache/arrow/go/v13/arrow/array"
"github.com/apache/arrow/go/v13/arrow/flight"
"github.com/apache/arrow/go/v13/arrow/flight/flightsql/schema_ref"
pb "github.com/apache/arrow/go/v13/arrow/flight/internal/flight"
pb "github.com/apache/arrow/go/v13/arrow/flight/gen/flight"
"github.com/apache/arrow/go/v13/arrow/internal/debug"
"github.com/apache/arrow/go/v13/arrow/ipc"
"github.com/apache/arrow/go/v13/arrow/memory"
Expand Down
2 changes: 1 addition & 1 deletion go/arrow/flight/flightsql/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/apache/arrow/go/v13/arrow/array"
"github.com/apache/arrow/go/v13/arrow/flight"
"github.com/apache/arrow/go/v13/arrow/flight/flightsql"
pb "github.com/apache/arrow/go/v13/arrow/flight/internal/flight"
pb "github.com/apache/arrow/go/v13/arrow/flight/gen/flight"
"github.com/apache/arrow/go/v13/arrow/memory"
"github.com/stretchr/testify/suite"
"google.golang.org/grpc"
Expand Down
2 changes: 1 addition & 1 deletion go/arrow/flight/flightsql/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package flightsql

import (
pb "github.com/apache/arrow/go/v13/arrow/flight/internal/flight"
pb "github.com/apache/arrow/go/v13/arrow/flight/gen/flight"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
)
Expand Down
4 changes: 2 additions & 2 deletions go/arrow/flight/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@

package flight

//go:generate protoc -I../../../format --go_out=./internal/flight --go-grpc_out=./internal/flight --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative Flight.proto
//go:generate protoc --experimental_allow_proto3_optional -I../../../format --go_out=./internal/flight --go-grpc_out=./internal/flight --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative FlightSql.proto
//go:generate protoc -I../../../format --go_out=./gen/flight --go-grpc_out=./gen/flight --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative Flight.proto
//go:generate protoc --experimental_allow_proto3_optional -I../../../format --go_out=./gen/flight --go-grpc_out=./gen/flight --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative FlightSql.proto
Loading

0 comments on commit 98df0f9

Please sign in to comment.