-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(bigtable): reverse scans #12022
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #12022 +/- ##
==========================================
- Coverage 93.72% 93.71% -0.01%
==========================================
Files 2010 2010
Lines 174704 174761 +57
==========================================
+ Hits 163734 163771 +37
- Misses 10970 10990 +20
☔ View full report in Codecov by Sentry. |
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
for (StatusOr<cbt::Row>& row : table.ReadRows( | ||
cbt::RowRange::RightOpen("phone#5c10102", "phone#5c10103"), 3, | ||
cbt::Filter::PassAllFilter(), | ||
Options{}.set<cbt::ReverseScanOption>(true))) { | ||
if (!row) throw std::move(row).status(); | ||
PrintRow(*row); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may be getting too long for a call inside a range for. Consider:
for (StatusOr<cbt::Row>& row : table.ReadRows( | |
cbt::RowRange::RightOpen("phone#5c10102", "phone#5c10103"), 3, | |
cbt::Filter::PassAllFilter(), | |
Options{}.set<cbt::ReverseScanOption>(true))) { | |
if (!row) throw std::move(row).status(); | |
PrintRow(*row); | |
} | |
auto rows = table.ReadRows( | |
cbt::RowRange::RightOpen("phone#5c10102", "phone#5c10103"), 3, | |
cbt::Filter::PassAllFilter(), | |
Options{}.set<cbt::ReverseScanOption>(true)); | |
for (StatusOr<cbt::Row>& row : rows) { | |
if (!row) throw std::move(row).status(); | |
PrintRow(*row); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
622b99e
to
b666bda
Compare
Fixes #12010
ReverseScanOption
and passes its value to the sync/async row readersbool reverse
field to theReadRowsParams
Note that the emulator does not yet support returning rows in reverse.
This change is