Skip to content

Commit

Permalink
Suppress more PB warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Dec 6, 2024
1 parent 69265ac commit c6009fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/src/arrow/flight/sql/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,8 @@ Status FlightSqlClient::Rollback(const FlightCallOptions& options,
return results->Drain();
}

// ActionCancelQuery{Request,Result} are deprecated
ARROW_SUPPRESS_DEPRECATION_WARNING
::arrow::Result<CancelResult> FlightSqlClient::CancelQuery(
const FlightCallOptions& options, const FlightInfo& info) {
flight_sql_pb::ActionCancelQueryRequest cancel_query;
Expand All @@ -855,6 +857,7 @@ ::arrow::Result<CancelResult> FlightSqlClient::CancelQuery(
}
return Status::IOError("Server returned unknown result ", result.result());
}
ARROW_UNSUPPRESS_DEPRECATION_WARNING

Status FlightSqlClient::Close() { return impl_->Close(); }

Expand Down
6 changes: 6 additions & 0 deletions cpp/src/arrow/flight/sql/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ arrow::Result<ActionBeginTransactionRequest> ParseActionBeginTransactionRequest(
return result;
}

// ActionCancelQueryRequest is deprecated
ARROW_SUPPRESS_DEPRECATION_WARNING
arrow::Result<ActionCancelQueryRequest> ParseActionCancelQueryRequest(
const Action& action) {
pb::sql::ActionCancelQueryRequest command;
Expand All @@ -346,6 +348,7 @@ arrow::Result<ActionCancelQueryRequest> ParseActionCancelQueryRequest(
ARROW_ASSIGN_OR_RAISE(result.info, FlightInfo::Deserialize(command.info()));
return result;
}
ARROW_UNSUPPRESS_DEPRECATION_WARNING

arrow::Result<ActionCreatePreparedStatementRequest>
ParseActionCreatePreparedStatementRequest(const Action& action) {
Expand Down Expand Up @@ -468,6 +471,8 @@ arrow::Result<Result> PackActionResult(const FlightEndpoint& endpoint) {
return endpoint.SerializeToBuffer();
}

// ActionCancelQueryResult is deprecated
ARROW_SUPPRESS_DEPRECATION_WARNING
arrow::Result<Result> PackActionResult(CancelResult result) {
pb::sql::ActionCancelQueryResult pb_result;
switch (result) {
Expand All @@ -487,6 +492,7 @@ arrow::Result<Result> PackActionResult(CancelResult result) {
}
return PackActionResult(pb_result);
}
ARROW_UNSUPPRESS_DEPRECATION_WARNING

arrow::Result<Result> PackActionResult(ActionCreatePreparedStatementResult result) {
pb::sql::ActionCreatePreparedStatementResult pb_result;
Expand Down

0 comments on commit c6009fc

Please sign in to comment.