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


##########
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:
   ahhh interesting, I see in the Example that everything happens in the 
callback instead. This is a bit of an unrelated discussion but why does this 
happen in a callback? Is it just due to the nature of bidirectional streams?



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