Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++][FlightSQL] Accept Protobuf 3.12.0 or later #35961

Closed
kou opened this issue Jun 7, 2023 · 0 comments · Fixed by #35962
Closed

[C++][FlightSQL] Accept Protobuf 3.12.0 or later #35961

kou opened this issue Jun 7, 2023 · 0 comments · Fixed by #35962

Comments

@kou
Copy link
Member

kou commented Jun 7, 2023

Describe the enhancement requested

FlightSql.proto uses optional.

optional is added in Protobuf 3.12.0 as an experimental feature:

https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.0

[experimental] Singular, non-message typed fields in proto3 now support presence tracking. This is enabled by adding the "optional" field label and passing the --experimental_allow_proto3_optional flag to protoc.

optional was marked as a official feature in Protobuf 3.15.0:

https://github.com/protocolbuffers/protobuf/releases/tag/v3.15.0

Optional fields for proto3 are enabled by default, and no longer require the --experimental_allow_proto3_optional flag.

We require Protobuf 3.15.0 or later for Flight SQL but Ubuntu 22.04 LTS ships Protobuf 3.12.4: https://packages.ubuntu.com/search?keywords=protobuf-compiler

If we accept Protobuf 3.12.0 or later by usung --experimental_allow_proto3_optional flag, we can use system Protobuf on Ubuntu 22.04. It reduces CI time and deb package build time.

Component(s)

C++, FlightRPC

kou added a commit to kou/arrow that referenced this issue Jun 7, 2023
We can use `optional` with Protobuf 3.12.0 by specifying
`--experimental_allow_proto3_optional` explicitly.

If we accept Protobuf 3.12.0 or later for Flight SQL, we can use
system Protobuf on Ubuntu 22.04. Because Ubuntu 22.04 ships Protobuf
3.12.4.
kou added a commit to kou/arrow that referenced this issue Jun 7, 2023
We can use `optional` with Protobuf 3.12.0 by specifying
`--experimental_allow_proto3_optional` explicitly.

If we accept Protobuf 3.12.0 or later for Flight SQL, we can use
system Protobuf on Ubuntu 22.04. Because Ubuntu 22.04 ships Protobuf
3.12.4.
@kou kou closed this as completed in #35962 Jun 8, 2023
@kou kou added this to the 13.0.0 milestone Jun 8, 2023
kou added a commit that referenced this issue Jun 8, 2023
### Rationale for this change

We can use `optional` with Protobuf 3.12.0 by specifying `--experimental_allow_proto3_optional` explicitly.

If we accept Protobuf 3.12.0 or later for Flight SQL, we can use system Protobuf on Ubuntu 22.04. Because Ubuntu 22.04 ships Protobuf 3.12.4.

### What changes are included in this PR?

Specify  `--experimental_allow_proto3_optional` explicitly when Protobuf is < 3.15.0. 

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* Closes: #35961

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant