jduo commented on code in PR #38404:
URL: https://github.com/apache/arrow/pull/38404#discussion_r1372026240
##########
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:
This is all for this MockFlightSqlProducer.
In a real server, this should bind parameters on multiple queries on the
backend.
Se FlightSqlExample for how it'd work in practice.
--
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]