Skip to content

Commit 6f415f6

Browse files
feat: Deprecate format specific row_count field in Read API (#1599)
* feat: Deprecate format specific `row_count` field in Read API PiperOrigin-RevId: 438434001 Source-Link: googleapis/googleapis@727f08b Source-Link: https://github.com/googleapis/googleapis-gen/commit/2d62ab0d3d650b7aba4ec5e5a96dd8cdbae89fb7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmQ2MmFiMGQzZDY1MGI3YWJhNGVjNWU1YTk2ZGQ4Y2RiYWU4OWZiNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 1a23b44 commit 6f415f6

File tree

10 files changed

+71
-49
lines changed

10 files changed

+71
-49
lines changed

proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowProto.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
5151
"\n,google/cloud/bigquery/storage/v1/arrow"
5252
+ ".proto\022 google.cloud.bigquery.storage.v1"
5353
+ "\"(\n\013ArrowSchema\022\031\n\021serialized_schema\030\001 \001"
54-
+ "(\014\"F\n\020ArrowRecordBatch\022\037\n\027serialized_rec"
55-
+ "ord_batch\030\001 \001(\014\022\021\n\trow_count\030\002 \001(\003\"\317\001\n\031A"
56-
+ "rrowSerializationOptions\022h\n\022buffer_compr"
57-
+ "ession\030\002 \001(\0162L.google.cloud.bigquery.sto"
58-
+ "rage.v1.ArrowSerializationOptions.Compre"
59-
+ "ssionCodec\"H\n\020CompressionCodec\022\033\n\027COMPRE"
60-
+ "SSION_UNSPECIFIED\020\000\022\r\n\tLZ4_FRAME\020\001\022\010\n\004ZS"
61-
+ "TD\020\002B\303\001\n$com.google.cloud.bigquery.stora"
62-
+ "ge.v1B\nArrowProtoP\001ZGgoogle.golang.org/g"
63-
+ "enproto/googleapis/cloud/bigquery/storag"
64-
+ "e/v1;storage\252\002 Google.Cloud.BigQuery.Sto"
65-
+ "rage.V1\312\002 Google\\Cloud\\BigQuery\\Storage\\"
66-
+ "V1b\006proto3"
54+
+ "(\014\"J\n\020ArrowRecordBatch\022\037\n\027serialized_rec"
55+
+ "ord_batch\030\001 \001(\014\022\025\n\trow_count\030\002 \001(\003B\002\030\001\"\317"
56+
+ "\001\n\031ArrowSerializationOptions\022h\n\022buffer_c"
57+
+ "ompression\030\002 \001(\0162L.google.cloud.bigquery"
58+
+ ".storage.v1.ArrowSerializationOptions.Co"
59+
+ "mpressionCodec\"H\n\020CompressionCodec\022\033\n\027CO"
60+
+ "MPRESSION_UNSPECIFIED\020\000\022\r\n\tLZ4_FRAME\020\001\022\010"
61+
+ "\n\004ZSTD\020\002B\303\001\n$com.google.cloud.bigquery.s"
62+
+ "torage.v1B\nArrowProtoP\001ZGgoogle.golang.o"
63+
+ "rg/genproto/googleapis/cloud/bigquery/st"
64+
+ "orage/v1;storage\252\002 Google.Cloud.BigQuery"
65+
+ ".Storage.V1\312\002 Google\\Cloud\\BigQuery\\Stor"
66+
+ "age\\V1b\006proto3"
6767
};
6868
descriptor =
6969
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(

proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowRecordBatch.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,16 @@ public com.google.protobuf.ByteString getSerializedRecordBatch() {
138138
*
139139
*
140140
* <pre>
141-
* The count of rows in `serialized_record_batch`.
141+
* [Deprecated] The count of rows in `serialized_record_batch`.
142+
* Please use the format-independent ReadRowsResponse.row_count instead.
142143
* </pre>
143144
*
144-
* <code>int64 row_count = 2;</code>
145+
* <code>int64 row_count = 2 [deprecated = true];</code>
145146
*
146147
* @return The rowCount.
147148
*/
148149
@java.lang.Override
150+
@java.lang.Deprecated
149151
public long getRowCount() {
150152
return rowCount_;
151153
}
@@ -544,29 +546,33 @@ public Builder clearSerializedRecordBatch() {
544546
*
545547
*
546548
* <pre>
547-
* The count of rows in `serialized_record_batch`.
549+
* [Deprecated] The count of rows in `serialized_record_batch`.
550+
* Please use the format-independent ReadRowsResponse.row_count instead.
548551
* </pre>
549552
*
550-
* <code>int64 row_count = 2;</code>
553+
* <code>int64 row_count = 2 [deprecated = true];</code>
551554
*
552555
* @return The rowCount.
553556
*/
554557
@java.lang.Override
558+
@java.lang.Deprecated
555559
public long getRowCount() {
556560
return rowCount_;
557561
}
558562
/**
559563
*
560564
*
561565
* <pre>
562-
* The count of rows in `serialized_record_batch`.
566+
* [Deprecated] The count of rows in `serialized_record_batch`.
567+
* Please use the format-independent ReadRowsResponse.row_count instead.
563568
* </pre>
564569
*
565-
* <code>int64 row_count = 2;</code>
570+
* <code>int64 row_count = 2 [deprecated = true];</code>
566571
*
567572
* @param value The rowCount to set.
568573
* @return This builder for chaining.
569574
*/
575+
@java.lang.Deprecated
570576
public Builder setRowCount(long value) {
571577

572578
rowCount_ = value;
@@ -577,13 +583,15 @@ public Builder setRowCount(long value) {
577583
*
578584
*
579585
* <pre>
580-
* The count of rows in `serialized_record_batch`.
586+
* [Deprecated] The count of rows in `serialized_record_batch`.
587+
* Please use the format-independent ReadRowsResponse.row_count instead.
581588
* </pre>
582589
*
583-
* <code>int64 row_count = 2;</code>
590+
* <code>int64 row_count = 2 [deprecated = true];</code>
584591
*
585592
* @return This builder for chaining.
586593
*/
594+
@java.lang.Deprecated
587595
public Builder clearRowCount() {
588596

589597
rowCount_ = 0L;

proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowRecordBatchOrBuilder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ public interface ArrowRecordBatchOrBuilder
4040
*
4141
*
4242
* <pre>
43-
* The count of rows in `serialized_record_batch`.
43+
* [Deprecated] The count of rows in `serialized_record_batch`.
44+
* Please use the format-independent ReadRowsResponse.row_count instead.
4445
* </pre>
4546
*
46-
* <code>int64 row_count = 2;</code>
47+
* <code>int64 row_count = 2 [deprecated = true];</code>
4748
*
4849
* @return The rowCount.
4950
*/
51+
@java.lang.Deprecated
5052
long getRowCount();
5153
}

proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroProto.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
4646
java.lang.String[] descriptorData = {
4747
"\n+google/cloud/bigquery/storage/v1/avro."
4848
+ "proto\022 google.cloud.bigquery.storage.v1\""
49-
+ "\034\n\nAvroSchema\022\016\n\006schema\030\001 \001(\t\"=\n\010AvroRow"
50-
+ "s\022\036\n\026serialized_binary_rows\030\001 \001(\014\022\021\n\trow"
51-
+ "_count\030\002 \001(\003B\302\001\n$com.google.cloud.bigque"
52-
+ "ry.storage.v1B\tAvroProtoP\001ZGgoogle.golan"
53-
+ "g.org/genproto/googleapis/cloud/bigquery"
54-
+ "/storage/v1;storage\252\002 Google.Cloud.BigQu"
55-
+ "ery.Storage.V1\312\002 Google\\Cloud\\BigQuery\\S"
56-
+ "torage\\V1b\006proto3"
49+
+ "\034\n\nAvroSchema\022\016\n\006schema\030\001 \001(\t\"A\n\010AvroRow"
50+
+ "s\022\036\n\026serialized_binary_rows\030\001 \001(\014\022\025\n\trow"
51+
+ "_count\030\002 \001(\003B\002\030\001B\302\001\n$com.google.cloud.bi"
52+
+ "gquery.storage.v1B\tAvroProtoP\001ZGgoogle.g"
53+
+ "olang.org/genproto/googleapis/cloud/bigq"
54+
+ "uery/storage/v1;storage\252\002 Google.Cloud.B"
55+
+ "igQuery.Storage.V1\312\002 Google\\Cloud\\BigQue"
56+
+ "ry\\Storage\\V1b\006proto3"
5757
};
5858
descriptor =
5959
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(

proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRows.java

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,16 @@ public com.google.protobuf.ByteString getSerializedBinaryRows() {
138138
*
139139
*
140140
* <pre>
141-
* The count of rows in the returning block.
141+
* [Deprecated] The count of rows in the returning block.
142+
* Please use the format-independent ReadRowsResponse.row_count instead.
142143
* </pre>
143144
*
144-
* <code>int64 row_count = 2;</code>
145+
* <code>int64 row_count = 2 [deprecated = true];</code>
145146
*
146147
* @return The rowCount.
147148
*/
148149
@java.lang.Override
150+
@java.lang.Deprecated
149151
public long getRowCount() {
150152
return rowCount_;
151153
}
@@ -541,29 +543,33 @@ public Builder clearSerializedBinaryRows() {
541543
*
542544
*
543545
* <pre>
544-
* The count of rows in the returning block.
546+
* [Deprecated] The count of rows in the returning block.
547+
* Please use the format-independent ReadRowsResponse.row_count instead.
545548
* </pre>
546549
*
547-
* <code>int64 row_count = 2;</code>
550+
* <code>int64 row_count = 2 [deprecated = true];</code>
548551
*
549552
* @return The rowCount.
550553
*/
551554
@java.lang.Override
555+
@java.lang.Deprecated
552556
public long getRowCount() {
553557
return rowCount_;
554558
}
555559
/**
556560
*
557561
*
558562
* <pre>
559-
* The count of rows in the returning block.
563+
* [Deprecated] The count of rows in the returning block.
564+
* Please use the format-independent ReadRowsResponse.row_count instead.
560565
* </pre>
561566
*
562-
* <code>int64 row_count = 2;</code>
567+
* <code>int64 row_count = 2 [deprecated = true];</code>
563568
*
564569
* @param value The rowCount to set.
565570
* @return This builder for chaining.
566571
*/
572+
@java.lang.Deprecated
567573
public Builder setRowCount(long value) {
568574

569575
rowCount_ = value;
@@ -574,13 +580,15 @@ public Builder setRowCount(long value) {
574580
*
575581
*
576582
* <pre>
577-
* The count of rows in the returning block.
583+
* [Deprecated] The count of rows in the returning block.
584+
* Please use the format-independent ReadRowsResponse.row_count instead.
578585
* </pre>
579586
*
580-
* <code>int64 row_count = 2;</code>
587+
* <code>int64 row_count = 2 [deprecated = true];</code>
581588
*
582589
* @return This builder for chaining.
583590
*/
591+
@java.lang.Deprecated
584592
public Builder clearRowCount() {
585593

586594
rowCount_ = 0L;

proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRowsOrBuilder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ public interface AvroRowsOrBuilder
4040
*
4141
*
4242
* <pre>
43-
* The count of rows in the returning block.
43+
* [Deprecated] The count of rows in the returning block.
44+
* Please use the format-independent ReadRowsResponse.row_count instead.
4445
* </pre>
4546
*
46-
* <code>int64 row_count = 2;</code>
47+
* <code>int64 row_count = 2 [deprecated = true];</code>
4748
*
4849
* @return The rowCount.
4950
*/
51+
@java.lang.Deprecated
5052
long getRowCount();
5153
}

proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/arrow.proto

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -39,8 +39,9 @@ message ArrowRecordBatch {
3939
// IPC-serialized Arrow RecordBatch.
4040
bytes serialized_record_batch = 1;
4141

42-
// The count of rows in `serialized_record_batch`.
43-
int64 row_count = 2;
42+
// [Deprecated] The count of rows in `serialized_record_batch`.
43+
// Please use the format-independent ReadRowsResponse.row_count instead.
44+
int64 row_count = 2 [deprecated = true];
4445
}
4546

4647
// Contains options specific to Arrow Serialization.

proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/avro.proto

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -35,6 +35,7 @@ message AvroRows {
3535
// Binary serialized rows in a block.
3636
bytes serialized_binary_rows = 1;
3737

38-
// The count of rows in the returning block.
39-
int64 row_count = 2;
38+
// [Deprecated] The count of rows in the returning block.
39+
// Please use the format-independent ReadRowsResponse.row_count instead.
40+
int64 row_count = 2 [deprecated = true];
4041
}

proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/protobuf.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/table.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2022 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)