This is an automated email from the ASF dual-hosted git repository. gengliang 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 17b300b9d01 [SPARK-41752][SQL][FOLLOW-UP] Fix Protobuf serializer for SQLExecutionUIData 17b300b9d01 is described below commit 17b300b9d0135b910656842cbd2c40bc39bd2358 Author: Gengliang Wang <gengli...@apache.org> AuthorDate: Tue Jan 10 19:39:32 2023 -0800 [SPARK-41752][SQL][FOLLOW-UP] Fix Protobuf serializer for SQLExecutionUIData ### What changes were proposed in this pull request? The new field `rootExecutionId` of `SQLExecutionUIData` is not correctly serialized/deserialized in https://github.com/apache/spark/pull/39268. This PR is to fix it. ### Why are the changes needed? Bug fix ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? UT Closes #39489 from gengliangwang/SPARK-41752. Authored-by: Gengliang Wang <gengli...@apache.org> Signed-off-by: Gengliang Wang <gengli...@apache.org> --- .../apache/spark/status/protobuf/store_types.proto | 26 +++++++++++----------- .../sql/SQLExecutionUIDataSerializer.scala | 1 + .../sql/KVStoreProtobufSerializerSuite.scala | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/core/src/main/protobuf/org/apache/spark/status/protobuf/store_types.proto b/core/src/main/protobuf/org/apache/spark/status/protobuf/store_types.proto index 9001847e872..2e67092cf70 100644 --- a/core/src/main/protobuf/org/apache/spark/status/protobuf/store_types.proto +++ b/core/src/main/protobuf/org/apache/spark/status/protobuf/store_types.proto @@ -405,19 +405,19 @@ message SQLPlanMetric { message SQLExecutionUIData { int64 execution_id = 1; - string description = 2; - string details = 3; - string physical_plan_description = 4; - map<string, string> modified_configs = 5; - repeated SQLPlanMetric metrics = 6; - int64 submission_time = 7; - optional int64 completion_time = 8; - optional string error_message = 9; - map<int64, JobExecutionStatus> jobs = 10; - repeated int64 stages = 11; - bool metric_values_is_null = 12; - map<int64, string> metric_values = 13; - optional int64 root_execution_id = 14; + int64 root_execution_id = 2; + string description = 3; + string details = 4; + string physical_plan_description = 5; + map<string, string> modified_configs = 6; + repeated SQLPlanMetric metrics = 7; + int64 submission_time = 8; + optional int64 completion_time = 9; + optional string error_message = 10; + map<int64, JobExecutionStatus> jobs = 11; + repeated int64 stages = 12; + bool metric_values_is_null = 13; + map<int64, string> metric_values = 14; } message SparkPlanGraphNode { diff --git a/sql/core/src/main/scala/org/apache/spark/status/protobuf/sql/SQLExecutionUIDataSerializer.scala b/sql/core/src/main/scala/org/apache/spark/status/protobuf/sql/SQLExecutionUIDataSerializer.scala index 1ccaf5c68c9..dcce69b803c 100644 --- a/sql/core/src/main/scala/org/apache/spark/status/protobuf/sql/SQLExecutionUIDataSerializer.scala +++ b/sql/core/src/main/scala/org/apache/spark/status/protobuf/sql/SQLExecutionUIDataSerializer.scala @@ -33,6 +33,7 @@ class SQLExecutionUIDataSerializer extends ProtobufSerDe { val ui = input.asInstanceOf[SQLExecutionUIData] val builder = StoreTypes.SQLExecutionUIData.newBuilder() builder.setExecutionId(ui.executionId) + builder.setRootExecutionId(ui.rootExecutionId) builder.setDescription(ui.description) builder.setDetails(ui.details) builder.setPhysicalPlanDescription(ui.physicalPlanDescription) diff --git a/sql/core/src/test/scala/org/apache/spark/status/protobuf/sql/KVStoreProtobufSerializerSuite.scala b/sql/core/src/test/scala/org/apache/spark/status/protobuf/sql/KVStoreProtobufSerializerSuite.scala index cfb5093611b..41f185900ad 100644 --- a/sql/core/src/test/scala/org/apache/spark/status/protobuf/sql/KVStoreProtobufSerializerSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/status/protobuf/sql/KVStoreProtobufSerializerSuite.scala @@ -34,6 +34,7 @@ class KVStoreProtobufSerializerSuite extends SparkFunSuite { val bytes = serializer.serialize(input) val result = serializer.deserialize(bytes, classOf[SQLExecutionUIData]) assert(result.executionId == input.executionId) + assert(result.rootExecutionId == input.rootExecutionId) assert(result.description == input.description) assert(result.details == input.details) assert(result.physicalPlanDescription == input.physicalPlanDescription) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org