Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Deprecate format specific row_count field in Read API #1599

Merged
merged 4 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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