From 6f415f62685549f50f7382bc7d896e5f60c5285e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 31 Mar 2022 10:53:47 -0400 Subject: [PATCH] feat: Deprecate format specific `row_count` field in Read API (#1599) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Deprecate format specific `row_count` field in Read API PiperOrigin-RevId: 438434001 Source-Link: https://github.com/googleapis/googleapis/commit/727f08ba466745c17f71cd2084540878392de31d 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 --- .../cloud/bigquery/storage/v1/ArrowProto.java | 26 +++++++++---------- .../bigquery/storage/v1/ArrowRecordBatch.java | 24 +++++++++++------ .../storage/v1/ArrowRecordBatchOrBuilder.java | 6 +++-- .../cloud/bigquery/storage/v1/AvroProto.java | 16 ++++++------ .../cloud/bigquery/storage/v1/AvroRows.java | 24 +++++++++++------ .../storage/v1/AvroRowsOrBuilder.java | 6 +++-- .../cloud/bigquery/storage/v1/arrow.proto | 7 ++--- .../cloud/bigquery/storage/v1/avro.proto | 7 ++--- .../cloud/bigquery/storage/v1/protobuf.proto | 2 +- .../cloud/bigquery/storage/v1/table.proto | 2 +- 10 files changed, 71 insertions(+), 49 deletions(-) diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowProto.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowProto.java index 2d8668eb89..28d4e93718 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowProto.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowProto.java @@ -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( diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowRecordBatch.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowRecordBatch.java index 3a27b22f02..db0f736b63 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowRecordBatch.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowRecordBatch.java @@ -138,14 +138,16 @@ public com.google.protobuf.ByteString getSerializedRecordBatch() { * * *
-   * 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.
    * 
* - * int64 row_count = 2; + * int64 row_count = 2 [deprecated = true]; * * @return The rowCount. */ @java.lang.Override + @java.lang.Deprecated public long getRowCount() { return rowCount_; } @@ -544,14 +546,16 @@ public Builder clearSerializedRecordBatch() { * * *
-     * 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.
      * 
* - * int64 row_count = 2; + * int64 row_count = 2 [deprecated = true]; * * @return The rowCount. */ @java.lang.Override + @java.lang.Deprecated public long getRowCount() { return rowCount_; } @@ -559,14 +563,16 @@ public long getRowCount() { * * *
-     * 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.
      * 
* - * int64 row_count = 2; + * int64 row_count = 2 [deprecated = true]; * * @param value The rowCount to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setRowCount(long value) { rowCount_ = value; @@ -577,13 +583,15 @@ public Builder setRowCount(long value) { * * *
-     * 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.
      * 
* - * int64 row_count = 2; + * int64 row_count = 2 [deprecated = true]; * * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearRowCount() { rowCount_ = 0L; diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowRecordBatchOrBuilder.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowRecordBatchOrBuilder.java index b6a38ab736..2f16c34994 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowRecordBatchOrBuilder.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowRecordBatchOrBuilder.java @@ -40,12 +40,14 @@ public interface ArrowRecordBatchOrBuilder * * *
-   * 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.
    * 
* - * int64 row_count = 2; + * int64 row_count = 2 [deprecated = true]; * * @return The rowCount. */ + @java.lang.Deprecated long getRowCount(); } diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroProto.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroProto.java index 6bbd426c70..6d1f8bdc62 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroProto.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroProto.java @@ -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( diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRows.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRows.java index 6d31557539..ab507b6b8c 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRows.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRows.java @@ -138,14 +138,16 @@ public com.google.protobuf.ByteString getSerializedBinaryRows() { * * *
-   * 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.
    * 
* - * int64 row_count = 2; + * int64 row_count = 2 [deprecated = true]; * * @return The rowCount. */ @java.lang.Override + @java.lang.Deprecated public long getRowCount() { return rowCount_; } @@ -541,14 +543,16 @@ public Builder clearSerializedBinaryRows() { * * *
-     * 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.
      * 
* - * int64 row_count = 2; + * int64 row_count = 2 [deprecated = true]; * * @return The rowCount. */ @java.lang.Override + @java.lang.Deprecated public long getRowCount() { return rowCount_; } @@ -556,14 +560,16 @@ public long getRowCount() { * * *
-     * 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.
      * 
* - * int64 row_count = 2; + * int64 row_count = 2 [deprecated = true]; * * @param value The rowCount to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setRowCount(long value) { rowCount_ = value; @@ -574,13 +580,15 @@ public Builder setRowCount(long value) { * * *
-     * 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.
      * 
* - * int64 row_count = 2; + * int64 row_count = 2 [deprecated = true]; * * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearRowCount() { rowCount_ = 0L; diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRowsOrBuilder.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRowsOrBuilder.java index 27cd68e6fc..9df651bc69 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRowsOrBuilder.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AvroRowsOrBuilder.java @@ -40,12 +40,14 @@ public interface AvroRowsOrBuilder * * *
-   * 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.
    * 
* - * int64 row_count = 2; + * int64 row_count = 2 [deprecated = true]; * * @return The rowCount. */ + @java.lang.Deprecated long getRowCount(); } diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/arrow.proto b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/arrow.proto index 514b77e617..6d3f6080bf 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/arrow.proto +++ b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/arrow.proto @@ -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. @@ -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. diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/avro.proto b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/avro.proto index dee4a6ed22..15de2db546 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/avro.proto +++ b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/avro.proto @@ -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. @@ -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]; } diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/protobuf.proto b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/protobuf.proto index f987467dd9..b3754acf7b 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/protobuf.proto +++ b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/protobuf.proto @@ -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. diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/table.proto b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/table.proto index a8c6f844df..545f629271 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/table.proto +++ b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/table.proto @@ -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.