diff --git a/arrow-flight/src/sql/client.rs b/arrow-flight/src/sql/client.rs index 29782a2bc44..59294465b61 100644 --- a/arrow-flight/src/sql/client.rs +++ b/arrow-flight/src/sql/client.rs @@ -485,8 +485,8 @@ impl PreparedStatement { .await .map_err(status_to_arrow_error)? .unwrap(); - let any = Any::decode(&*result.app_metadata).map_err(decode_error_to_arrow_error)?; - let result: DoPutUpdateResult = any.unpack()?.unwrap(); + let result: DoPutUpdateResult = + Message::decode(&*result.app_metadata).map_err(decode_error_to_arrow_error)?; Ok(result.record_count) } diff --git a/arrow-flight/src/sql/server.rs b/arrow-flight/src/sql/server.rs index c18024cf068..d758388c981 100644 --- a/arrow-flight/src/sql/server.rs +++ b/arrow-flight/src/sql/server.rs @@ -736,7 +736,7 @@ where .await?; let result = DoPutUpdateResult { record_count }; let output = futures::stream::iter(vec![Ok(PutResult { - app_metadata: result.as_any().encode_to_vec().into(), + app_metadata: result.encode_to_vec().into(), })]); Ok(Response::new(Box::pin(output))) }