Skip to content

Commit 31f0353

Browse files
authored
Merge branch 'main' into schema-change-error
2 parents a0acd1c + 18e5947 commit 31f0353

23 files changed

+979
-780
lines changed

.github/workflows/test-runner.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ jobs:
127127
execute-integration-tests: true
128128
secrets: inherit
129129
windows-cmake:
130+
# Disabled
131+
if: false
130132
name: Windows-CMake
131133
needs: [pre-flight]
132134
uses: ./.github/workflows/windows-cmake.yml
@@ -152,7 +154,7 @@ jobs:
152154
# macos-bazel is disabled
153155
# macos-cmake is disabled
154156
- windows-bazel
155-
- windows-cmake
157+
# windows-cmake is disabled is disabled
156158
# Run even if the other jobs failed or were skipped.
157159
if: always()
158160
runs-on: ubuntu-latest

google/cloud/bigtable/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ add_library(
249249
read_modify_write_rule.h
250250
resource_names.cc
251251
resource_names.h
252-
results.h
252+
result_source_interface.h
253253
retry_policy.h
254254
row.h
255255
row_key.h
@@ -260,6 +260,8 @@ add_library(
260260
row_reader.h
261261
row_set.cc
262262
row_set.h
263+
row_stream.cc
264+
row_stream.h
263265
rpc_backoff_policy.cc
264266
rpc_backoff_policy.h
265267
rpc_retry_policy.cc
@@ -511,6 +513,7 @@ if (BUILD_TESTING)
511513
row_range_test.cc
512514
row_reader_test.cc
513515
row_set_test.cc
516+
row_stream_test.cc
514517
row_test.cc
515518
rpc_backoff_policy_test.cc
516519
rpc_retry_policy_test.cc

google/cloud/bigtable/bigtable_client_unit_tests.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ bigtable_client_unit_tests = [
8787
"row_range_test.cc",
8888
"row_reader_test.cc",
8989
"row_set_test.cc",
90+
"row_stream_test.cc",
9091
"row_test.cc",
9192
"rpc_backoff_policy_test.cc",
9293
"rpc_retry_policy_test.cc",

google/cloud/bigtable/bound_query.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ google::bigtable::v2::ExecuteQueryRequest BoundQuery::ToRequestProto() const {
3535

3636
google::protobuf::Map<std::string, google::bigtable::v2::Value> parameters;
3737
for (auto const& kv : parameters_) {
38-
parameters[kv.first] =
39-
bigtable_internal::ValueInternals::ToProto(kv.second).second;
38+
auto type_value = bigtable_internal::ValueInternals::ToProto(kv.second);
39+
google::bigtable::v2::Value v = std::move(type_value.second);
40+
*v.mutable_type() = std::move(type_value.first);
41+
parameters[kv.first] = std::move(v);
4042
}
41-
*result.mutable_params() = parameters;
43+
*result.mutable_params() = std::move(parameters);
4244
return result;
4345
}
4446

google/cloud/bigtable/bound_query_test.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,14 @@ TEST(BoundQuery, ToRequestProto) {
9797
auto val1 = proto.params().find("val1")->second;
9898
EXPECT_TRUE(val1.has_bool_value());
9999
EXPECT_EQ(true, val1.bool_value());
100+
EXPECT_TRUE(val1.type().has_bool_type());
100101

101102
// The second parameter is a double.
102103
EXPECT_TRUE(proto.params().contains("val2"));
103104
auto val2 = proto.params().find("val2")->second;
104105
EXPECT_TRUE(val2.has_float_value());
105106
EXPECT_EQ(2.0, val2.float_value());
107+
EXPECT_TRUE(val2.type().has_float64_type());
106108

107109
// Cancel all pending operations, satisfying any remaining futures.
108110
fake_cq_impl->SimulateCompletion(false);

google/cloud/bigtable/bytes.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ class Bytes {
4444
/// An empty sequence.
4545
Bytes() = default;
4646

47+
/// Stops copying at the null-terminator character from input bytes.
48+
explicit Bytes(char const* bytes) : bytes_(bytes) {}
49+
4750
/// @name Construction from a sequence of octets.
4851
///@{
4952
template <typename InputIt>

google/cloud/bigtable/bytes_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ TEST(Bytes, OutputStream) {
105105
{Bytes(std::string("a\377B")), R"(B"a\377B")"},
106106
{Bytes(std::string("!@#$%^&*()-.")), R"(B"!@#$%^&*()-.")"},
107107
{Bytes(std::string(3, '\0')), R"(B"\000\000\000")"},
108-
{Bytes(""), R"(B"\000")"},
109-
{Bytes("foo"), R"(B"foo\000")"},
108+
{Bytes(""), R"(B"")"},
109+
{Bytes("foo"), R"(B"foo")"},
110110
};
111111

112112
for (auto const& tc : test_cases) {

google/cloud/bigtable/client.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@
1515
#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_CLIENT_H
1616
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_BIGTABLE_CLIENT_H
1717

18+
#include "google/cloud/bigtable/bound_query.h"
1819
#include "google/cloud/bigtable/data_connection.h"
20+
#include "google/cloud/bigtable/instance_resource.h"
21+
#include "google/cloud/bigtable/prepared_query.h"
22+
#include "google/cloud/bigtable/sql_statement.h"
23+
#include "google/cloud/bigtable/version.h"
24+
#include "google/cloud/future.h"
25+
#include "google/cloud/options.h"
26+
#include "google/cloud/status_or.h"
27+
#include <memory>
1928

2029
namespace google {
2130
namespace cloud {
@@ -81,7 +90,9 @@ class Client {
8190
* @param opts Unused for now
8291
*/
8392
explicit Client(std::shared_ptr<DataConnection> conn, Options opts = {})
84-
: conn_(std::move(conn)), opts_(std::move(opts)) {}
93+
: conn_(std::move(conn)),
94+
opts_(google::cloud::internal::MergeOptions(std::move(opts),
95+
conn_->options())) {}
8596

8697
/**
8798
* Prepares a query for future execution.

google/cloud/bigtable/data_connection.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "google/cloud/bigtable/internal/partial_result_set_source.h"
2222
#include "google/cloud/bigtable/internal/row_reader_impl.h"
2323
#include "google/cloud/bigtable/options.h"
24-
#include "google/cloud/bigtable/results.h"
24+
#include "google/cloud/bigtable/result_source_interface.h"
2525
#include "google/cloud/background_threads.h"
2626
#include "google/cloud/common_options.h"
2727
#include "google/cloud/credentials.h"

google/cloud/bigtable/data_connection.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020
#include "google/cloud/bigtable/mutation_branch.h"
2121
#include "google/cloud/bigtable/mutations.h"
2222
#include "google/cloud/bigtable/prepared_query.h"
23-
#include "google/cloud/bigtable/results.h"
23+
#include "google/cloud/bigtable/result_source_interface.h"
2424
#include "google/cloud/bigtable/row.h"
2525
#include "google/cloud/bigtable/row_key_sample.h"
2626
#include "google/cloud/bigtable/row_reader.h"
2727
#include "google/cloud/bigtable/row_set.h"
28+
#include "google/cloud/bigtable/row_stream.h"
2829
#include "google/cloud/bigtable/sql_statement.h"
2930
#include "google/cloud/backoff_policy.h"
3031
#include "google/cloud/options.h"

0 commit comments

Comments
 (0)