Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ jobs:
brew uninstall pkg-config || :
brew uninstall pkg-config@0.29.2 || :
brew bundle --file=cpp/Brewfile

# protobuf@33 is keg-only, so make it visible to CMake and pkg-config.
# Remove this workaround after the gRPC problem is fixed.
# See https://github.com/grpc/grpc/issues/41755
export PROTOBUF_PREFIX="$(brew --prefix protobuf@33)"
echo "PKG_CONFIG_PATH=${PROTOBUF_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}" >> "$GITHUB_ENV"
echo "CMAKE_PREFIX_PATH=${PROTOBUF_PREFIX}:${ARROW_HOME}:${CMAKE_PREFIX_PATH}" >> "$GITHUB_ENV"
echo "${PROTOBUF_PREFIX}/bin" >> "$GITHUB_PATH"

- name: Install MinIO
run: |
$(brew --prefix bash)/bin/bash \
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ jobs:
brew uninstall pkg-config@0.29.2 || :
brew bundle --file=cpp/Brewfile
# protobuf@33 is keg-only, so make it visible to CMake and pkg-config.
# Remove this workaround after the gRPC problem is fixed.
# See https://github.com/grpc/grpc/issues/41755
export PROTOBUF_PREFIX="$(brew --prefix protobuf@33)"
echo "PKG_CONFIG_PATH=${PROTOBUF_PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}" >> "$GITHUB_ENV"
echo "CMAKE_PREFIX_PATH=${PROTOBUF_PREFIX}:${ARROW_HOME}:${CMAKE_PREFIX_PATH}" >> "$GITHUB_ENV"
echo "${PROTOBUF_PREFIX}/bin" >> "$GITHUB_PATH"
python -m pip install \
-r python/requirements-build.txt \
-r python/requirements-test.txt
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ jobs:
brew update
brew bundle --file=cpp/Brewfile
brew bundle --file=c_glib/Brewfile

# For Meson.
# See also: https://github.com/mesonbuild/meson/issues/7701
echo "PKG_CONFIG=$(brew --prefix pkgconf)/bin/pkgconf" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion cpp/Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ brew "ninja"
brew "node"
brew "openssl"
brew "pkgconf"
brew "protobuf"
brew "protobuf@33"
brew "python"
brew "rapidjson"
brew "re2"
Expand Down
6 changes: 6 additions & 0 deletions cpp/src/arrow/flight/sql/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,13 @@ arrow::Result<std::string> CreateStatementQueryTicket(
ticket_statement_query.set_statement_handle(statement_handle);

google::protobuf::Any ticket;
#if PROTOBUF_VERSION >= 3015000
if (!ticket.PackFrom(ticket_statement_query)) {
return Status::IOError("Failed to pack ticket");
}
#else
ticket.PackFrom(ticket_statement_query);
#endif

std::string ticket_string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,10 @@ ::grpc::Status FlightDataDeserialize(ByteBuffer* buffer,
// Can't use ParseFromCodedStream as this reads the entire
// rest of the stream into the descriptor command field.
std::string buffer;
pb_stream.ReadString(&buffer, length);
if (!pb_stream.ReadString(&buffer, length)) {
return {::grpc::StatusCode::INTERNAL,
"Unable to read FlightDescriptor from protobuf"};
}
if (!pb_descriptor.ParseFromString(buffer)) {
return {::grpc::StatusCode::INTERNAL, "Unable to parse FlightDescriptor"};
}
Expand Down
Loading