From 96d8ded85bb12eb25b468224ee910f7ceb299fd7 Mon Sep 17 00:00:00 2001 From: mpeddada1 Date: Thu, 18 Dec 2025 22:27:47 +0000 Subject: [PATCH 1/4] feat(bigtable): remove deprecated RowReader constructors --- doc/v3-migration-guide.md | 12 ++++++++++++ google/cloud/bigtable/row_reader.cc | 26 -------------------------- google/cloud/bigtable/row_reader.h | 16 ---------------- 3 files changed, 12 insertions(+), 42 deletions(-) diff --git a/doc/v3-migration-guide.md b/doc/v3-migration-guide.md index 9ac6298d27609..b407c879fc67f 100644 --- a/doc/v3-migration-guide.md +++ b/doc/v3-migration-guide.md @@ -46,6 +46,18 @@ module which can be added to your `MODULE.bazel` file as a dependency. ### Bigtable +
+Bigtable: Removed bigtable::RowReader constructors + +
+ +The `bigtable::RowReader` constructors that accept `DataClient` as +an argument have been removed. + +Developers that read rows by directly constructing a `RowReader` object should instead construct a `Table` object and call `Table::ReadRows(...)`. + +
+ ### Pubsub ### Spanner diff --git a/google/cloud/bigtable/row_reader.cc b/google/cloud/bigtable/row_reader.cc index 3efcf408cdfb0..66d7889201e30 100644 --- a/google/cloud/bigtable/row_reader.cc +++ b/google/cloud/bigtable/row_reader.cc @@ -65,32 +65,6 @@ RowReader::RowReader() : RowReader( std::make_shared(Status{})) {} -RowReader::RowReader( - std::shared_ptr client, std::string table_name, RowSet row_set, - std::int64_t rows_limit, Filter filter, - std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory) - : RowReader(std::make_shared( - std::move(client), std::move(table_name), std::move(row_set), - rows_limit, std::move(filter), std::move(retry_policy), - std::move(backoff_policy), std::move(metadata_update_policy), - std::move(parser_factory))) {} - -RowReader::RowReader( - std::shared_ptr client, std::string app_profile_id, - std::string table_name, RowSet row_set, std::int64_t rows_limit, - Filter filter, std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory) - : RowReader(std::make_shared( - std::move(client), std::move(app_profile_id), std::move(table_name), - std::move(row_set), rows_limit, std::move(filter), - std::move(retry_policy), std::move(backoff_policy), - std::move(metadata_update_policy), std::move(parser_factory))) {} - std::int64_t constexpr RowReader::NO_ROWS_LIMIT; // The name must be all lowercase to work with range-for loops. diff --git a/google/cloud/bigtable/row_reader.h b/google/cloud/bigtable/row_reader.h index 11ba0d202eba9..ea33b8ee8ff76 100644 --- a/google/cloud/bigtable/row_reader.h +++ b/google/cloud/bigtable/row_reader.h @@ -65,22 +65,6 @@ class RowReader { /// Default constructs an empty RowReader. RowReader(); - GOOGLE_CLOUD_CPP_BIGTABLE_ROW_READER_CTOR_DEPRECATED() - RowReader(std::shared_ptr client, std::string table_name, - RowSet row_set, std::int64_t rows_limit, Filter filter, - std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory); - - GOOGLE_CLOUD_CPP_BIGTABLE_ROW_READER_CTOR_DEPRECATED() - RowReader(std::shared_ptr client, std::string app_profile_id, - std::string table_name, RowSet row_set, std::int64_t rows_limit, - Filter filter, std::unique_ptr retry_policy, - std::unique_ptr backoff_policy, - MetadataUpdatePolicy metadata_update_policy, - std::unique_ptr parser_factory); - // NOLINTNEXTLINE(performance-noexcept-move-constructor) RowReader(RowReader&&) = default; From 3d8e5d6d3d855aa7ca3ec1498ae8cf9c4a523069 Mon Sep 17 00:00:00 2001 From: mpeddada1 Date: Thu, 18 Dec 2025 22:33:46 +0000 Subject: [PATCH 2/4] fix formatting --- doc/v3-migration-guide.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/v3-migration-guide.md b/doc/v3-migration-guide.md index b407c879fc67f..f7cf278ff947f 100644 --- a/doc/v3-migration-guide.md +++ b/doc/v3-migration-guide.md @@ -47,14 +47,15 @@ module which can be added to your `MODULE.bazel` file as a dependency. ### Bigtable
-Bigtable: Removed bigtable::RowReader constructors +Removed bigtable::RowReader constructors
-The `bigtable::RowReader` constructors that accept `DataClient` as -an argument have been removed. +The `bigtable::RowReader` constructors that accept `DataClient` as an argument +have been removed. -Developers that read rows by directly constructing a `RowReader` object should instead construct a `Table` object and call `Table::ReadRows(...)`. +Developers that read rows by directly constructing a `RowReader` object should +instead construct a `Table` object and call `Table::ReadRows(...)`.
From ca352ccce51129a1bcbd264c0d40212c38802c60 Mon Sep 17 00:00:00 2001 From: mpeddada1 Date: Thu, 18 Dec 2025 22:34:30 +0000 Subject: [PATCH 3/4] remove br --- doc/v3-migration-guide.md | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/v3-migration-guide.md b/doc/v3-migration-guide.md index f7cf278ff947f..d1ba6122cabe6 100644 --- a/doc/v3-migration-guide.md +++ b/doc/v3-migration-guide.md @@ -49,7 +49,6 @@ module which can be added to your `MODULE.bazel` file as a dependency.
Removed bigtable::RowReader constructors -
The `bigtable::RowReader` constructors that accept `DataClient` as an argument have been removed. From 9e72e2151e41fcd3e251241b4b7e4467508e0779 Mon Sep 17 00:00:00 2001 From: mpeddada1 Date: Fri, 19 Dec 2025 18:27:54 +0000 Subject: [PATCH 4/4] include more detailed examples --- doc/v3-migration-guide.md | 46 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/doc/v3-migration-guide.md b/doc/v3-migration-guide.md index d1ba6122cabe6..9cfa5c05c00fb 100644 --- a/doc/v3-migration-guide.md +++ b/doc/v3-migration-guide.md @@ -56,6 +56,52 @@ have been removed. Developers that read rows by directly constructing a `RowReader` object should instead construct a `Table` object and call `Table::ReadRows(...)`. +For example, code that used to look like this: + +**Before:** + +```cpp +#include "google/cloud/bigtable/data_client.h" +#include "google/cloud/bigtable/row_reader.h" +#include "google/cloud/bigtable/table.h" + +// ... + +auto client = google::cloud::bigtable::MakeDataClient( + "my-project", "my-instance", creds); +auto reader = google::cloud::bigtable::RowReader( + client, "my-table-id", google::cloud::bigtable::RowSet("r1", "r2"), + google::cloud::bigtable::RowReader::NO_ROWS_LIMIT, + google::cloud::bigtable::Filter::PassAllFilter(), + /*...retry and backoff policies...*/); + +for (auto& row : reader) { + if (!row) throw std::move(row).status(); + // ... +} +``` + +Should be changed to this: + +**After:** + +```cpp +#include "google/cloud/bigtable/table.h" + +// ... + +namespace cbt = google::cloud::bigtable; +cbt::Table table(cbt::MakeDataConnection(), + cbt::TableResource("my-project", "my-instance", "my-table-id")); + +for (auto& row : table.ReadRows( + cbt::RowSet("r1", "r2"), + cbt::Filter::PassAllFilter())) { + if (!row) throw std::move(row).status(); + // ... +} +``` +
### Pubsub