This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new 43b64635ac1 [SPARK-42812][CONNECT] Add client_type to AddArtifactsRequest protobuf message 43b64635ac1 is described below commit 43b64635ac1a018fa32f7150478deb63955ee8be Author: vicennial <venkata.gud...@databricks.com> AuthorDate: Thu Mar 16 15:29:48 2023 +0900 [SPARK-42812][CONNECT] Add client_type to AddArtifactsRequest protobuf message ### What changes were proposed in this pull request? The missing `client_type` is added to the `AddArtifactsRequest` protobuf message. ### Why are the changes needed? Consistency with the other RPCs. ### Does this PR introduce _any_ user-facing change? Yes, new field in proto message. ### How was this patch tested? N/A Closes #40443 from vicennial/SPARK-42812. Authored-by: vicennial <venkata.gud...@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- .../src/main/protobuf/spark/connect/base.proto | 5 ++++ python/pyspark/sql/connect/proto/base_pb2.py | 32 +++++++++++----------- python/pyspark/sql/connect/proto/base_pb2.pyi | 20 ++++++++++++++ 3 files changed, 41 insertions(+), 16 deletions(-) diff --git a/connector/connect/common/src/main/protobuf/spark/connect/base.proto b/connector/connect/common/src/main/protobuf/spark/connect/base.proto index 2118f8e4823..809a2dc5cbf 100644 --- a/connector/connect/common/src/main/protobuf/spark/connect/base.proto +++ b/connector/connect/common/src/main/protobuf/spark/connect/base.proto @@ -413,6 +413,11 @@ message AddArtifactsRequest { // User context UserContext user_context = 2; + // Provides optional information about the client sending the request. This field + // can be used for language or version specific information and is only intended for + // logging purposes and will not be interpreted by the server. + optional string client_type = 6; + // A chunk of an Artifact. message ArtifactChunk { // Data chunk. diff --git a/python/pyspark/sql/connect/proto/base_pb2.py b/python/pyspark/sql/connect/proto/base_pb2.py index 030a28cf360..5a7a10e78ca 100644 --- a/python/pyspark/sql/connect/proto/base_pb2.py +++ b/python/pyspark/sql/connect/proto/base_pb2.py @@ -37,7 +37,7 @@ from pyspark.sql.connect.proto import types_pb2 as spark_dot_connect_dot_types__ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\x18spark/connect/base.proto\x12\rspark.connect\x1a\x19google/protobuf/any.proto\x1a\x1cspark/connect/commands.proto\x1a\x1fspark/connect/expressions.proto\x1a\x1dspark/connect/relations.proto\x1a\x19spark/connect/types.proto"t\n\x04Plan\x12-\n\x04root\x18\x01 \x01(\x0b\x32\x17.spark.connect.RelationH\x00R\x04root\x12\x32\n\x07\x63ommand\x18\x02 \x01(\x0b\x32\x16.spark.connect.CommandH\x00R\x07\x63ommandB\t\n\x07op_type"z\n\x0bUserContext\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06 [...] + b'\n\x18spark/connect/base.proto\x12\rspark.connect\x1a\x19google/protobuf/any.proto\x1a\x1cspark/connect/commands.proto\x1a\x1fspark/connect/expressions.proto\x1a\x1dspark/connect/relations.proto\x1a\x19spark/connect/types.proto"t\n\x04Plan\x12-\n\x04root\x18\x01 \x01(\x0b\x32\x17.spark.connect.RelationH\x00R\x04root\x12\x32\n\x07\x63ommand\x18\x02 \x01(\x0b\x32\x16.spark.connect.CommandH\x00R\x07\x63ommandB\t\n\x07op_type"z\n\x0bUserContext\x12\x17\n\x07user_id\x18\x01 \x01(\tR\x06 [...] ) @@ -728,19 +728,19 @@ if _descriptor._USE_C_DESCRIPTORS == False: _CONFIGRESPONSE._serialized_start = 6111 _CONFIGRESPONSE._serialized_end = 6233 _ADDARTIFACTSREQUEST._serialized_start = 6236 - _ADDARTIFACTSREQUEST._serialized_end = 7053 - _ADDARTIFACTSREQUEST_ARTIFACTCHUNK._serialized_start = 6585 - _ADDARTIFACTSREQUEST_ARTIFACTCHUNK._serialized_end = 6638 - _ADDARTIFACTSREQUEST_SINGLECHUNKARTIFACT._serialized_start = 6640 - _ADDARTIFACTSREQUEST_SINGLECHUNKARTIFACT._serialized_end = 6751 - _ADDARTIFACTSREQUEST_BATCH._serialized_start = 6753 - _ADDARTIFACTSREQUEST_BATCH._serialized_end = 6846 - _ADDARTIFACTSREQUEST_BEGINCHUNKEDARTIFACT._serialized_start = 6849 - _ADDARTIFACTSREQUEST_BEGINCHUNKEDARTIFACT._serialized_end = 7042 - _ADDARTIFACTSRESPONSE._serialized_start = 7056 - _ADDARTIFACTSRESPONSE._serialized_end = 7244 - _ADDARTIFACTSRESPONSE_ARTIFACTSUMMARY._serialized_start = 7163 - _ADDARTIFACTSRESPONSE_ARTIFACTSUMMARY._serialized_end = 7244 - _SPARKCONNECTSERVICE._serialized_start = 7247 - _SPARKCONNECTSERVICE._serialized_end = 7612 + _ADDARTIFACTSREQUEST._serialized_end = 7107 + _ADDARTIFACTSREQUEST_ARTIFACTCHUNK._serialized_start = 6623 + _ADDARTIFACTSREQUEST_ARTIFACTCHUNK._serialized_end = 6676 + _ADDARTIFACTSREQUEST_SINGLECHUNKARTIFACT._serialized_start = 6678 + _ADDARTIFACTSREQUEST_SINGLECHUNKARTIFACT._serialized_end = 6789 + _ADDARTIFACTSREQUEST_BATCH._serialized_start = 6791 + _ADDARTIFACTSREQUEST_BATCH._serialized_end = 6884 + _ADDARTIFACTSREQUEST_BEGINCHUNKEDARTIFACT._serialized_start = 6887 + _ADDARTIFACTSREQUEST_BEGINCHUNKEDARTIFACT._serialized_end = 7080 + _ADDARTIFACTSRESPONSE._serialized_start = 7110 + _ADDARTIFACTSRESPONSE._serialized_end = 7298 + _ADDARTIFACTSRESPONSE_ARTIFACTSUMMARY._serialized_start = 7217 + _ADDARTIFACTSRESPONSE_ARTIFACTSUMMARY._serialized_end = 7298 + _SPARKCONNECTSERVICE._serialized_start = 7301 + _SPARKCONNECTSERVICE._serialized_end = 7666 # @@protoc_insertion_point(module_scope) diff --git a/python/pyspark/sql/connect/proto/base_pb2.pyi b/python/pyspark/sql/connect/proto/base_pb2.pyi index 8ea50f6a580..5ff14c9ac93 100644 --- a/python/pyspark/sql/connect/proto/base_pb2.pyi +++ b/python/pyspark/sql/connect/proto/base_pb2.pyi @@ -1604,6 +1604,7 @@ class AddArtifactsRequest(google.protobuf.message.Message): SESSION_ID_FIELD_NUMBER: builtins.int USER_CONTEXT_FIELD_NUMBER: builtins.int + CLIENT_TYPE_FIELD_NUMBER: builtins.int BATCH_FIELD_NUMBER: builtins.int BEGIN_CHUNK_FIELD_NUMBER: builtins.int CHUNK_FIELD_NUMBER: builtins.int @@ -1617,6 +1618,11 @@ class AddArtifactsRequest(google.protobuf.message.Message): @property def user_context(self) -> global___UserContext: """User context""" + client_type: builtins.str + """Provides optional information about the client sending the request. This field + can be used for language or version specific information and is only intended for + logging purposes and will not be interpreted by the server. + """ @property def batch(self) -> global___AddArtifactsRequest.Batch: ... @property @@ -1635,6 +1641,7 @@ class AddArtifactsRequest(google.protobuf.message.Message): *, session_id: builtins.str = ..., user_context: global___UserContext | None = ..., + client_type: builtins.str | None = ..., batch: global___AddArtifactsRequest.Batch | None = ..., begin_chunk: global___AddArtifactsRequest.BeginChunkedArtifact | None = ..., chunk: global___AddArtifactsRequest.ArtifactChunk | None = ..., @@ -1642,12 +1649,16 @@ class AddArtifactsRequest(google.protobuf.message.Message): def HasField( self, field_name: typing_extensions.Literal[ + "_client_type", + b"_client_type", "batch", b"batch", "begin_chunk", b"begin_chunk", "chunk", b"chunk", + "client_type", + b"client_type", "payload", b"payload", "user_context", @@ -1657,12 +1668,16 @@ class AddArtifactsRequest(google.protobuf.message.Message): def ClearField( self, field_name: typing_extensions.Literal[ + "_client_type", + b"_client_type", "batch", b"batch", "begin_chunk", b"begin_chunk", "chunk", b"chunk", + "client_type", + b"client_type", "payload", b"payload", "session_id", @@ -1671,6 +1686,11 @@ class AddArtifactsRequest(google.protobuf.message.Message): b"user_context", ], ) -> None: ... + @typing.overload + def WhichOneof( + self, oneof_group: typing_extensions.Literal["_client_type", b"_client_type"] + ) -> typing_extensions.Literal["client_type"] | None: ... + @typing.overload def WhichOneof( self, oneof_group: typing_extensions.Literal["payload", b"payload"] ) -> typing_extensions.Literal["batch", "begin_chunk", "chunk"] | None: ... --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org