From d910a8903d0eed6e8a8a4b7183dc7a0f401f66da Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 18 May 2021 11:28:48 -0700 Subject: [PATCH] feat: Add ZSTD compression as an option for Arrow proto changes * feat: Add ZSTD compression as an option for Arrow. Committer: @emkornfield PiperOrigin-RevId: 374220891 Source-Author: Google APIs Source-Date: Mon May 17 10:03:14 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 23efea9fc7bedfe53b24295ed84b5f873606edcb Source-Link: https://github.com/googleapis/googleapis/commit/23efea9fc7bedfe53b24295ed84b5f873606edcb * chore: release gapic-generator-java v1.0.5 Committer: @miraleung PiperOrigin-RevId: 374252908 Source-Author: Google APIs Source-Date: Mon May 17 12:23:32 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 131ae3e375c05856d7d77cd146dc2af92650eb38 Source-Link: https://github.com/googleapis/googleapis/commit/131ae3e375c05856d7d77cd146dc2af92650eb38 --- .../v1beta1/BaseBigQueryStorageClient.java | 37 ++- .../BaseBigQueryStorageClientTest.java | 48 +++- .../cloud/bigquery/storage/v1/ArrowProto.java | 17 +- .../storage/v1/ArrowSerializationOptions.java | 22 ++ .../bigquery/storage/v1/ReadSession.java | 210 ++++++++++++------ .../storage/v1/ReadSessionOrBuilder.java | 30 +-- .../cloud/bigquery/storage/v1/arrow.proto | 3 + .../cloud/bigquery/storage/v1/storage.proto | 6 +- .../cloud/bigquery/storage/v1/stream.proto | 22 +- synth.metadata | 12 +- 10 files changed, 275 insertions(+), 132 deletions(-) diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java index d2a88c41ab..9635b98383 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClient.java @@ -263,8 +263,13 @@ public final Storage.ReadSession createReadSession( * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) { * Storage.CreateReadSessionRequest request = * Storage.CreateReadSessionRequest.newBuilder() + * .setTableReference(TableReferenceProto.TableReference.newBuilder().build()) * .setParent(ProjectName.of("[PROJECT]").toString()) + * .setTableModifiers(TableReferenceProto.TableModifiers.newBuilder().build()) * .setRequestedStreams(1017221410) + * .setReadOptions(ReadOptions.TableReadOptions.newBuilder().build()) + * .setFormat(Storage.DataFormat.forNumber(0)) + * .setShardingStrategy(Storage.ShardingStrategy.forNumber(0)) * .build(); * Storage.ReadSession response = baseBigQueryStorageClient.createReadSession(request); * } @@ -296,8 +301,13 @@ public final Storage.ReadSession createReadSession(Storage.CreateReadSessionRequ * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) { * Storage.CreateReadSessionRequest request = * Storage.CreateReadSessionRequest.newBuilder() + * .setTableReference(TableReferenceProto.TableReference.newBuilder().build()) * .setParent(ProjectName.of("[PROJECT]").toString()) + * .setTableModifiers(TableReferenceProto.TableModifiers.newBuilder().build()) * .setRequestedStreams(1017221410) + * .setReadOptions(ReadOptions.TableReadOptions.newBuilder().build()) + * .setFormat(Storage.DataFormat.forNumber(0)) + * .setShardingStrategy(Storage.ShardingStrategy.forNumber(0)) * .build(); * ApiFuture future = * baseBigQueryStorageClient.createReadSessionCallable().futureCall(request); @@ -326,7 +336,10 @@ public final Storage.ReadSession createReadSession(Storage.CreateReadSessionRequ * *
{@code
    * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
-   *   Storage.ReadRowsRequest request = Storage.ReadRowsRequest.newBuilder().build();
+   *   Storage.ReadRowsRequest request =
+   *       Storage.ReadRowsRequest.newBuilder()
+   *           .setReadPosition(Storage.StreamPosition.newBuilder().build())
+   *           .build();
    *   ServerStream stream =
    *       baseBigQueryStorageClient.readRowsCallable().call(request);
    *   for (Storage.ReadRowsResponse response : stream) {
@@ -383,6 +396,7 @@ public final Storage.BatchCreateReadSessionStreamsResponse batchCreateReadSessio
    * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
    *   Storage.BatchCreateReadSessionStreamsRequest request =
    *       Storage.BatchCreateReadSessionStreamsRequest.newBuilder()
+   *           .setSession(Storage.ReadSession.newBuilder().build())
    *           .setRequestedStreams(1017221410)
    *           .build();
    *   Storage.BatchCreateReadSessionStreamsResponse response =
@@ -409,6 +423,7 @@ public final Storage.BatchCreateReadSessionStreamsResponse batchCreateReadSessio
    * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
    *   Storage.BatchCreateReadSessionStreamsRequest request =
    *       Storage.BatchCreateReadSessionStreamsRequest.newBuilder()
+   *           .setSession(Storage.ReadSession.newBuilder().build())
    *           .setRequestedStreams(1017221410)
    *           .build();
    *   ApiFuture future =
@@ -475,7 +490,10 @@ public final void finalizeStream(Storage.Stream stream) {
    *
    * 
{@code
    * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
-   *   Storage.FinalizeStreamRequest request = Storage.FinalizeStreamRequest.newBuilder().build();
+   *   Storage.FinalizeStreamRequest request =
+   *       Storage.FinalizeStreamRequest.newBuilder()
+   *           .setStream(Storage.Stream.newBuilder().build())
+   *           .build();
    *   baseBigQueryStorageClient.finalizeStream(request);
    * }
    * }
@@ -505,7 +523,10 @@ public final void finalizeStream(Storage.FinalizeStreamRequest request) { * *
{@code
    * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
-   *   Storage.FinalizeStreamRequest request = Storage.FinalizeStreamRequest.newBuilder().build();
+   *   Storage.FinalizeStreamRequest request =
+   *       Storage.FinalizeStreamRequest.newBuilder()
+   *           .setStream(Storage.Stream.newBuilder().build())
+   *           .build();
    *   ApiFuture future =
    *       baseBigQueryStorageClient.finalizeStreamCallable().futureCall(request);
    *   // Do something.
@@ -569,7 +590,10 @@ public final Storage.SplitReadStreamResponse splitReadStream(Storage.Stream orig
    * 
{@code
    * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
    *   Storage.SplitReadStreamRequest request =
-   *       Storage.SplitReadStreamRequest.newBuilder().setFraction(-1653751294).build();
+   *       Storage.SplitReadStreamRequest.newBuilder()
+   *           .setOriginalStream(Storage.Stream.newBuilder().build())
+   *           .setFraction(-1653751294)
+   *           .build();
    *   Storage.SplitReadStreamResponse response = baseBigQueryStorageClient.splitReadStream(request);
    * }
    * }
@@ -601,7 +625,10 @@ public final Storage.SplitReadStreamResponse splitReadStream( *
{@code
    * try (BaseBigQueryStorageClient baseBigQueryStorageClient = BaseBigQueryStorageClient.create()) {
    *   Storage.SplitReadStreamRequest request =
-   *       Storage.SplitReadStreamRequest.newBuilder().setFraction(-1653751294).build();
+   *       Storage.SplitReadStreamRequest.newBuilder()
+   *           .setOriginalStream(Storage.Stream.newBuilder().build())
+   *           .setFraction(-1653751294)
+   *           .build();
    *   ApiFuture future =
    *       baseBigQueryStorageClient.splitReadStreamCallable().futureCall(request);
    *   // Do something.
diff --git a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClientTest.java b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClientTest.java
index 256e3a4f77..90b350d63b 100644
--- a/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClientTest.java
+++ b/google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1beta1/BaseBigQueryStorageClientTest.java
@@ -28,8 +28,10 @@
 import com.google.api.gax.rpc.StatusCode;
 import com.google.protobuf.AbstractMessage;
 import com.google.protobuf.Empty;
+import com.google.protobuf.Timestamp;
 import io.grpc.StatusRuntimeException;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import java.util.UUID;
@@ -82,7 +84,15 @@ public void tearDown() throws Exception {
 
   @Test
   public void createReadSessionTest() throws Exception {
-    Storage.ReadSession expectedResponse = Storage.ReadSession.newBuilder().build();
+    Storage.ReadSession expectedResponse =
+        Storage.ReadSession.newBuilder()
+            .setName(ReadSessionName.of("[PROJECT]", "[LOCATION]", "[SESSION]").toString())
+            .setExpireTime(Timestamp.newBuilder().build())
+            .addAllStreams(new ArrayList())
+            .setTableReference(TableReferenceProto.TableReference.newBuilder().build())
+            .setTableModifiers(TableReferenceProto.TableModifiers.newBuilder().build())
+            .setShardingStrategy(Storage.ShardingStrategy.forNumber(0))
+            .build();
     mockBigQueryStorage.addResponse(expectedResponse);
 
     TableReferenceProto.TableReference tableReference =
@@ -127,7 +137,15 @@ public void createReadSessionExceptionTest() throws Exception {
 
   @Test
   public void createReadSessionTest2() throws Exception {
-    Storage.ReadSession expectedResponse = Storage.ReadSession.newBuilder().build();
+    Storage.ReadSession expectedResponse =
+        Storage.ReadSession.newBuilder()
+            .setName(ReadSessionName.of("[PROJECT]", "[LOCATION]", "[SESSION]").toString())
+            .setExpireTime(Timestamp.newBuilder().build())
+            .addAllStreams(new ArrayList())
+            .setTableReference(TableReferenceProto.TableReference.newBuilder().build())
+            .setTableModifiers(TableReferenceProto.TableModifiers.newBuilder().build())
+            .setShardingStrategy(Storage.ShardingStrategy.forNumber(0))
+            .build();
     mockBigQueryStorage.addResponse(expectedResponse);
 
     TableReferenceProto.TableReference tableReference =
@@ -172,9 +190,17 @@ public void createReadSessionExceptionTest2() throws Exception {
 
   @Test
   public void readRowsTest() throws Exception {
-    Storage.ReadRowsResponse expectedResponse = Storage.ReadRowsResponse.newBuilder().build();
+    Storage.ReadRowsResponse expectedResponse =
+        Storage.ReadRowsResponse.newBuilder()
+            .setRowCount(1340416618)
+            .setStatus(Storage.StreamStatus.newBuilder().build())
+            .setThrottleStatus(Storage.ThrottleStatus.newBuilder().build())
+            .build();
     mockBigQueryStorage.addResponse(expectedResponse);
-    Storage.ReadRowsRequest request = Storage.ReadRowsRequest.newBuilder().build();
+    Storage.ReadRowsRequest request =
+        Storage.ReadRowsRequest.newBuilder()
+            .setReadPosition(Storage.StreamPosition.newBuilder().build())
+            .build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -191,7 +217,10 @@ public void readRowsTest() throws Exception {
   public void readRowsExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
     mockBigQueryStorage.addException(exception);
-    Storage.ReadRowsRequest request = Storage.ReadRowsRequest.newBuilder().build();
+    Storage.ReadRowsRequest request =
+        Storage.ReadRowsRequest.newBuilder()
+            .setReadPosition(Storage.StreamPosition.newBuilder().build())
+            .build();
 
     MockStreamObserver responseObserver = new MockStreamObserver<>();
 
@@ -212,7 +241,9 @@ public void readRowsExceptionTest() throws Exception {
   @Test
   public void batchCreateReadSessionStreamsTest() throws Exception {
     Storage.BatchCreateReadSessionStreamsResponse expectedResponse =
-        Storage.BatchCreateReadSessionStreamsResponse.newBuilder().build();
+        Storage.BatchCreateReadSessionStreamsResponse.newBuilder()
+            .addAllStreams(new ArrayList())
+            .build();
     mockBigQueryStorage.addResponse(expectedResponse);
 
     Storage.ReadSession session = Storage.ReadSession.newBuilder().build();
@@ -288,7 +319,10 @@ public void finalizeStreamExceptionTest() throws Exception {
   @Test
   public void splitReadStreamTest() throws Exception {
     Storage.SplitReadStreamResponse expectedResponse =
-        Storage.SplitReadStreamResponse.newBuilder().build();
+        Storage.SplitReadStreamResponse.newBuilder()
+            .setPrimaryStream(Storage.Stream.newBuilder().build())
+            .setRemainderStream(Storage.Stream.newBuilder().build())
+            .build();
     mockBigQueryStorage.addResponse(expectedResponse);
 
     Storage.Stream originalStream = Storage.Stream.newBuilder().build();
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 8a8bbd38ca..2d8668eb89 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
@@ -52,17 +52,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + ".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\"\305\001\n\031A"
+          + "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\">\n\020CompressionCodec\022\033\n\027COMPRE"
-          + "SSION_UNSPECIFIED\020\000\022\r\n\tLZ4_FRAME\020\001B\303\001\n$c"
-          + "om.google.cloud.bigquery.storage.v1B\nArr"
-          + "owProtoP\001ZGgoogle.golang.org/genproto/go"
-          + "ogleapis/cloud/bigquery/storage/v1;stora"
-          + "ge\252\002 Google.Cloud.BigQuery.Storage.V1\312\002 "
-          + "Google\\Cloud\\BigQuery\\Storage\\V1b\006proto3"
+          + "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"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowSerializationOptions.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowSerializationOptions.java
index 68d68b8d3f..114be6109e 100644
--- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowSerializationOptions.java
+++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ArrowSerializationOptions.java
@@ -142,6 +142,16 @@ public enum CompressionCodec implements com.google.protobuf.ProtocolMessageEnum
      * LZ4_FRAME = 1;
      */
     LZ4_FRAME(1),
+    /**
+     *
+     *
+     * 
+     * Zstandard compression.
+     * 
+ * + * ZSTD = 2; + */ + ZSTD(2), UNRECOGNIZED(-1), ; @@ -165,6 +175,16 @@ public enum CompressionCodec implements com.google.protobuf.ProtocolMessageEnum * LZ4_FRAME = 1; */ public static final int LZ4_FRAME_VALUE = 1; + /** + * + * + *
+     * Zstandard compression.
+     * 
+ * + * ZSTD = 2; + */ + public static final int ZSTD_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -194,6 +214,8 @@ public static CompressionCodec forNumber(int value) { return COMPRESSION_UNSPECIFIED; case 1: return LZ4_FRAME; + case 2: + return ZSTD; default: return null; } diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSession.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSession.java index 05361cab45..3ac0174b58 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSession.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSession.java @@ -1105,6 +1105,12 @@ public interface TableReadOptionsOrBuilder com.google.protobuf.ByteString getRowRestrictionBytes(); /** + * + * + *
+     * Optional. Options specific to the Apache Arrow output format.
+     * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -1113,6 +1119,12 @@ public interface TableReadOptionsOrBuilder */ boolean hasArrowSerializationOptions(); /** + * + * + *
+     * Optional. Options specific to the Apache Arrow output format.
+     * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -1121,6 +1133,12 @@ public interface TableReadOptionsOrBuilder */ com.google.cloud.bigquery.storage.v1.ArrowSerializationOptions getArrowSerializationOptions(); /** + * + * + *
+     * Optional. Options specific to the Apache Arrow output format.
+     * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -1445,6 +1463,12 @@ public com.google.protobuf.ByteString getRowRestrictionBytes() { public static final int ARROW_SERIALIZATION_OPTIONS_FIELD_NUMBER = 3; /** + * + * + *
+     * Optional. Options specific to the Apache Arrow output format.
+     * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -1456,6 +1480,12 @@ public boolean hasArrowSerializationOptions() { return outputFormatSerializationOptionsCase_ == 3; } /** + * + * + *
+     * Optional. Options specific to the Apache Arrow output format.
+     * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -1472,6 +1502,12 @@ public boolean hasArrowSerializationOptions() { return com.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.getDefaultInstance(); } /** + * + * + *
+     * Optional. Options specific to the Apache Arrow output format.
+     * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -2262,6 +2298,12 @@ public Builder setRowRestrictionBytes(com.google.protobuf.ByteString value) { com.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsOrBuilder> arrowSerializationOptionsBuilder_; /** + * + * + *
+       * Optional. Options specific to the Apache Arrow output format.
+       * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -2273,6 +2315,12 @@ public boolean hasArrowSerializationOptions() { return outputFormatSerializationOptionsCase_ == 3; } /** + * + * + *
+       * Optional. Options specific to the Apache Arrow output format.
+       * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -2298,6 +2346,12 @@ public boolean hasArrowSerializationOptions() { } } /** + * + * + *
+       * Optional. Options specific to the Apache Arrow output format.
+       * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -2317,6 +2371,12 @@ public Builder setArrowSerializationOptions( return this; } /** + * + * + *
+       * Optional. Options specific to the Apache Arrow output format.
+       * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -2333,6 +2393,12 @@ public Builder setArrowSerializationOptions( return this; } /** + * + * + *
+       * Optional. Options specific to the Apache Arrow output format.
+       * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -2364,6 +2430,12 @@ public Builder mergeArrowSerializationOptions( return this; } /** + * + * + *
+       * Optional. Options specific to the Apache Arrow output format.
+       * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -2385,6 +2457,12 @@ public Builder clearArrowSerializationOptions() { return this; } /** + * + * + *
+       * Optional. Options specific to the Apache Arrow output format.
+       * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -2394,6 +2472,12 @@ public Builder clearArrowSerializationOptions() { return getArrowSerializationOptionsFieldBuilder().getBuilder(); } /** + * + * + *
+       * Optional. Options specific to the Apache Arrow output format.
+       * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -2414,6 +2498,12 @@ public Builder clearArrowSerializationOptions() { } } /** + * + * + *
+       * Optional. Options specific to the Apache Arrow output format.
+       * 
+ * * * .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; * @@ -2604,10 +2694,9 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Output only. Time at which the session becomes invalid. After this time,
-   * subsequent requests to read this Session will return errors. The
-   * expire_time is automatically assigned and currently cannot be specified or
-   * updated.
+   * Output only. Time at which the session becomes invalid. After this time, subsequent
+   * requests to read this Session will return errors. The expire_time is
+   * automatically assigned and currently cannot be specified or updated.
    * 
* * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2623,10 +2712,9 @@ public boolean hasExpireTime() { * * *
-   * Output only. Time at which the session becomes invalid. After this time,
-   * subsequent requests to read this Session will return errors. The
-   * expire_time is automatically assigned and currently cannot be specified or
-   * updated.
+   * Output only. Time at which the session becomes invalid. After this time, subsequent
+   * requests to read this Session will return errors. The expire_time is
+   * automatically assigned and currently cannot be specified or updated.
    * 
* * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2642,10 +2730,9 @@ public com.google.protobuf.Timestamp getExpireTime() { * * *
-   * Output only. Time at which the session becomes invalid. After this time,
-   * subsequent requests to read this Session will return errors. The
-   * expire_time is automatically assigned and currently cannot be specified or
-   * updated.
+   * Output only. Time at which the session becomes invalid. After this time, subsequent
+   * requests to read this Session will return errors. The expire_time is
+   * automatically assigned and currently cannot be specified or updated.
    * 
* * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2871,8 +2958,7 @@ public com.google.protobuf.ByteString getTableBytes() { * * *
-   * Optional. Any modifiers which are applied when reading from the specified
-   * table.
+   * Optional. Any modifiers which are applied when reading from the specified table.
    * 
* * @@ -2889,8 +2975,7 @@ public boolean hasTableModifiers() { * * *
-   * Optional. Any modifiers which are applied when reading from the specified
-   * table.
+   * Optional. Any modifiers which are applied when reading from the specified table.
    * 
* * @@ -2909,8 +2994,7 @@ public com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers getTableM * * *
-   * Optional. Any modifiers which are applied when reading from the specified
-   * table.
+   * Optional. Any modifiers which are applied when reading from the specified table.
    * 
* * @@ -3776,10 +3860,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Output only. Time at which the session becomes invalid. After this time,
-     * subsequent requests to read this Session will return errors. The
-     * expire_time is automatically assigned and currently cannot be specified or
-     * updated.
+     * Output only. Time at which the session becomes invalid. After this time, subsequent
+     * requests to read this Session will return errors. The expire_time is
+     * automatically assigned and currently cannot be specified or updated.
      * 
* * @@ -3795,10 +3878,9 @@ public boolean hasExpireTime() { * * *
-     * Output only. Time at which the session becomes invalid. After this time,
-     * subsequent requests to read this Session will return errors. The
-     * expire_time is automatically assigned and currently cannot be specified or
-     * updated.
+     * Output only. Time at which the session becomes invalid. After this time, subsequent
+     * requests to read this Session will return errors. The expire_time is
+     * automatically assigned and currently cannot be specified or updated.
      * 
* * @@ -3820,10 +3902,9 @@ public com.google.protobuf.Timestamp getExpireTime() { * * *
-     * Output only. Time at which the session becomes invalid. After this time,
-     * subsequent requests to read this Session will return errors. The
-     * expire_time is automatically assigned and currently cannot be specified or
-     * updated.
+     * Output only. Time at which the session becomes invalid. After this time, subsequent
+     * requests to read this Session will return errors. The expire_time is
+     * automatically assigned and currently cannot be specified or updated.
      * 
* * @@ -3847,10 +3928,9 @@ public Builder setExpireTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Time at which the session becomes invalid. After this time,
-     * subsequent requests to read this Session will return errors. The
-     * expire_time is automatically assigned and currently cannot be specified or
-     * updated.
+     * Output only. Time at which the session becomes invalid. After this time, subsequent
+     * requests to read this Session will return errors. The expire_time is
+     * automatically assigned and currently cannot be specified or updated.
      * 
* * @@ -3871,10 +3951,9 @@ public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. Time at which the session becomes invalid. After this time,
-     * subsequent requests to read this Session will return errors. The
-     * expire_time is automatically assigned and currently cannot be specified or
-     * updated.
+     * Output only. Time at which the session becomes invalid. After this time, subsequent
+     * requests to read this Session will return errors. The expire_time is
+     * automatically assigned and currently cannot be specified or updated.
      * 
* * @@ -3900,10 +3979,9 @@ public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. Time at which the session becomes invalid. After this time,
-     * subsequent requests to read this Session will return errors. The
-     * expire_time is automatically assigned and currently cannot be specified or
-     * updated.
+     * Output only. Time at which the session becomes invalid. After this time, subsequent
+     * requests to read this Session will return errors. The expire_time is
+     * automatically assigned and currently cannot be specified or updated.
      * 
* * @@ -3925,10 +4003,9 @@ public Builder clearExpireTime() { * * *
-     * Output only. Time at which the session becomes invalid. After this time,
-     * subsequent requests to read this Session will return errors. The
-     * expire_time is automatically assigned and currently cannot be specified or
-     * updated.
+     * Output only. Time at which the session becomes invalid. After this time, subsequent
+     * requests to read this Session will return errors. The expire_time is
+     * automatically assigned and currently cannot be specified or updated.
      * 
* * @@ -3944,10 +4021,9 @@ public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { * * *
-     * Output only. Time at which the session becomes invalid. After this time,
-     * subsequent requests to read this Session will return errors. The
-     * expire_time is automatically assigned and currently cannot be specified or
-     * updated.
+     * Output only. Time at which the session becomes invalid. After this time, subsequent
+     * requests to read this Session will return errors. The expire_time is
+     * automatically assigned and currently cannot be specified or updated.
      * 
* * @@ -3967,10 +4043,9 @@ public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { * * *
-     * Output only. Time at which the session becomes invalid. After this time,
-     * subsequent requests to read this Session will return errors. The
-     * expire_time is automatically assigned and currently cannot be specified or
-     * updated.
+     * Output only. Time at which the session becomes invalid. After this time, subsequent
+     * requests to read this Session will return errors. The expire_time is
+     * automatically assigned and currently cannot be specified or updated.
      * 
* * @@ -4680,8 +4755,7 @@ public Builder setTableBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. Any modifiers which are applied when reading from the specified
-     * table.
+     * Optional. Any modifiers which are applied when reading from the specified table.
      * 
* * @@ -4697,8 +4771,7 @@ public boolean hasTableModifiers() { * * *
-     * Optional. Any modifiers which are applied when reading from the specified
-     * table.
+     * Optional. Any modifiers which are applied when reading from the specified table.
      * 
* * @@ -4720,8 +4793,7 @@ public com.google.cloud.bigquery.storage.v1.ReadSession.TableModifiers getTableM * * *
-     * Optional. Any modifiers which are applied when reading from the specified
-     * table.
+     * Optional. Any modifiers which are applied when reading from the specified table.
      * 
* * @@ -4746,8 +4818,7 @@ public Builder setTableModifiers( * * *
-     * Optional. Any modifiers which are applied when reading from the specified
-     * table.
+     * Optional. Any modifiers which are applied when reading from the specified table.
      * 
* * @@ -4769,8 +4840,7 @@ public Builder setTableModifiers( * * *
-     * Optional. Any modifiers which are applied when reading from the specified
-     * table.
+     * Optional. Any modifiers which are applied when reading from the specified table.
      * 
* * @@ -4800,8 +4870,7 @@ public Builder mergeTableModifiers( * * *
-     * Optional. Any modifiers which are applied when reading from the specified
-     * table.
+     * Optional. Any modifiers which are applied when reading from the specified table.
      * 
* * @@ -4823,8 +4892,7 @@ public Builder clearTableModifiers() { * * *
-     * Optional. Any modifiers which are applied when reading from the specified
-     * table.
+     * Optional. Any modifiers which are applied when reading from the specified table.
      * 
* * @@ -4841,8 +4909,7 @@ public Builder clearTableModifiers() { * * *
-     * Optional. Any modifiers which are applied when reading from the specified
-     * table.
+     * Optional. Any modifiers which are applied when reading from the specified table.
      * 
* * @@ -4863,8 +4930,7 @@ public Builder clearTableModifiers() { * * *
-     * Optional. Any modifiers which are applied when reading from the specified
-     * table.
+     * Optional. Any modifiers which are applied when reading from the specified table.
      * 
* * diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSessionOrBuilder.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSessionOrBuilder.java index a0cc397c6c..2af6e67b90 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSessionOrBuilder.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/ReadSessionOrBuilder.java @@ -54,10 +54,9 @@ public interface ReadSessionOrBuilder * * *
-   * Output only. Time at which the session becomes invalid. After this time,
-   * subsequent requests to read this Session will return errors. The
-   * expire_time is automatically assigned and currently cannot be specified or
-   * updated.
+   * Output only. Time at which the session becomes invalid. After this time, subsequent
+   * requests to read this Session will return errors. The expire_time is
+   * automatically assigned and currently cannot be specified or updated.
    * 
* * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -70,10 +69,9 @@ public interface ReadSessionOrBuilder * * *
-   * Output only. Time at which the session becomes invalid. After this time,
-   * subsequent requests to read this Session will return errors. The
-   * expire_time is automatically assigned and currently cannot be specified or
-   * updated.
+   * Output only. Time at which the session becomes invalid. After this time, subsequent
+   * requests to read this Session will return errors. The expire_time is
+   * automatically assigned and currently cannot be specified or updated.
    * 
* * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -86,10 +84,9 @@ public interface ReadSessionOrBuilder * * *
-   * Output only. Time at which the session becomes invalid. After this time,
-   * subsequent requests to read this Session will return errors. The
-   * expire_time is automatically assigned and currently cannot be specified or
-   * updated.
+   * Output only. Time at which the session becomes invalid. After this time, subsequent
+   * requests to read this Session will return errors. The expire_time is
+   * automatically assigned and currently cannot be specified or updated.
    * 
* * .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -243,8 +240,7 @@ public interface ReadSessionOrBuilder * * *
-   * Optional. Any modifiers which are applied when reading from the specified
-   * table.
+   * Optional. Any modifiers which are applied when reading from the specified table.
    * 
* * @@ -258,8 +254,7 @@ public interface ReadSessionOrBuilder * * *
-   * Optional. Any modifiers which are applied when reading from the specified
-   * table.
+   * Optional. Any modifiers which are applied when reading from the specified table.
    * 
* * @@ -273,8 +268,7 @@ public interface ReadSessionOrBuilder * * *
-   * Optional. Any modifiers which are applied when reading from the specified
-   * table.
+   * Optional. Any modifiers which are applied when reading from the specified table.
    * 
* * 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 4b240f5213..514b77e617 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 @@ -52,6 +52,9 @@ message ArrowSerializationOptions { // LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md) LZ4_FRAME = 1; + + // Zstandard compression. + ZSTD = 2; } // The compression codec to use for Arrow buffers in serialized record diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/storage.proto b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/storage.proto index a5fa2b9eb8..8ac5637504 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/storage.proto +++ b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/storage.proto @@ -69,8 +69,7 @@ service BigQueryRead { post: "/v1/{read_session.table=projects/*/datasets/*/tables/*}" body: "*" }; - option (google.api.method_signature) = - "parent,read_session,max_stream_count"; + option (google.api.method_signature) = "parent,read_session,max_stream_count"; } // Reads rows from the stream in the format prescribed by the ReadSession. @@ -99,8 +98,7 @@ service BigQueryRead { // original, primary, and residual, that original[0-j] = primary[0-j] and // original[j-n] = residual[0-m] once the streams have been read to // completion. - rpc SplitReadStream(SplitReadStreamRequest) - returns (SplitReadStreamResponse) { + rpc SplitReadStream(SplitReadStreamRequest) returns (SplitReadStreamResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/sessions/*/streams/*}" }; diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/stream.proto b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/stream.proto index 28b2ac1bbf..291cf4115b 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/stream.proto +++ b/proto-google-cloud-bigquerystorage-v1/src/main/proto/google/cloud/bigquery/storage/v1/stream.proto @@ -75,10 +75,9 @@ message ReadSession { // Restricted to a maximum length for 1 MB. string row_restriction = 2; - // Optional. Options specific to the Apache Arrow output format. oneof output_format_serialization_options { - ArrowSerializationOptions arrow_serialization_options = 3 - [(google.api.field_behavior) = OPTIONAL]; + // Optional. Options specific to the Apache Arrow output format. + ArrowSerializationOptions arrow_serialization_options = 3 [(google.api.field_behavior) = OPTIONAL]; } } @@ -86,12 +85,10 @@ message ReadSession { // `projects/{project_id}/locations/{location}/sessions/{session_id}`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Time at which the session becomes invalid. After this time, - // subsequent requests to read this Session will return errors. The - // expire_time is automatically assigned and currently cannot be specified or - // updated. - google.protobuf.Timestamp expire_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Time at which the session becomes invalid. After this time, subsequent + // requests to read this Session will return errors. The expire_time is + // automatically assigned and currently cannot be specified or updated. + google.protobuf.Timestamp expire_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Immutable. Data format of the output data. DataFormat data_format = 3 [(google.api.field_behavior) = IMMUTABLE]; @@ -111,11 +108,12 @@ message ReadSession { // `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` string table = 6 [ (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { type: "bigquery.googleapis.com/Table" } + (google.api.resource_reference) = { + type: "bigquery.googleapis.com/Table" + } ]; - // Optional. Any modifiers which are applied when reading from the specified - // table. + // Optional. Any modifiers which are applied when reading from the specified table. TableModifiers table_modifiers = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Read options for this session (e.g. column selection, filters). diff --git a/synth.metadata b/synth.metadata index 9961a2491a..d9be74c562 100644 --- a/synth.metadata +++ b/synth.metadata @@ -18,24 +18,24 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "95e7f055087a43f638ffd9a0f25ce36dbea87953", - "internalRef": "368275477" + "sha": "131ae3e375c05856d7d77cd146dc2af92650eb38", + "internalRef": "374252908" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "95e7f055087a43f638ffd9a0f25ce36dbea87953", - "internalRef": "368275477" + "sha": "131ae3e375c05856d7d77cd146dc2af92650eb38", + "internalRef": "374252908" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "95e7f055087a43f638ffd9a0f25ce36dbea87953", - "internalRef": "368275477" + "sha": "131ae3e375c05856d7d77cd146dc2af92650eb38", + "internalRef": "374252908" } }, {