From 18faebd3eccf317a67306ebaebc987367fca3627 Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Mon, 14 Oct 2024 09:44:52 -0400 Subject: [PATCH] chore: Update generation configuration at Sun Oct 13 02:27:02 UTC 2024 (#2713) * chore: Update generation configuration at Sat Oct 12 02:22:47 UTC 2024 * chore: generate libraries at Sat Oct 12 02:23:08 UTC 2024 * chore: Update generation configuration at Sun Oct 13 02:27:02 UTC 2024 --- generation_config.yaml | 2 +- .../reflect-config.json | 18 + .../storage/v1/AppendRowsRequest.java | 1434 ++++++++++++++++- .../v1/AppendRowsRequestOrBuilder.java | 38 + .../bigquery/storage/v1/StorageProto.java | 283 ++-- .../cloud/bigquery/storage/v1/storage.proto | 15 + .../ExportOpenTelemetryIT.java | 12 +- 7 files changed, 1642 insertions(+), 160 deletions(-) diff --git a/generation_config.yaml b/generation_config.yaml index 8e5bc60aa5..a924039b01 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.47.0 -googleapis_commitish: de509e38d37a2a9d8b95e1ce78831189f4f3c0f4 +googleapis_commitish: a26064a9cc78d4518b8a9fd2ea78891edad4d87d libraries_bom_version: 26.48.0 libraries: - api_shortname: bigquerystorage diff --git a/google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/com.google.cloud.bigquery.storage.v1/reflect-config.json b/google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/com.google.cloud.bigquery.storage.v1/reflect-config.json index 5f7e4ddcb6..ab8dfd345e 100644 --- a/google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/com.google.cloud.bigquery.storage.v1/reflect-config.json +++ b/google-cloud-bigquerystorage/src/main/resources/META-INF/native-image/com.google.cloud.bigquery.storage.v1/reflect-config.json @@ -404,6 +404,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.bigquery.storage.v1.AppendRowsRequest$ArrowData", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.bigquery.storage.v1.AppendRowsRequest$ArrowData$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.bigquery.storage.v1.AppendRowsRequest$Builder", "queryAllDeclaredConstructors": true, diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AppendRowsRequest.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AppendRowsRequest.java index 1f44ec56c4..b051d68658 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AppendRowsRequest.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AppendRowsRequest.java @@ -254,6 +254,1077 @@ private MissingValueInterpretation(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation) } + public interface ArrowDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Arrow Schema used to serialize the data.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + * + * @return Whether the writerSchema field is set. + */ + boolean hasWriterSchema(); + /** + * + * + *
+     * Optional. Arrow Schema used to serialize the data.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + * + * @return The writerSchema. + */ + com.google.cloud.bigquery.storage.v1.ArrowSchema getWriterSchema(); + /** + * + * + *
+     * Optional. Arrow Schema used to serialize the data.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder getWriterSchemaOrBuilder(); + + /** + * + * + *
+     * Required. Serialized row data in Arrow format.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + * + * @return Whether the rows field is set. + */ + boolean hasRows(); + /** + * + * + *
+     * Required. Serialized row data in Arrow format.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + * + * @return The rows. + */ + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch getRows(); + /** + * + * + *
+     * Required. Serialized row data in Arrow format.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder getRowsOrBuilder(); + } + /** + * + * + *
+   * Arrow schema and data.
+   * Arrow format is an experimental feature only selected for allowlisted
+   * customers.
+   * 
+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData} + */ + public static final class ArrowData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) + ArrowDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use ArrowData.newBuilder() to construct. + private ArrowData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ArrowData() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ArrowData(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ArrowData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ArrowData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.class, + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.Builder.class); + } + + private int bitField0_; + public static final int WRITER_SCHEMA_FIELD_NUMBER = 1; + private com.google.cloud.bigquery.storage.v1.ArrowSchema writerSchema_; + /** + * + * + *
+     * Optional. Arrow Schema used to serialize the data.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + * + * @return Whether the writerSchema field is set. + */ + @java.lang.Override + public boolean hasWriterSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Optional. Arrow Schema used to serialize the data.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + * + * @return The writerSchema. + */ + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.ArrowSchema getWriterSchema() { + return writerSchema_ == null + ? com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance() + : writerSchema_; + } + /** + * + * + *
+     * Optional. Arrow Schema used to serialize the data.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder getWriterSchemaOrBuilder() { + return writerSchema_ == null + ? com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance() + : writerSchema_; + } + + public static final int ROWS_FIELD_NUMBER = 2; + private com.google.cloud.bigquery.storage.v1.ArrowRecordBatch rows_; + /** + * + * + *
+     * Required. Serialized row data in Arrow format.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + * + * @return Whether the rows field is set. + */ + @java.lang.Override + public boolean hasRows() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Serialized row data in Arrow format.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + * + * @return The rows. + */ + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.ArrowRecordBatch getRows() { + return rows_ == null + ? com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance() + : rows_; + } + /** + * + * + *
+     * Required. Serialized row data in Arrow format.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder getRowsOrBuilder() { + return rows_ == null + ? com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance() + : rows_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getWriterSchema()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getRows()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getWriterSchema()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRows()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData)) { + return super.equals(obj); + } + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData other = + (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) obj; + + if (hasWriterSchema() != other.hasWriterSchema()) return false; + if (hasWriterSchema()) { + if (!getWriterSchema().equals(other.getWriterSchema())) return false; + } + if (hasRows() != other.hasRows()) return false; + if (hasRows()) { + if (!getRows().equals(other.getRows())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasWriterSchema()) { + hash = (37 * hash) + WRITER_SCHEMA_FIELD_NUMBER; + hash = (53 * hash) + getWriterSchema().hashCode(); + } + if (hasRows()) { + hash = (37 * hash) + ROWS_FIELD_NUMBER; + hash = (53 * hash) + getRows().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Arrow schema and data.
+     * Arrow format is an experimental feature only selected for allowlisted
+     * customers.
+     * 
+ * + * Protobuf type {@code google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ArrowData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ArrowData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.class, + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.Builder.class); + } + + // Construct using + // com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getWriterSchemaFieldBuilder(); + getRowsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + writerSchema_ = null; + if (writerSchemaBuilder_ != null) { + writerSchemaBuilder_.dispose(); + writerSchemaBuilder_ = null; + } + rows_ = null; + if (rowsBuilder_ != null) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.bigquery.storage.v1.StorageProto + .internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ArrowData_descriptor; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + getDefaultInstanceForType() { + return com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData build() { + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData buildPartial() { + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData result = + new com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.writerSchema_ = + writerSchemaBuilder_ == null ? writerSchema_ : writerSchemaBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rows_ = rowsBuilder_ == null ? rows_ : rowsBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) { + return mergeFrom( + (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData other) { + if (other + == com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + .getDefaultInstance()) return this; + if (other.hasWriterSchema()) { + mergeWriterSchema(other.getWriterSchema()); + } + if (other.hasRows()) { + mergeRows(other.getRows()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getWriterSchemaFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getRowsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.cloud.bigquery.storage.v1.ArrowSchema writerSchema_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.bigquery.storage.v1.ArrowSchema, + com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder, + com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder> + writerSchemaBuilder_; + /** + * + * + *
+       * Optional. Arrow Schema used to serialize the data.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + * + * @return Whether the writerSchema field is set. + */ + public boolean hasWriterSchema() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Optional. Arrow Schema used to serialize the data.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + * + * @return The writerSchema. + */ + public com.google.cloud.bigquery.storage.v1.ArrowSchema getWriterSchema() { + if (writerSchemaBuilder_ == null) { + return writerSchema_ == null + ? com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance() + : writerSchema_; + } else { + return writerSchemaBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. Arrow Schema used to serialize the data.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + public Builder setWriterSchema(com.google.cloud.bigquery.storage.v1.ArrowSchema value) { + if (writerSchemaBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + writerSchema_ = value; + } else { + writerSchemaBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Arrow Schema used to serialize the data.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + public Builder setWriterSchema( + com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder builderForValue) { + if (writerSchemaBuilder_ == null) { + writerSchema_ = builderForValue.build(); + } else { + writerSchemaBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Arrow Schema used to serialize the data.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + public Builder mergeWriterSchema(com.google.cloud.bigquery.storage.v1.ArrowSchema value) { + if (writerSchemaBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && writerSchema_ != null + && writerSchema_ + != com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance()) { + getWriterSchemaBuilder().mergeFrom(value); + } else { + writerSchema_ = value; + } + } else { + writerSchemaBuilder_.mergeFrom(value); + } + if (writerSchema_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Optional. Arrow Schema used to serialize the data.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + public Builder clearWriterSchema() { + bitField0_ = (bitField0_ & ~0x00000001); + writerSchema_ = null; + if (writerSchemaBuilder_ != null) { + writerSchemaBuilder_.dispose(); + writerSchemaBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Arrow Schema used to serialize the data.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + public com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder getWriterSchemaBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getWriterSchemaFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. Arrow Schema used to serialize the data.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + public com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder getWriterSchemaOrBuilder() { + if (writerSchemaBuilder_ != null) { + return writerSchemaBuilder_.getMessageOrBuilder(); + } else { + return writerSchema_ == null + ? com.google.cloud.bigquery.storage.v1.ArrowSchema.getDefaultInstance() + : writerSchema_; + } + } + /** + * + * + *
+       * Optional. Arrow Schema used to serialize the data.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.bigquery.storage.v1.ArrowSchema, + com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder, + com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder> + getWriterSchemaFieldBuilder() { + if (writerSchemaBuilder_ == null) { + writerSchemaBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.bigquery.storage.v1.ArrowSchema, + com.google.cloud.bigquery.storage.v1.ArrowSchema.Builder, + com.google.cloud.bigquery.storage.v1.ArrowSchemaOrBuilder>( + getWriterSchema(), getParentForChildren(), isClean()); + writerSchema_ = null; + } + return writerSchemaBuilder_; + } + + private com.google.cloud.bigquery.storage.v1.ArrowRecordBatch rows_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch, + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder, + com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder> + rowsBuilder_; + /** + * + * + *
+       * Required. Serialized row data in Arrow format.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + * + * @return Whether the rows field is set. + */ + public boolean hasRows() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+       * Required. Serialized row data in Arrow format.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + * + * @return The rows. + */ + public com.google.cloud.bigquery.storage.v1.ArrowRecordBatch getRows() { + if (rowsBuilder_ == null) { + return rows_ == null + ? com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance() + : rows_; + } else { + return rowsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Serialized row data in Arrow format.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + public Builder setRows(com.google.cloud.bigquery.storage.v1.ArrowRecordBatch value) { + if (rowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rows_ = value; + } else { + rowsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Serialized row data in Arrow format.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + public Builder setRows( + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder builderForValue) { + if (rowsBuilder_ == null) { + rows_ = builderForValue.build(); + } else { + rowsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Serialized row data in Arrow format.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + public Builder mergeRows(com.google.cloud.bigquery.storage.v1.ArrowRecordBatch value) { + if (rowsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && rows_ != null + && rows_ + != com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance()) { + getRowsBuilder().mergeFrom(value); + } else { + rows_ = value; + } + } else { + rowsBuilder_.mergeFrom(value); + } + if (rows_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * + * + *
+       * Required. Serialized row data in Arrow format.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + public Builder clearRows() { + bitField0_ = (bitField0_ & ~0x00000002); + rows_ = null; + if (rowsBuilder_ != null) { + rowsBuilder_.dispose(); + rowsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Serialized row data in Arrow format.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + public com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder getRowsBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRowsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Serialized row data in Arrow format.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + public com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder getRowsOrBuilder() { + if (rowsBuilder_ != null) { + return rowsBuilder_.getMessageOrBuilder(); + } else { + return rows_ == null + ? com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.getDefaultInstance() + : rows_; + } + } + /** + * + * + *
+       * Required. Serialized row data in Arrow format.
+       * 
+ * + * .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch, + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder, + com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder> + getRowsFieldBuilder() { + if (rowsBuilder_ == null) { + rowsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch, + com.google.cloud.bigquery.storage.v1.ArrowRecordBatch.Builder, + com.google.cloud.bigquery.storage.v1.ArrowRecordBatchOrBuilder>( + getRows(), getParentForChildren(), isClean()); + rows_ = null; + } + return rowsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) + private static final com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData(); + } + + public static com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ArrowData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public interface ProtoDataOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData) @@ -1494,6 +2565,7 @@ public enum RowsCase com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { PROTO_ROWS(4), + ARROW_ROWS(5), ROWS_NOT_SET(0); private final int value; @@ -1514,6 +2586,8 @@ public static RowsCase forNumber(int value) { switch (value) { case 4: return PROTO_ROWS; + case 5: + return ARROW_ROWS; case 0: return ROWS_NOT_SET; default: @@ -1754,6 +2828,61 @@ public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData getProto return com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData.getDefaultInstance(); } + public static final int ARROW_ROWS_FIELD_NUMBER = 5; + /** + * + * + *
+   * Rows in arrow format. This is an experimental feature only selected for
+   * allowlisted customers.
+   * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + * + * @return Whether the arrowRows field is set. + */ + @java.lang.Override + public boolean hasArrowRows() { + return rowsCase_ == 5; + } + /** + * + * + *
+   * Rows in arrow format. This is an experimental feature only selected for
+   * allowlisted customers.
+   * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + * + * @return The arrowRows. + */ + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData getArrowRows() { + if (rowsCase_ == 5) { + return (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) rows_; + } + return com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.getDefaultInstance(); + } + /** + * + * + *
+   * Rows in arrow format. This is an experimental feature only selected for
+   * allowlisted customers.
+   * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + */ + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataOrBuilder + getArrowRowsOrBuilder() { + if (rowsCase_ == 5) { + return (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) rows_; + } + return com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.getDefaultInstance(); + } + public static final int TRACE_ID_FIELD_NUMBER = 6; @SuppressWarnings("serial") @@ -2232,6 +3361,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 4, (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData) rows_); } + if (rowsCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) rows_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, traceId_); } @@ -2266,6 +3399,11 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 4, (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData) rows_); } + if (rowsCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) rows_); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(traceId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, traceId_); } @@ -2321,6 +3459,9 @@ public boolean equals(final java.lang.Object obj) { case 4: if (!getProtoRows().equals(other.getProtoRows())) return false; break; + case 5: + if (!getArrowRows().equals(other.getArrowRows())) return false; + break; case 0: default: } @@ -2354,6 +3495,10 @@ public int hashCode() { hash = (37 * hash) + PROTO_ROWS_FIELD_NUMBER; hash = (53 * hash) + getProtoRows().hashCode(); break; + case 5: + hash = (37 * hash) + ARROW_ROWS_FIELD_NUMBER; + hash = (53 * hash) + getArrowRows().hashCode(); + break; case 0: default: } @@ -2545,6 +3690,9 @@ public Builder clear() { if (protoRowsBuilder_ != null) { protoRowsBuilder_.clear(); } + if (arrowRowsBuilder_ != null) { + arrowRowsBuilder_.clear(); + } traceId_ = ""; internalGetMutableMissingValueInterpretations().clear(); defaultMissingValueInterpretation_ = 0; @@ -2595,14 +3743,14 @@ private void buildPartial0(com.google.cloud.bigquery.storage.v1.AppendRowsReques result.offset_ = offsetBuilder_ == null ? offset_ : offsetBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.traceId_ = traceId_; } - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.missingValueInterpretations_ = internalGetMissingValueInterpretations(); result.missingValueInterpretations_.makeImmutable(); } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.defaultMissingValueInterpretation_ = defaultMissingValueInterpretation_; } result.bitField0_ |= to_bitField0_; @@ -2614,6 +3762,9 @@ private void buildPartialOneofs(com.google.cloud.bigquery.storage.v1.AppendRowsR if (rowsCase_ == 4 && protoRowsBuilder_ != null) { result.rows_ = protoRowsBuilder_.build(); } + if (rowsCase_ == 5 && arrowRowsBuilder_ != null) { + result.rows_ = arrowRowsBuilder_.build(); + } } @java.lang.Override @@ -2672,12 +3823,12 @@ public Builder mergeFrom(com.google.cloud.bigquery.storage.v1.AppendRowsRequest } if (!other.getTraceId().isEmpty()) { traceId_ = other.traceId_; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } internalGetMutableMissingValueInterpretations() .mergeFrom(other.internalGetMissingValueInterpretations()); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; if (other.defaultMissingValueInterpretation_ != 0) { setDefaultMissingValueInterpretationValue( other.getDefaultMissingValueInterpretationValue()); @@ -2688,6 +3839,11 @@ public Builder mergeFrom(com.google.cloud.bigquery.storage.v1.AppendRowsRequest mergeProtoRows(other.getProtoRows()); break; } + case ARROW_ROWS: + { + mergeArrowRows(other.getArrowRows()); + break; + } case ROWS_NOT_SET: { break; @@ -2742,10 +3898,16 @@ public Builder mergeFrom( rowsCase_ = 4; break; } // case 34 + case 42: + { + input.readMessage(getArrowRowsFieldBuilder().getBuilder(), extensionRegistry); + rowsCase_ = 5; + break; + } // case 42 case 50: { traceId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } // case 50 case 58: @@ -2761,13 +3923,13 @@ public Builder mergeFrom( .put( missingValueInterpretations__.getKey(), missingValueInterpretations__.getValue()); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; break; } // case 58 case 64: { defaultMissingValueInterpretation_ = input.readEnum(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; break; } // case 64 default: @@ -3501,6 +4663,234 @@ public Builder clearProtoRows() { return protoRowsBuilder_; } + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData, + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.Builder, + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataOrBuilder> + arrowRowsBuilder_; + /** + * + * + *
+     * Rows in arrow format. This is an experimental feature only selected for
+     * allowlisted customers.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + * + * @return Whether the arrowRows field is set. + */ + @java.lang.Override + public boolean hasArrowRows() { + return rowsCase_ == 5; + } + /** + * + * + *
+     * Rows in arrow format. This is an experimental feature only selected for
+     * allowlisted customers.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + * + * @return The arrowRows. + */ + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData getArrowRows() { + if (arrowRowsBuilder_ == null) { + if (rowsCase_ == 5) { + return (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) rows_; + } + return com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + .getDefaultInstance(); + } else { + if (rowsCase_ == 5) { + return arrowRowsBuilder_.getMessage(); + } + return com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Rows in arrow format. This is an experimental feature only selected for
+     * allowlisted customers.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + */ + public Builder setArrowRows( + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData value) { + if (arrowRowsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rows_ = value; + onChanged(); + } else { + arrowRowsBuilder_.setMessage(value); + } + rowsCase_ = 5; + return this; + } + /** + * + * + *
+     * Rows in arrow format. This is an experimental feature only selected for
+     * allowlisted customers.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + */ + public Builder setArrowRows( + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.Builder builderForValue) { + if (arrowRowsBuilder_ == null) { + rows_ = builderForValue.build(); + onChanged(); + } else { + arrowRowsBuilder_.setMessage(builderForValue.build()); + } + rowsCase_ = 5; + return this; + } + /** + * + * + *
+     * Rows in arrow format. This is an experimental feature only selected for
+     * allowlisted customers.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + */ + public Builder mergeArrowRows( + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData value) { + if (arrowRowsBuilder_ == null) { + if (rowsCase_ == 5 + && rows_ + != com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + .getDefaultInstance()) { + rows_ = + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.newBuilder( + (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) rows_) + .mergeFrom(value) + .buildPartial(); + } else { + rows_ = value; + } + onChanged(); + } else { + if (rowsCase_ == 5) { + arrowRowsBuilder_.mergeFrom(value); + } else { + arrowRowsBuilder_.setMessage(value); + } + } + rowsCase_ = 5; + return this; + } + /** + * + * + *
+     * Rows in arrow format. This is an experimental feature only selected for
+     * allowlisted customers.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + */ + public Builder clearArrowRows() { + if (arrowRowsBuilder_ == null) { + if (rowsCase_ == 5) { + rowsCase_ = 0; + rows_ = null; + onChanged(); + } + } else { + if (rowsCase_ == 5) { + rowsCase_ = 0; + rows_ = null; + } + arrowRowsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Rows in arrow format. This is an experimental feature only selected for
+     * allowlisted customers.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + */ + public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.Builder + getArrowRowsBuilder() { + return getArrowRowsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Rows in arrow format. This is an experimental feature only selected for
+     * allowlisted customers.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + */ + @java.lang.Override + public com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataOrBuilder + getArrowRowsOrBuilder() { + if ((rowsCase_ == 5) && (arrowRowsBuilder_ != null)) { + return arrowRowsBuilder_.getMessageOrBuilder(); + } else { + if (rowsCase_ == 5) { + return (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) rows_; + } + return com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Rows in arrow format. This is an experimental feature only selected for
+     * allowlisted customers.
+     * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData, + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.Builder, + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataOrBuilder> + getArrowRowsFieldBuilder() { + if (arrowRowsBuilder_ == null) { + if (!(rowsCase_ == 5)) { + rows_ = + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.getDefaultInstance(); + } + arrowRowsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData, + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData.Builder, + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataOrBuilder>( + (com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData) rows_, + getParentForChildren(), + isClean()); + rows_ = null; + } + rowsCase_ = 5; + onChanged(); + return arrowRowsBuilder_; + } + private java.lang.Object traceId_ = ""; /** * @@ -3566,7 +4956,7 @@ public Builder setTraceId(java.lang.String value) { throw new NullPointerException(); } traceId_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3584,7 +4974,7 @@ public Builder setTraceId(java.lang.String value) { */ public Builder clearTraceId() { traceId_ = getDefaultInstance().getTraceId(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -3607,7 +4997,7 @@ public Builder setTraceIdBytes(com.google.protobuf.ByteString value) { } checkByteStringIsUtf8(value); traceId_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3634,7 +5024,7 @@ public Builder setTraceIdBytes(com.google.protobuf.ByteString value) { if (!missingValueInterpretations_.isMutable()) { missingValueInterpretations_ = missingValueInterpretations_.copy(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return missingValueInterpretations_; } @@ -3928,7 +5318,7 @@ public int getMissingValueInterpretationsValueOrThrow(java.lang.String key) { } public Builder clearMissingValueInterpretations() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); internalGetMutableMissingValueInterpretations().getMutableMap().clear(); return this; } @@ -3973,7 +5363,7 @@ public Builder removeMissingValueInterpretations(java.lang.String key) { java.lang.String, com.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation> getMutableMissingValueInterpretations() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return internalGetAdaptedMissingValueInterpretationsMap( internalGetMutableMissingValueInterpretations().getMutableMap()); } @@ -4015,7 +5405,7 @@ public Builder putMissingValueInterpretations( internalGetMutableMissingValueInterpretations() .getMutableMap() .put(key, missingValueInterpretationsValueConverter.doBackward(value)); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -4054,14 +5444,14 @@ public Builder putAllMissingValueInterpretations( internalGetAdaptedMissingValueInterpretationsMap( internalGetMutableMissingValueInterpretations().getMutableMap()) .putAll(values); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableMissingValueInterpretationsValue() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return internalGetMutableMissingValueInterpretations().getMutableMap(); } /** @@ -4098,7 +5488,7 @@ public Builder putMissingValueInterpretationsValue(java.lang.String key, int val } internalGetMutableMissingValueInterpretations().getMutableMap().put(key, value); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -4132,7 +5522,7 @@ public Builder putMissingValueInterpretationsValue(java.lang.String key, int val public Builder putAllMissingValueInterpretationsValue( java.util.Map values) { internalGetMutableMissingValueInterpretations().getMutableMap().putAll(values); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } @@ -4186,7 +5576,7 @@ public int getDefaultMissingValueInterpretationValue() { */ public Builder setDefaultMissingValueInterpretationValue(int value) { defaultMissingValueInterpretation_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -4249,7 +5639,7 @@ public Builder setDefaultMissingValueInterpretation( if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; defaultMissingValueInterpretation_ = value.getNumber(); onChanged(); return this; @@ -4276,7 +5666,7 @@ public Builder setDefaultMissingValueInterpretation( * @return This builder for chaining. */ public Builder clearDefaultMissingValueInterpretation() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); defaultMissingValueInterpretation_ = 0; onChanged(); return this; diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AppendRowsRequestOrBuilder.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AppendRowsRequestOrBuilder.java index 1fb78f4d07..eaffa8e8f4 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AppendRowsRequestOrBuilder.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/AppendRowsRequestOrBuilder.java @@ -194,6 +194,44 @@ public interface AppendRowsRequestOrBuilder */ com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataOrBuilder getProtoRowsOrBuilder(); + /** + * + * + *
+   * Rows in arrow format. This is an experimental feature only selected for
+   * allowlisted customers.
+   * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + * + * @return Whether the arrowRows field is set. + */ + boolean hasArrowRows(); + /** + * + * + *
+   * Rows in arrow format. This is an experimental feature only selected for
+   * allowlisted customers.
+   * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + * + * @return The arrowRows. + */ + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData getArrowRows(); + /** + * + * + *
+   * Rows in arrow format. This is an experimental feature only selected for
+   * allowlisted customers.
+   * 
+ * + * .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + */ + com.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataOrBuilder getArrowRowsOrBuilder(); + /** * * diff --git a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StorageProto.java b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StorageProto.java index 97d8f82cdc..54e8f71f3a 100644 --- a/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StorageProto.java +++ b/proto-google-cloud-bigquerystorage-v1/src/main/java/com/google/cloud/bigquery/storage/v1/StorageProto.java @@ -68,6 +68,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ArrowData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ArrowData_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ProtoData_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -180,140 +184,146 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "quest\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035bigquery." + "googleapis.com/Table\022H\n\014write_stream\030\002 \001" + "(\0132-.google.cloud.bigquery.storage.v1.Wr" - + "iteStreamB\003\340A\002\"\215\007\n\021AppendRowsRequest\022H\n\014" + + "iteStreamB\003\340A\002\"\370\010\n\021AppendRowsRequest\022H\n\014" + "write_stream\030\001 \001(\tB2\340A\002\372A,\n*bigquerystor" + "age.googleapis.com/WriteStream\022+\n\006offset" + "\030\002 \001(\0132\033.google.protobuf.Int64Value\022S\n\np" + "roto_rows\030\004 \001(\0132=.google.cloud.bigquery." + "storage.v1.AppendRowsRequest.ProtoDataH\000" - + "\022\020\n\010trace_id\030\006 \001(\t\022{\n\035missing_value_inte" - + "rpretations\030\007 \003(\0132T.google.cloud.bigquer" - + "y.storage.v1.AppendRowsRequest.MissingVa" - + "lueInterpretationsEntry\022\201\001\n$default_miss" - + "ing_value_interpretation\030\010 \001(\0162N.google." - + "cloud.bigquery.storage.v1.AppendRowsRequ" - + "est.MissingValueInterpretationB\003\340A\001\032\214\001\n\t" - + "ProtoData\022D\n\rwriter_schema\030\001 \001(\0132-.googl" - + "e.cloud.bigquery.storage.v1.ProtoSchema\022" - + "9\n\004rows\030\002 \001(\0132+.google.cloud.bigquery.st" - + "orage.v1.ProtoRows\032\222\001\n MissingValueInter" - + "pretationsEntry\022\013\n\003key\030\001 \001(\t\022]\n\005value\030\002 " - + "\001(\0162N.google.cloud.bigquery.storage.v1.A" - + "ppendRowsRequest.MissingValueInterpretat" - + "ion:\0028\001\"m\n\032MissingValueInterpretation\022,\n" - + "(MISSING_VALUE_INTERPRETATION_UNSPECIFIE" - + "D\020\000\022\016\n\nNULL_VALUE\020\001\022\021\n\rDEFAULT_VALUE\020\002B\006" - + "\n\004rows\"\373\002\n\022AppendRowsResponse\022Z\n\rappend_" - + "result\030\001 \001(\0132A.google.cloud.bigquery.sto" - + "rage.v1.AppendRowsResponse.AppendResultH" - + "\000\022#\n\005error\030\002 \001(\0132\022.google.rpc.StatusH\000\022E" - + "\n\016updated_schema\030\003 \001(\0132-.google.cloud.bi" - + "gquery.storage.v1.TableSchema\022>\n\nrow_err" - + "ors\030\004 \003(\0132*.google.cloud.bigquery.storag" - + "e.v1.RowError\022\024\n\014write_stream\030\005 \001(\t\032;\n\014A" - + "ppendResult\022+\n\006offset\030\001 \001(\0132\033.google.pro" - + "tobuf.Int64ValueB\n\n\010response\"\232\001\n\025GetWrit" - + "eStreamRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*bi" - + "gquerystorage.googleapis.com/WriteStream" - + "\022?\n\004view\030\003 \001(\01621.google.cloud.bigquery.s" - + "torage.v1.WriteStreamView\"s\n\036BatchCommit" - + "WriteStreamsRequest\0225\n\006parent\030\001 \001(\tB%\340A\002" - + "\372A\037\n\035bigquery.googleapis.com/Table\022\032\n\rwr" - + "ite_streams\030\002 \003(\tB\003\340A\002\"\231\001\n\037BatchCommitWr" - + "iteStreamsResponse\022/\n\013commit_time\030\001 \001(\0132" - + "\032.google.protobuf.Timestamp\022E\n\rstream_er" - + "rors\030\002 \003(\0132..google.cloud.bigquery.stora" - + "ge.v1.StorageError\"^\n\032FinalizeWriteStrea" - + "mRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*bigquery" - + "storage.googleapis.com/WriteStream\"0\n\033Fi" - + "nalizeWriteStreamResponse\022\021\n\trow_count\030\001" - + " \001(\003\"\211\001\n\020FlushRowsRequest\022H\n\014write_strea" - + "m\030\001 \001(\tB2\340A\002\372A,\n*bigquerystorage.googlea" - + "pis.com/WriteStream\022+\n\006offset\030\002 \001(\0132\033.go" - + "ogle.protobuf.Int64Value\"#\n\021FlushRowsRes" - + "ponse\022\016\n\006offset\030\001 \001(\003\"\244\004\n\014StorageError\022M" - + "\n\004code\030\001 \001(\0162?.google.cloud.bigquery.sto" - + "rage.v1.StorageError.StorageErrorCode\022\016\n" - + "\006entity\030\002 \001(\t\022\025\n\rerror_message\030\003 \001(\t\"\235\003\n" - + "\020StorageErrorCode\022\"\n\036STORAGE_ERROR_CODE_" - + "UNSPECIFIED\020\000\022\023\n\017TABLE_NOT_FOUND\020\001\022\034\n\030ST" - + "REAM_ALREADY_COMMITTED\020\002\022\024\n\020STREAM_NOT_F" - + "OUND\020\003\022\027\n\023INVALID_STREAM_TYPE\020\004\022\030\n\024INVAL" - + "ID_STREAM_STATE\020\005\022\024\n\020STREAM_FINALIZED\020\006\022" - + " \n\034SCHEMA_MISMATCH_EXTRA_FIELDS\020\007\022\031\n\025OFF" - + "SET_ALREADY_EXISTS\020\010\022\027\n\023OFFSET_OUT_OF_RA" - + "NGE\020\t\022\025\n\021CMEK_NOT_PROVIDED\020\n\022\031\n\025INVALID_" - + "CMEK_PROVIDED\020\013\022\031\n\025CMEK_ENCRYPTION_ERROR" - + "\020\014\022\025\n\021KMS_SERVICE_ERROR\020\r\022\031\n\025KMS_PERMISS" - + "ION_DENIED\020\016\"\263\001\n\010RowError\022\r\n\005index\030\001 \001(\003" - + "\022E\n\004code\030\002 \001(\01627.google.cloud.bigquery.s" - + "torage.v1.RowError.RowErrorCode\022\017\n\007messa" - + "ge\030\003 \001(\t\"@\n\014RowErrorCode\022\036\n\032ROW_ERROR_CO" - + "DE_UNSPECIFIED\020\000\022\020\n\014FIELDS_ERROR\020\0012\222\006\n\014B" - + "igQueryRead\022\351\001\n\021CreateReadSession\022:.goog" - + "le.cloud.bigquery.storage.v1.CreateReadS" - + "essionRequest\032-.google.cloud.bigquery.st" - + "orage.v1.ReadSession\"i\332A$parent,read_ses" - + "sion,max_stream_count\202\323\344\223\002<\"7/v1/{read_s" - + "ession.table=projects/*/datasets/*/table" - + "s/*}:\001*\022\317\001\n\010ReadRows\0221.google.cloud.bigq" - + "uery.storage.v1.ReadRowsRequest\0322.google" - + ".cloud.bigquery.storage.v1.ReadRowsRespo" - + "nse\"Z\332A\022read_stream,offset\202\323\344\223\002?\022=/v1/{r" - + "ead_stream=projects/*/locations/*/sessio" - + "ns/*/streams/*}0\001\022\306\001\n\017SplitReadStream\0228." - + "google.cloud.bigquery.storage.v1.SplitRe" - + "adStreamRequest\0329.google.cloud.bigquery." - + "storage.v1.SplitReadStreamResponse\">\202\323\344\223" - + "\0028\0226/v1/{name=projects/*/locations/*/ses" - + "sions/*/streams/*}\032{\312A\036bigquerystorage.g" - + "oogleapis.com\322AWhttps://www.googleapis.c" - + "om/auth/bigquery,https://www.googleapis." - + "com/auth/cloud-platform2\274\013\n\rBigQueryWrit" - + "e\022\327\001\n\021CreateWriteStream\022:.google.cloud.b" - + "igquery.storage.v1.CreateWriteStreamRequ" - + "est\032-.google.cloud.bigquery.storage.v1.W" - + "riteStream\"W\332A\023parent,write_stream\202\323\344\223\002;" - + "\"+/v1/{parent=projects/*/datasets/*/tabl" - + "es/*}:\014write_stream\022\322\001\n\nAppendRows\0223.goo" - + "gle.cloud.bigquery.storage.v1.AppendRows" - + "Request\0324.google.cloud.bigquery.storage." - + "v1.AppendRowsResponse\"U\332A\014write_stream\202\323" - + "\344\223\002@\";/v1/{write_stream=projects/*/datas" - + "ets/*/tables/*/streams/*}:\001*(\0010\001\022\277\001\n\016Get" - + "WriteStream\0227.google.cloud.bigquery.stor" - + "age.v1.GetWriteStreamRequest\032-.google.cl" - + "oud.bigquery.storage.v1.WriteStream\"E\332A\004" - + "name\202\323\344\223\0028\"3/v1/{name=projects/*/dataset" - + "s/*/tables/*/streams/*}:\001*\022\331\001\n\023FinalizeW" - + "riteStream\022<.google.cloud.bigquery.stora" - + "ge.v1.FinalizeWriteStreamRequest\032=.googl" - + "e.cloud.bigquery.storage.v1.FinalizeWrit" - + "eStreamResponse\"E\332A\004name\202\323\344\223\0028\"3/v1/{nam" - + "e=projects/*/datasets/*/tables/*/streams" - + "/*}:\001*\022\334\001\n\027BatchCommitWriteStreams\022@.goo" - + "gle.cloud.bigquery.storage.v1.BatchCommi" - + "tWriteStreamsRequest\032A.google.cloud.bigq" - + "uery.storage.v1.BatchCommitWriteStreamsR" - + "esponse\"<\332A\006parent\202\323\344\223\002-\022+/v1/{parent=pr" - + "ojects/*/datasets/*/tables/*}\022\313\001\n\tFlushR" - + "ows\0222.google.cloud.bigquery.storage.v1.F" - + "lushRowsRequest\0323.google.cloud.bigquery." - + "storage.v1.FlushRowsResponse\"U\332A\014write_s" - + "tream\202\323\344\223\002@\";/v1/{write_stream=projects/" - + "*/datasets/*/tables/*/streams/*}:\001*\032\260\001\312A" - + "\036bigquerystorage.googleapis.com\322A\213\001https" - + "://www.googleapis.com/auth/bigquery,http" - + "s://www.googleapis.com/auth/bigquery.ins" - + "ertdata,https://www.googleapis.com/auth/" - + "cloud-platformB\224\002\n$com.google.cloud.bigq" - + "uery.storage.v1B\014StorageProtoP\001Z>cloud.g" - + "oogle.com/go/bigquery/storage/apiv1/stor" - + "agepb;storagepb\252\002 Google.Cloud.BigQuery." - + "Storage.V1\312\002 Google\\Cloud\\BigQuery\\Stora" - + "ge\\V1\352AU\n\035bigquery.googleapis.com/Table\022" - + "4projects/{project}/datasets/{dataset}/t" - + "ables/{table}b\006proto3" + + "\022S\n\narrow_rows\030\005 \001(\0132=.google.cloud.bigq" + + "uery.storage.v1.AppendRowsRequest.ArrowD" + + "ataH\000\022\020\n\010trace_id\030\006 \001(\t\022{\n\035missing_value" + + "_interpretations\030\007 \003(\0132T.google.cloud.bi" + + "gquery.storage.v1.AppendRowsRequest.Miss" + + "ingValueInterpretationsEntry\022\201\001\n$default" + + "_missing_value_interpretation\030\010 \001(\0162N.go" + + "ogle.cloud.bigquery.storage.v1.AppendRow" + + "sRequest.MissingValueInterpretationB\003\340A\001" + + "\032\223\001\n\tArrowData\022D\n\rwriter_schema\030\001 \001(\0132-." + + "google.cloud.bigquery.storage.v1.ArrowSc" + + "hema\022@\n\004rows\030\002 \001(\01322.google.cloud.bigque" + + "ry.storage.v1.ArrowRecordBatch\032\214\001\n\tProto" + + "Data\022D\n\rwriter_schema\030\001 \001(\0132-.google.clo" + + "ud.bigquery.storage.v1.ProtoSchema\0229\n\004ro" + + "ws\030\002 \001(\0132+.google.cloud.bigquery.storage" + + ".v1.ProtoRows\032\222\001\n MissingValueInterpreta" + + "tionsEntry\022\013\n\003key\030\001 \001(\t\022]\n\005value\030\002 \001(\0162N" + + ".google.cloud.bigquery.storage.v1.Append" + + "RowsRequest.MissingValueInterpretation:\002" + + "8\001\"m\n\032MissingValueInterpretation\022,\n(MISS" + + "ING_VALUE_INTERPRETATION_UNSPECIFIED\020\000\022\016" + + "\n\nNULL_VALUE\020\001\022\021\n\rDEFAULT_VALUE\020\002B\006\n\004row" + + "s\"\373\002\n\022AppendRowsResponse\022Z\n\rappend_resul" + + "t\030\001 \001(\0132A.google.cloud.bigquery.storage." + + "v1.AppendRowsResponse.AppendResultH\000\022#\n\005" + + "error\030\002 \001(\0132\022.google.rpc.StatusH\000\022E\n\016upd" + + "ated_schema\030\003 \001(\0132-.google.cloud.bigquer" + + "y.storage.v1.TableSchema\022>\n\nrow_errors\030\004" + + " \003(\0132*.google.cloud.bigquery.storage.v1." + + "RowError\022\024\n\014write_stream\030\005 \001(\t\032;\n\014Append" + + "Result\022+\n\006offset\030\001 \001(\0132\033.google.protobuf" + + ".Int64ValueB\n\n\010response\"\232\001\n\025GetWriteStre" + + "amRequest\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*bigquer" + + "ystorage.googleapis.com/WriteStream\022?\n\004v" + + "iew\030\003 \001(\01621.google.cloud.bigquery.storag" + + "e.v1.WriteStreamView\"s\n\036BatchCommitWrite" + + "StreamsRequest\0225\n\006parent\030\001 \001(\tB%\340A\002\372A\037\n\035" + + "bigquery.googleapis.com/Table\022\032\n\rwrite_s" + + "treams\030\002 \003(\tB\003\340A\002\"\231\001\n\037BatchCommitWriteSt" + + "reamsResponse\022/\n\013commit_time\030\001 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022E\n\rstream_errors\030" + + "\002 \003(\0132..google.cloud.bigquery.storage.v1" + + ".StorageError\"^\n\032FinalizeWriteStreamRequ" + + "est\022@\n\004name\030\001 \001(\tB2\340A\002\372A,\n*bigquerystora" + + "ge.googleapis.com/WriteStream\"0\n\033Finaliz" + + "eWriteStreamResponse\022\021\n\trow_count\030\001 \001(\003\"" + + "\211\001\n\020FlushRowsRequest\022H\n\014write_stream\030\001 \001" + + "(\tB2\340A\002\372A,\n*bigquerystorage.googleapis.c" + + "om/WriteStream\022+\n\006offset\030\002 \001(\0132\033.google." + + "protobuf.Int64Value\"#\n\021FlushRowsResponse" + + "\022\016\n\006offset\030\001 \001(\003\"\244\004\n\014StorageError\022M\n\004cod" + + "e\030\001 \001(\0162?.google.cloud.bigquery.storage." + + "v1.StorageError.StorageErrorCode\022\016\n\006enti" + + "ty\030\002 \001(\t\022\025\n\rerror_message\030\003 \001(\t\"\235\003\n\020Stor" + + "ageErrorCode\022\"\n\036STORAGE_ERROR_CODE_UNSPE" + + "CIFIED\020\000\022\023\n\017TABLE_NOT_FOUND\020\001\022\034\n\030STREAM_" + + "ALREADY_COMMITTED\020\002\022\024\n\020STREAM_NOT_FOUND\020" + + "\003\022\027\n\023INVALID_STREAM_TYPE\020\004\022\030\n\024INVALID_ST" + + "REAM_STATE\020\005\022\024\n\020STREAM_FINALIZED\020\006\022 \n\034SC" + + "HEMA_MISMATCH_EXTRA_FIELDS\020\007\022\031\n\025OFFSET_A" + + "LREADY_EXISTS\020\010\022\027\n\023OFFSET_OUT_OF_RANGE\020\t" + + "\022\025\n\021CMEK_NOT_PROVIDED\020\n\022\031\n\025INVALID_CMEK_" + + "PROVIDED\020\013\022\031\n\025CMEK_ENCRYPTION_ERROR\020\014\022\025\n" + + "\021KMS_SERVICE_ERROR\020\r\022\031\n\025KMS_PERMISSION_D" + + "ENIED\020\016\"\263\001\n\010RowError\022\r\n\005index\030\001 \001(\003\022E\n\004c" + + "ode\030\002 \001(\01627.google.cloud.bigquery.storag" + + "e.v1.RowError.RowErrorCode\022\017\n\007message\030\003 " + + "\001(\t\"@\n\014RowErrorCode\022\036\n\032ROW_ERROR_CODE_UN" + + "SPECIFIED\020\000\022\020\n\014FIELDS_ERROR\020\0012\222\006\n\014BigQue" + + "ryRead\022\351\001\n\021CreateReadSession\022:.google.cl" + + "oud.bigquery.storage.v1.CreateReadSessio" + + "nRequest\032-.google.cloud.bigquery.storage" + + ".v1.ReadSession\"i\332A$parent,read_session," + + "max_stream_count\202\323\344\223\002<\"7/v1/{read_sessio" + + "n.table=projects/*/datasets/*/tables/*}:" + + "\001*\022\317\001\n\010ReadRows\0221.google.cloud.bigquery." + + "storage.v1.ReadRowsRequest\0322.google.clou" + + "d.bigquery.storage.v1.ReadRowsResponse\"Z" + + "\332A\022read_stream,offset\202\323\344\223\002?\022=/v1/{read_s" + + "tream=projects/*/locations/*/sessions/*/" + + "streams/*}0\001\022\306\001\n\017SplitReadStream\0228.googl" + + "e.cloud.bigquery.storage.v1.SplitReadStr" + + "eamRequest\0329.google.cloud.bigquery.stora" + + "ge.v1.SplitReadStreamResponse\">\202\323\344\223\0028\0226/" + + "v1/{name=projects/*/locations/*/sessions" + + "/*/streams/*}\032{\312A\036bigquerystorage.google" + + "apis.com\322AWhttps://www.googleapis.com/au" + + "th/bigquery,https://www.googleapis.com/a" + + "uth/cloud-platform2\274\013\n\rBigQueryWrite\022\327\001\n" + + "\021CreateWriteStream\022:.google.cloud.bigque" + + "ry.storage.v1.CreateWriteStreamRequest\032-" + + ".google.cloud.bigquery.storage.v1.WriteS" + + "tream\"W\332A\023parent,write_stream\202\323\344\223\002;\"+/v1" + + "/{parent=projects/*/datasets/*/tables/*}" + + ":\014write_stream\022\322\001\n\nAppendRows\0223.google.c" + + "loud.bigquery.storage.v1.AppendRowsReque" + + "st\0324.google.cloud.bigquery.storage.v1.Ap" + + "pendRowsResponse\"U\332A\014write_stream\202\323\344\223\002@\"" + + ";/v1/{write_stream=projects/*/datasets/*" + + "/tables/*/streams/*}:\001*(\0010\001\022\277\001\n\016GetWrite" + + "Stream\0227.google.cloud.bigquery.storage.v" + + "1.GetWriteStreamRequest\032-.google.cloud.b" + + "igquery.storage.v1.WriteStream\"E\332A\004name\202" + + "\323\344\223\0028\"3/v1/{name=projects/*/datasets/*/t" + + "ables/*/streams/*}:\001*\022\331\001\n\023FinalizeWriteS" + + "tream\022<.google.cloud.bigquery.storage.v1" + + ".FinalizeWriteStreamRequest\032=.google.clo" + + "ud.bigquery.storage.v1.FinalizeWriteStre" + + "amResponse\"E\332A\004name\202\323\344\223\0028\"3/v1/{name=pro" + + "jects/*/datasets/*/tables/*/streams/*}:\001" + + "*\022\334\001\n\027BatchCommitWriteStreams\022@.google.c" + + "loud.bigquery.storage.v1.BatchCommitWrit" + + "eStreamsRequest\032A.google.cloud.bigquery." + + "storage.v1.BatchCommitWriteStreamsRespon" + + "se\"<\332A\006parent\202\323\344\223\002-\022+/v1/{parent=project" + + "s/*/datasets/*/tables/*}\022\313\001\n\tFlushRows\0222" + + ".google.cloud.bigquery.storage.v1.FlushR" + + "owsRequest\0323.google.cloud.bigquery.stora" + + "ge.v1.FlushRowsResponse\"U\332A\014write_stream" + + "\202\323\344\223\002@\";/v1/{write_stream=projects/*/dat" + + "asets/*/tables/*/streams/*}:\001*\032\260\001\312A\036bigq" + + "uerystorage.googleapis.com\322A\213\001https://ww" + + "w.googleapis.com/auth/bigquery,https://w" + + "ww.googleapis.com/auth/bigquery.insertda" + + "ta,https://www.googleapis.com/auth/cloud" + + "-platformB\224\002\n$com.google.cloud.bigquery." + + "storage.v1B\014StorageProtoP\001Z>cloud.google" + + ".com/go/bigquery/storage/apiv1/storagepb" + + ";storagepb\252\002 Google.Cloud.BigQuery.Stora" + + "ge.V1\312\002 Google\\Cloud\\BigQuery\\Storage\\V1" + + "\352AU\n\035bigquery.googleapis.com/Table\0224proj" + + "ects/{project}/datasets/{dataset}/tables" + + "/{table}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -424,15 +434,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "WriteStream", "Offset", "ProtoRows", + "ArrowRows", "TraceId", "MissingValueInterpretations", "DefaultMissingValueInterpretation", "Rows", }); - internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ProtoData_descriptor = + internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ArrowData_descriptor = internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_descriptor .getNestedTypes() .get(0); + internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ArrowData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ArrowData_descriptor, + new java.lang.String[] { + "WriterSchema", "Rows", + }); + internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ProtoData_descriptor = + internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_descriptor + .getNestedTypes() + .get(1); internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ProtoData_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_ProtoData_descriptor, @@ -442,7 +463,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_MissingValueInterpretationsEntry_descriptor = internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_descriptor .getNestedTypes() - .get(1); + .get(2); internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_MissingValueInterpretationsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_bigquery_storage_v1_AppendRowsRequest_MissingValueInterpretationsEntry_descriptor, 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 d83dacc465..b60efbdce0 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 @@ -422,6 +422,17 @@ message CreateWriteStreamRequest { // The size of a single AppendRowsRequest must be less than 10 MB in size. // Requests larger than this return an error, typically `INVALID_ARGUMENT`. message AppendRowsRequest { + // Arrow schema and data. + // Arrow format is an experimental feature only selected for allowlisted + // customers. + message ArrowData { + // Optional. Arrow Schema used to serialize the data. + ArrowSchema writer_schema = 1; + + // Required. Serialized row data in Arrow format. + ArrowRecordBatch rows = 2; + } + // ProtoData contains the data rows and schema when constructing append // requests. message ProtoData { @@ -510,6 +521,10 @@ message AppendRowsRequest { oneof rows { // Rows in proto format. ProtoData proto_rows = 4; + + // Rows in arrow format. This is an experimental feature only selected for + // allowlisted customers. + ArrowData arrow_rows = 5; } // Id set by client to annotate its identity. Only initial request setting is diff --git a/samples/snippets/src/test/java/com/example/bigquerystorage/ExportOpenTelemetryIT.java b/samples/snippets/src/test/java/com/example/bigquerystorage/ExportOpenTelemetryIT.java index 341bdabe37..ce28aa7564 100644 --- a/samples/snippets/src/test/java/com/example/bigquerystorage/ExportOpenTelemetryIT.java +++ b/samples/snippets/src/test/java/com/example/bigquerystorage/ExportOpenTelemetryIT.java @@ -70,12 +70,12 @@ public static void checkRequirements() { private void setupGoogleCloudMonitoringOT() { MetricExporter metricExporter = GoogleCloudMetricExporter.createWithDefaultConfiguration(); METER_PROVIDER = - SdkMeterProvider.builder() - .registerMetricReader( - PeriodicMetricReader.builder(metricExporter) - .setInterval(java.time.Duration.ofMillis(30000)) - .build()) - .build(); + SdkMeterProvider.builder() + .registerMetricReader( + PeriodicMetricReader.builder(metricExporter) + .setInterval(java.time.Duration.ofMillis(30000)) + .build()) + .build(); OpenTelemetrySdk.builder().setMeterProvider(METER_PROVIDER).buildAndRegisterGlobal(); }