File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
google/cloud/bigtable/test_proxy Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -416,11 +416,15 @@ grpc::Status CbtTestProxy::ExecuteQuery(
416416
417417 // populate metadata
418418 google::bigtable::testproxy::ResultSetMetadata metadata;
419- for (auto const & column : bound_query_metadata.proto_schema ().columns ()) {
420- *metadata.add_columns () = column;
419+ auto prepared_query_response = prepared_query->response ();
420+ if (prepared_query_response) {
421+ auto prepared_query_metadata = prepared_query->response ()->metadata ();
422+ for (auto const & column :
423+ prepared_query_metadata.proto_schema ().columns ()) {
424+ *metadata.add_columns () = column;
425+ }
421426 }
422427 *response->mutable_metadata () = metadata;
423-
424428 *response->mutable_status () = ToRpcStatus (status);
425429 return grpc::Status ();
426430}
You can’t perform that action at this time.
0 commit comments