You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/11/22 02:29:59 UTC

[GitHub] [spark] ulysses-you commented on a diff in pull request #38747: [SPARK-40834][SQL][FOLLOWUP] Take care of legacy query end events

ulysses-you commented on code in PR #38747:
URL: https://github.com/apache/spark/pull/38747#discussion_r1028738643


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala:
##########
@@ -121,7 +121,11 @@ object SQLExecution {
               SparkThrowableHelper.getMessage(e)
           }
           val event = SparkListenerSQLExecutionEnd(
-            executionId, System.currentTimeMillis(), errorMessage)
+            executionId,
+            System.currentTimeMillis(),
+            // Use empty string to indicate no error, as None may mean events generated by old
+            // versions of Spark.
+            errorMessage.orElse(Some("")))

Review Comment:
   Better to add docs at `SparkListenerSQLExecutionEnd`, `Some("")` is not an error. Otherwise developers may confuse.



-- 
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-unsubscribe@spark.apache.org

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


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