jeremyosterhoudt commented on code in PR #36079:
URL: https://github.com/apache/arrow/pull/36079#discussion_r1266046705
##########
csharp/src/Apache.Arrow.Flight/Server/Internal/FlightServerImplementation.cs:
##########
@@ -35,16 +33,33 @@ public FlightServerImplementation(FlightServer flightServer)
_flightServer = flightServer;
}
- public override async Task DoPut(IAsyncStreamReader<FlightData>
requestStream, IServerStreamWriter<Protocol.PutResult> responseStream,
ServerCallContext context)
+ public override async Task
DoPut(IAsyncStreamReader<Protocol.FlightData> requestStream,
IServerStreamWriter<Protocol.PutResult> responseStream, ServerCallContext
context)
{
var readStream = new
FlightServerRecordBatchStreamReader(requestStream);
var writeStream = new StreamWriter<FlightPutResult,
Protocol.PutResult>(responseStream, putResult => putResult.ToProtocol());
- await _flightServer.DoPut(readStream, writeStream,
context).ConfigureAwait(false);
+
+ if (_flightServer.SqlProducer != null && await
FlightSqlProducer.GetCommand(readStream).ConfigureAwait(false) is { } command)
Review Comment:
I was trying to separate the `FlightServer` from the `FlightSqlServer` in
case there was a scenario where someone wanted `Flight SQL` only and not
`Flight RPC`. However, I agree creating a separate abstract class that
inherits from `FlightServer` maybe the better approach as I've not see a use
case where `RPC` is not supported and simplifies the libraries interactions.
--
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]