jduo commented on code in PR #38404:
URL: https://github.com/apache/arrow/pull/38404#discussion_r1373398647


##########
java/flight/flight-sql-jdbc-core/src/test/java/org/apache/arrow/driver/jdbc/utils/MockFlightSqlProducer.java:
##########
@@ -349,8 +416,16 @@ public Runnable acceptPutPreparedStatementQuery(
       final CommandPreparedStatementQuery commandPreparedStatementQuery,
       final CallContext callContext, final FlightStream flightStream,
       final StreamListener<PutResult> streamListener) {
-    // TODO Implement this method.
-    throw CallStatus.UNIMPLEMENTED.toRuntimeException();
+    final ByteString handle = 
commandPreparedStatementQuery.getPreparedStatementHandle();
+    final String query = Preconditions.checkNotNull(
+        preparedStatements.get(handle),
+        format("No query registered under handle: <%s>.", handle));
+
+    if (validateParameters(query, flightStream, streamListener)) {
+      return () -> { };
+    }
+
+    return streamListener::onCompleted;

Review Comment:
   Yes, that's correct. When this RPC is received the server won't have all the 
parameter sets and shouldn't block the RPC handler thread waiting for and 
consuming them. It instead lets the implementer provide a callback that 
describes how to process each parameter set and does that work asynchronously.



-- 
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