Copilot commented on code in PR #50407:
URL: https://github.com/apache/arrow/pull/50407#discussion_r4208484983


##########
cpp/src/arrow/flight/meson.build:
##########
@@ -88,8 +88,10 @@ arrow_flight_srcs = [
     'server_tracing_middleware.cc',
     'transport.cc',
     'transport_server.cc',
+    'transport_server_internal.cc',

Review Comment:
   The new public `transport_server.h` includes `transport_server_internal.h`, 
but Meson installs only the explicit header list at lines 18-43 and does not 
install this dependency. Consumers of a Meson-installed Flight package will 
therefore fail to include `transport_server.h`; add the internal header to the 
install list or keep it out of the public include graph.



##########
cpp/src/arrow/flight/transport/grpc/grpc_server_internal.cc:
##########
@@ -0,0 +1,76 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "arrow/flight/transport/grpc/grpc_server_internal.h"
+
+#include <sstream>
+
+#include <grpcpp/support/server_callback.h>

Review Comment:
   This unconditional include is not available in all gRPC versions still 
accepted by the build (the CMake toolchain sets `ARROW_GRPC_REQUIRED_VERSION` 
to 1.30.0). Guard the callback-only include/API by the supported gRPC version, 
or remove this unused include until the callback implementation is compiled 
only for versions that provide it.



##########
cpp/src/arrow/flight/transport_server.h:
##########
@@ -21,6 +21,7 @@
 #include <memory>
 
 #include "arrow/flight/transport.h"
+#include "arrow/flight/transport_server_internal.h"

Review Comment:
   `transport_server.h` is a public header installed by Meson, but 
`cpp/src/arrow/flight/meson.build:19-45` does not install 
`transport_server_internal.h`. Installed Meson consumers will therefore fail to 
resolve this include; the public header has no declaration that needs the 
internal definitions, and implementation files already include the internal 
header directly.



##########
cpp/src/arrow/flight/transport/grpc/util_internal.h:
##########
@@ -107,6 +97,10 @@ ARROW_FLIGHT_EXPORT
 ::grpc::Status ToGrpcStatus(const Status& arrow_status,
                             ::grpc::ServerContext* ctx = nullptr);
 
+ARROW_FLIGHT_EXPORT
+::grpc::Status ToGrpcStatus(const Status& arrow_status,
+                            ::grpc::CallbackServerContext* ctx);

Review Comment:
   This overload is declared for 
`GrpcServerCallContext<CallbackServerContext>::FinishRequest`, but 
`util_internal.cc` only defines the `ServerContext*` overload. Instantiating 
the new callback-based helper will therefore compile against an exported symbol 
that has no definition and fail at link time; add the callback-context 
implementation (including trailing metadata handling) before using this shared 
path for the async server.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to