Skip to content

Commit

Permalink
feat: Deprecate format specific row_count field in Read API (#1599)
Browse files Browse the repository at this point in the history
* feat: Deprecate format specific `row_count` field in Read API

PiperOrigin-RevId: 438434001

Source-Link: googleapis/googleapis@727f08b

Source-Link: googleapis/googleapis-gen@2d62ab0
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Mar 31, 2022
1 parent 1a23b44 commit 6f415f6
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"\n,google/cloud/bigquery/storage/v1/arrow"
+ ".proto\022 google.cloud.bigquery.storage.v1"
+ "\"(\n\013ArrowSchema\022\031\n\021serialized_schema\030\001 \001"
+ "(\014\"F\n\020ArrowRecordBatch\022\037\n\027serialized_rec"
+ "ord_batch\030\001 \001(\014\022\021\n\trow_count\030\002 \001(\003\"\317\001\n\031A"
+ "rrowSerializationOptions\022h\n\022buffer_compr"
+ "ession\030\002 \001(\0162L.google.cloud.bigquery.sto"
+ "rage.v1.ArrowSerializationOptions.Compre"
+ "ssionCodec\"H\n\020CompressionCodec\022\033\n\027COMPRE"
+ "SSION_UNSPECIFIED\020\000\022\r\n\tLZ4_FRAME\020\001\022\010\n\004ZS"
+ "TD\020\002B\303\001\n$com.google.cloud.bigquery.stora"
+ "ge.v1B\nArrowProtoP\001ZGgoogle.golang.org/g"
+ "enproto/googleapis/cloud/bigquery/storag"
+ "e/v1;storage\252\002 Google.Cloud.BigQuery.Sto"
+ "rage.V1\312\002 Google\\Cloud\\BigQuery\\Storage\\"
+ "V1b\006proto3"
+ "(\014\"J\n\020ArrowRecordBatch\022\037\n\027serialized_rec"
+ "ord_batch\030\001 \001(\014\022\025\n\trow_count\030\002 \001(\003B\002\030\001\"\317"
+ "\001\n\031ArrowSerializationOptions\022h\n\022buffer_c"
+ "ompression\030\002 \001(\0162L.google.cloud.bigquery"
+ ".storage.v1.ArrowSerializationOptions.Co"
+ "mpressionCodec\"H\n\020CompressionCodec\022\033\n\027CO"
+ "MPRESSION_UNSPECIFIED\020\000\022\r\n\tLZ4_FRAME\020\001\022\010"
+ "\n\004ZSTD\020\002B\303\001\n$com.google.cloud.bigquery.s"
+ "torage.v1B\nArrowProtoP\001ZGgoogle.golang.o"
+ "rg/genproto/googleapis/cloud/bigquery/st"
+ "orage/v1;storage\252\002 Google.Cloud.BigQuery"
+ ".Storage.V1\312\002 Google\\Cloud\\BigQuery\\Stor"
+ "age\\V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,16 @@ public com.google.protobuf.ByteString getSerializedRecordBatch() {
*
*
* <pre>
* The count of rows in `serialized_record_batch`.
* [Deprecated] The count of rows in `serialized_record_batch`.
* Please use the format-independent ReadRowsResponse.row_count instead.
* </pre>
*
* <code>int64 row_count = 2;</code>
* <code>int64 row_count = 2 [deprecated = true];</code>
*
* @return The rowCount.
*/
@java.lang.Override
@java.lang.Deprecated
public long getRowCount() {
return rowCount_;
}
Expand Down Expand Up @@ -544,29 +546,33 @@ public Builder clearSerializedRecordBatch() {
*
*
* <pre>
* The count of rows in `serialized_record_batch`.
* [Deprecated] The count of rows in `serialized_record_batch`.
* Please use the format-independent ReadRowsResponse.row_count instead.
* </pre>
*
* <code>int64 row_count = 2;</code>
* <code>int64 row_count = 2 [deprecated = true];</code>
*
* @return The rowCount.
*/
@java.lang.Override
@java.lang.Deprecated
public long getRowCount() {
return rowCount_;
}
/**
*
*
* <pre>
* The count of rows in `serialized_record_batch`.
* [Deprecated] The count of rows in `serialized_record_batch`.
* Please use the format-independent ReadRowsResponse.row_count instead.
* </pre>
*
* <code>int64 row_count = 2;</code>
* <code>int64 row_count = 2 [deprecated = true];</code>
*
* @param value The rowCount to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder setRowCount(long value) {

rowCount_ = value;
Expand All @@ -577,13 +583,15 @@ public Builder setRowCount(long value) {
*
*
* <pre>
* The count of rows in `serialized_record_batch`.
* [Deprecated] The count of rows in `serialized_record_batch`.
* Please use the format-independent ReadRowsResponse.row_count instead.
* </pre>
*
* <code>int64 row_count = 2;</code>
* <code>int64 row_count = 2 [deprecated = true];</code>
*
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder clearRowCount() {

rowCount_ = 0L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ public interface ArrowRecordBatchOrBuilder
*
*
* <pre>
* The count of rows in `serialized_record_batch`.
* [Deprecated] The count of rows in `serialized_record_batch`.
* Please use the format-independent ReadRowsResponse.row_count instead.
* </pre>
*
* <code>int64 row_count = 2;</code>
* <code>int64 row_count = 2 [deprecated = true];</code>
*
* @return The rowCount.
*/
@java.lang.Deprecated
long getRowCount();
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
java.lang.String[] descriptorData = {
"\n+google/cloud/bigquery/storage/v1/avro."
+ "proto\022 google.cloud.bigquery.storage.v1\""
+ "\034\n\nAvroSchema\022\016\n\006schema\030\001 \001(\t\"=\n\010AvroRow"
+ "s\022\036\n\026serialized_binary_rows\030\001 \001(\014\022\021\n\trow"
+ "_count\030\002 \001(\003B\302\001\n$com.google.cloud.bigque"
+ "ry.storage.v1B\tAvroProtoP\001ZGgoogle.golan"
+ "g.org/genproto/googleapis/cloud/bigquery"
+ "/storage/v1;storage\252\002 Google.Cloud.BigQu"
+ "ery.Storage.V1\312\002 Google\\Cloud\\BigQuery\\S"
+ "torage\\V1b\006proto3"
+ "\034\n\nAvroSchema\022\016\n\006schema\030\001 \001(\t\"A\n\010AvroRow"
+ "s\022\036\n\026serialized_binary_rows\030\001 \001(\014\022\025\n\trow"
+ "_count\030\002 \001(\003B\002\030\001B\302\001\n$com.google.cloud.bi"
+ "gquery.storage.v1B\tAvroProtoP\001ZGgoogle.g"
+ "olang.org/genproto/googleapis/cloud/bigq"
+ "uery/storage/v1;storage\252\002 Google.Cloud.B"
+ "igQuery.Storage.V1\312\002 Google\\Cloud\\BigQue"
+ "ry\\Storage\\V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,16 @@ public com.google.protobuf.ByteString getSerializedBinaryRows() {
*
*
* <pre>
* The count of rows in the returning block.
* [Deprecated] The count of rows in the returning block.
* Please use the format-independent ReadRowsResponse.row_count instead.
* </pre>
*
* <code>int64 row_count = 2;</code>
* <code>int64 row_count = 2 [deprecated = true];</code>
*
* @return The rowCount.
*/
@java.lang.Override
@java.lang.Deprecated
public long getRowCount() {
return rowCount_;
}
Expand Down Expand Up @@ -541,29 +543,33 @@ public Builder clearSerializedBinaryRows() {
*
*
* <pre>
* The count of rows in the returning block.
* [Deprecated] The count of rows in the returning block.
* Please use the format-independent ReadRowsResponse.row_count instead.
* </pre>
*
* <code>int64 row_count = 2;</code>
* <code>int64 row_count = 2 [deprecated = true];</code>
*
* @return The rowCount.
*/
@java.lang.Override
@java.lang.Deprecated
public long getRowCount() {
return rowCount_;
}
/**
*
*
* <pre>
* The count of rows in the returning block.
* [Deprecated] The count of rows in the returning block.
* Please use the format-independent ReadRowsResponse.row_count instead.
* </pre>
*
* <code>int64 row_count = 2;</code>
* <code>int64 row_count = 2 [deprecated = true];</code>
*
* @param value The rowCount to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder setRowCount(long value) {

rowCount_ = value;
Expand All @@ -574,13 +580,15 @@ public Builder setRowCount(long value) {
*
*
* <pre>
* The count of rows in the returning block.
* [Deprecated] The count of rows in the returning block.
* Please use the format-independent ReadRowsResponse.row_count instead.
* </pre>
*
* <code>int64 row_count = 2;</code>
* <code>int64 row_count = 2 [deprecated = true];</code>
*
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder clearRowCount() {

rowCount_ = 0L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,14 @@ public interface AvroRowsOrBuilder
*
*
* <pre>
* The count of rows in the returning block.
* [Deprecated] The count of rows in the returning block.
* Please use the format-independent ReadRowsResponse.row_count instead.
* </pre>
*
* <code>int64 row_count = 2;</code>
* <code>int64 row_count = 2 [deprecated = true];</code>
*
* @return The rowCount.
*/
@java.lang.Deprecated
long getRowCount();
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,8 +39,9 @@ message ArrowRecordBatch {
// IPC-serialized Arrow RecordBatch.
bytes serialized_record_batch = 1;

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

// Contains options specific to Arrow Serialization.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,6 +35,7 @@ message AvroRows {
// Binary serialized rows in a block.
bytes serialized_binary_rows = 1;

// The count of rows in the returning block.
int64 row_count = 2;
// [Deprecated] The count of rows in the returning block.
// Please use the format-independent ReadRowsResponse.row_count instead.
int64 row_count = 2 [deprecated = true];
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 6f415f6

Please sign in to comment.