LuciferYang commented on code in PR #39682:
URL: https://github.com/apache/spark/pull/39682#discussion_r1083261688


##########
sql/core/src/main/scala/org/apache/spark/status/protobuf/sql/SQLExecutionUIDataSerializer.scala:
##########
@@ -23,17 +23,17 @@ import collection.JavaConverters._
 
 import org.apache.spark.sql.execution.ui.SQLExecutionUIData
 import org.apache.spark.status.protobuf.{JobExecutionStatusSerializer, 
ProtobufSerDe, StoreTypes}
-import org.apache.spark.status.protobuf.Utils.getOptional
+import org.apache.spark.status.protobuf.Utils._
 
 class SQLExecutionUIDataSerializer extends ProtobufSerDe[SQLExecutionUIData] {
 
   override def serialize(ui: SQLExecutionUIData): Array[Byte] = {
     val builder = StoreTypes.SQLExecutionUIData.newBuilder()
     builder.setExecutionId(ui.executionId)
     builder.setRootExecutionId(ui.rootExecutionId)
-    Option(ui.description).foreach(builder.setDescription)
-    Option(ui.details).foreach(builder.setDetails)
-    
Option(ui.physicalPlanDescription).foreach(builder.setPhysicalPlanDescription)
+    setStringField(ui.description, builder.setDescription)

Review Comment:
   A strange compilation error with Java 11 and 17. Do you have any 
suggestions? @gengliangwang 
   
   ```
   [ERROR] [Error] 
/Users/yangjie01/SourceCode/git/spark-mine-12/sql/core/src/main/scala/org/apache/spark/status/protobuf/sql/SQLExecutionUIDataSerializer.scala:34:
 type mismatch;
    found   : 
org.apache.spark.status.protobuf.StoreTypes.SQLExecutionUIData.Builder
    required: com.google.protobuf.MessageOrBuilder
   
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to