@@ -338,19 +338,6 @@ arrow::Result<ActionBeginTransactionRequest> ParseActionBeginTransactionRequest(
338338 return result;
339339}
340340
341- // ActionCancelQueryRequest is deprecated
342- ARROW_SUPPRESS_DEPRECATION_WARNING
343- arrow::Result<ActionCancelQueryRequest> ParseActionCancelQueryRequest (
344- const Action& action) {
345- pb::sql::ActionCancelQueryRequest command;
346- RETURN_NOT_OK (flight::internal::UnpackProtoAction (action, &command));
347-
348- ActionCancelQueryRequest result;
349- ARROW_ASSIGN_OR_RAISE (result.info , FlightInfo::Deserialize (command.info ()));
350- return result;
351- }
352- ARROW_UNSUPPRESS_DEPRECATION_WARNING
353-
354341arrow::Result<ActionCreatePreparedStatementRequest>
355342ParseActionCreatePreparedStatementRequest (const Action& action) {
356343 pb::sql::ActionCreatePreparedStatementRequest command;
@@ -472,29 +459,6 @@ arrow::Result<Result> PackActionResult(const FlightEndpoint& endpoint) {
472459 return endpoint.SerializeToBuffer ();
473460}
474461
475- // ActionCancelQueryResult is deprecated
476- ARROW_SUPPRESS_DEPRECATION_WARNING
477- arrow::Result<Result> PackActionResult (CancelResult result) {
478- pb::sql::ActionCancelQueryResult pb_result;
479- switch (result) {
480- case CancelResult::kUnspecified :
481- pb_result.set_result (pb::sql::ActionCancelQueryResult::CANCEL_RESULT_UNSPECIFIED);
482- break ;
483- case CancelResult::kCancelled :
484- pb_result.set_result (pb::sql::ActionCancelQueryResult::CANCEL_RESULT_CANCELLED);
485- break ;
486- case CancelResult::kCancelling :
487- pb_result.set_result (pb::sql::ActionCancelQueryResult::CANCEL_RESULT_CANCELLING);
488- break ;
489- case CancelResult::kNotCancellable :
490- pb_result.set_result (
491- pb::sql::ActionCancelQueryResult::CANCEL_RESULT_NOT_CANCELLABLE);
492- break ;
493- }
494- return PackActionResult (pb_result);
495- }
496- ARROW_UNSUPPRESS_DEPRECATION_WARNING
497-
498462arrow::Result<Result> PackActionResult (ActionCreatePreparedStatementResult result) {
499463 pb::sql::ActionCreatePreparedStatementResult pb_result;
500464 pb_result.set_prepared_statement_handle (std::move (result.prepared_statement_handle ));
@@ -848,7 +812,6 @@ Status FlightSqlServerBase::ListActions(const ServerCallContext& context,
848812 ActionType::kRenewFlightEndpoint ,
849813 FlightSqlServerBase::kBeginSavepointActionType ,
850814 FlightSqlServerBase::kBeginTransactionActionType ,
851- FlightSqlServerBase::kCancelQueryActionType ,
852815 FlightSqlServerBase::kCreatePreparedStatementActionType ,
853816 FlightSqlServerBase::kCreatePreparedSubstraitPlanActionType ,
854817 FlightSqlServerBase::kClosePreparedStatementActionType ,
@@ -915,15 +878,6 @@ Status FlightSqlServerBase::DoAction(const ServerCallContext& context,
915878 BeginTransaction (context, internal_command));
916879 ARROW_ASSIGN_OR_RAISE (Result packed_result, PackActionResult (std::move (result)));
917880
918- results.push_back (std::move (packed_result));
919- } else if (action.type == FlightSqlServerBase::kCancelQueryActionType .type ) {
920- ARROW_ASSIGN_OR_RAISE (ActionCancelQueryRequest internal_command,
921- ParseActionCancelQueryRequest (action));
922- ARROW_SUPPRESS_DEPRECATION_WARNING
923- ARROW_ASSIGN_OR_RAISE (CancelResult result, CancelQuery (context, internal_command));
924- ARROW_UNSUPPRESS_DEPRECATION_WARNING
925- ARROW_ASSIGN_OR_RAISE (Result packed_result, PackActionResult (result));
926-
927881 results.push_back (std::move (packed_result));
928882 } else if (action.type ==
929883 FlightSqlServerBase::kCreatePreparedStatementActionType .type ) {
@@ -1186,15 +1140,6 @@ arrow::Result<CancelFlightInfoResult> FlightSqlServerBase::CancelFlightInfo(
11861140 return Status::NotImplemented (" CancelFlightInfo not implemented" );
11871141}
11881142
1189- arrow::Result<CancelResult> FlightSqlServerBase::CancelQuery (
1190- const ServerCallContext& context, const ActionCancelQueryRequest& request) {
1191- CancelFlightInfoRequest cancel_flight_info_request;
1192- cancel_flight_info_request.info = std::make_unique<FlightInfo>(*request.info );
1193- ARROW_ASSIGN_OR_RAISE (auto result,
1194- CancelFlightInfo (context, cancel_flight_info_request));
1195- return static_cast <CancelResult>(result.status );
1196- }
1197-
11981143arrow::Result<FlightEndpoint> FlightSqlServerBase::RenewFlightEndpoint (
11991144 const ServerCallContext& context, const RenewFlightEndpointRequest& request) {
12001145 return Status::NotImplemented (" RenewFlightEndpoint not implemented" );
0 commit comments