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


##########
sql/core/src/main/scala/org/apache/spark/status/protobuf/sql/SQLExecutionUIDataSerializer.scala:
##########
@@ -64,7 +64,7 @@ class SQLExecutionUIDataSerializer extends ProtobufSerDe {
       getOptional(ui.hasCompletionTime, () => new Date(ui.getCompletionTime))
     val errorMessage = getOptional(ui.hasErrorMessage, () => 
ui.getErrorMessage)
     val metrics =
-      ui.getMetricsList.asScala.map(m => 
SQLPlanMetricSerializer.deserialize(m)).toSeq
+      ui.getMetricsList.asScala.map(m => 
SQLPlanMetricSerializer.deserialize(m))

Review Comment:
   If no `toSeq`, one operation is about 10ns. After adding `toSeq`, the delay 
will increase linearly with the length of the original data: 
   
   - 240ns when input length is 10
   - 1740ns when input length is 100
   - 16600ns when input length is 1000



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to