Skip to content

GH-89: Add support for generating Flight related files - #114

Closed
kou wants to merge 1 commit into
apache:mainfrom
kou:generate-flight
Closed

kou wants to merge 1 commit into
apache:mainfrom
kou:generate-flight

Conversation

@kou

@kou kou commented Sep 10, 2024

Copy link
Copy Markdown
Member

Fix GH-89

Comment thread arrow/flight/gen.go
//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 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
//go:generate protoc --experimental_allow_proto3_optional -I${APACHE_ARROW_FORMAT_DIR} --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${APACHE_ARROW_FORMAT_DIR} --go_out=./gen/flight --go-grpc_out=./gen/flight --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative FlightSql.proto

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move these protoc ... command lines to dev/sync_flight.sh and remove this file?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the standard way of handling things like this would be to utilize go generate to run the commands rather than a separate sync script (ideally). So I'd personally prefer keeping this file and the go:generate lines.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that said, it might be better to utilize buf instead see the links below on the substrait-go repo for how I did it there to reference and generate the protobuf from the .proto files in the substrait-io/substrait repo

https://github.com/substrait-io/substrait-go/blob/main/doc.go#L9
https://github.com/substrait-io/substrait-go/blob/main/buf.gen.yaml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I withdraw this approach.

@kou

kou commented Sep 10, 2024

Copy link
Copy Markdown
Member Author

We should use buf.

@kou kou closed this Sep 10, 2024
@kou
kou deleted the generate-flight branch September 10, 2024 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Flight and FlightSql Proto Gen

2 participants