Skip to content

Conversation

mpeddada1
Copy link
Collaborator

No description provided.

@mpeddada1 mpeddada1 requested a review from a team as a code owner October 18, 2025 00:25
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the Bigtable API. label Oct 18, 2025
Copy link

Summary of Changes

Hello @mpeddada1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the Bigtable client library's PartialResultSetSource to correctly handle absl::Cord types, specifically for the resume_token field. It achieves this by introducing a new, publicly accessible AsString utility function that facilitates the conversion of absl::Cord instances to std::string, thereby ensuring robust and compatible data processing within the client.

Highlights

  • Cord Handling Utility: Introduced a new AsString utility function that can convert both std::string and absl::Cord types into std::string, ensuring consistent string representation.
  • PartialResultSetSource Update: Modified the PartialResultSetSource to utilize the new AsString utility when processing the resume_token, explicitly converting it to a std::string.
  • API Visibility: The AsString utility functions were moved out of an anonymous namespace in value.cc and their declarations were added to value.h, making them publicly accessible for use across the Bigtable client library.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the PartialResultSetSource to handle absl::Cord usage by introducing an AsString helper function to convert absl::Cord to std::string when necessary. This ensures that the resume_token is correctly processed, regardless of whether it's stored as a std::string or an absl::Cord internally. The changes also include adding necessary header files and adjusting namespace usage.

Comment on lines 64 to 79
// Some Bigtable proto fields use Cord internally and string externally.
template <typename T, typename std::enable_if<
std::is_same<T, std::string>::value>::type* = nullptr>
std::string AsString(T const& s);

template <typename T, typename std::enable_if<
std::is_same<T, std::string>::value>::type* = nullptr>
std::string AsString(T&& s);

template <typename T, typename std::enable_if<
std::is_same<T, absl::Cord>::value>::type* = nullptr>
std::string AsString(T const& s);

template <typename T, typename std::enable_if<
std::is_same<T, absl::Cord>::value>::type* = nullptr>
std::string AsString(T&& s);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These function declarations are missing the inline keyword. According to the Google C++ Style Guide1, small, frequently used functions should be declared inline to potentially improve performance.

inline std::string AsString(T const& s);

inline template <typename T, typename std::enable_if<std::is_same<T, std::string>::value>::type*> 
inline std::string AsString(T&& s);

inline template <typename T, typename std::enable_if<std::is_same<T, absl::Cord>::value>::type*> 
inline std::string AsString(T const& s);

inline template <typename T, typename std::enable_if<std::is_same<T, absl::Cord>::value>::type*> 
inline std::string AsString(T&& s);

Style Guide References

Footnotes

  1. This repository mostly follows the Google C++ style guide found at https://google.github.io/styleguide/cppguide.html.

Copy link

codecov bot commented Oct 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.10%. Comparing base (a5d8a1d) to head (6f49166).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15645      +/-   ##
==========================================
- Coverage   93.11%   93.10%   -0.01%     
==========================================
  Files        2433     2433              
  Lines      223720   223810      +90     
==========================================
+ Hits       208312   208387      +75     
- Misses      15408    15423      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpeddada1 mpeddada1 enabled auto-merge (squash) October 20, 2025 23:31
@mpeddada1 mpeddada1 closed this Oct 21, 2025
auto-merge was automatically disabled October 21, 2025 02:57

Pull request was closed

@mpeddada1 mpeddada1 reopened this Oct 21, 2025
@mpeddada1 mpeddada1 enabled auto-merge (squash) October 21, 2025 03:14
@mpeddada1 mpeddada1 merged commit 04f7a48 into googleapis:main Oct 21, 2025
65 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants