Skip to content

Conversation

@coryan
Copy link
Contributor

@coryan coryan commented Jan 5, 2018

This fixes #31. Implement a wrapper for ::google::bigtable::v2::RowSet.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 5, 2018
@mbrukman
Copy link
Contributor

mbrukman commented Jan 5, 2018

What's v3 in ::google::bigtable::v3::RowSet?

@coryan
Copy link
Contributor Author

coryan commented Jan 5, 2018

A typo. Fixed.

@DanielMahu
Copy link
Contributor

Can we have a function that prunes out row keys less than or equal to a string?

I plan to use it like so: DanielMahu@c887afd

@coryan
Copy link
Contributor Author

coryan commented Jan 5, 2018

We do not have such a function yet.

Copy link
Contributor

@DanielMahu DanielMahu left a comment

Choose a reason for hiding this comment

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

I have a few non-critical comments, otherwise LGTM

namespace bigtable {
inline namespace BIGTABLE_CLIENT_NS {
/**
* Represent (possibly non-continuous) set of row keys.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

  • Represent a (possibly non-continuous) set of row keys.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

}

/// Add @p row_key to the set.
void Append(std::string row_key) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Append(std::string) and Append(char const*) are both made redundant by Append(absl::string_view), any reason to keep them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK, you cannot move from absl::string_view into a std::string so you must always copy. The two overloads allow you to eliminate copies when possible. If you think I am optimizing too early, happy to remove. Also reordered the functions to explain why.

}

/// Add @p row_key to the set.
void Append(char const* row_key) { Append(absl::string_view(row_key)); }
Copy link
Contributor

Choose a reason for hiding this comment

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

This can also be removed together with Append(std::string).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See above.


namespace bigtable {
inline namespace BIGTABLE_CLIENT_NS {
namespace btproto = ::google::bigtable::v2;
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is empty

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

@coryan coryan merged commit f78b72a into googleapis:master Jan 8, 2018
@coryan coryan deleted the implement-row-set branch January 8, 2018 22:42
@coryan
Copy link
Contributor Author

coryan commented Jan 8, 2018

If @DanielMahu (or anybody else) thinks that the overloads are premature optimization I am happy to send a second PR to remove them.

@alevenberg alevenberg mentioned this pull request Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write down design doc for Row Range and Row Set wrappers

4 participants