WweiL commented on code in PR #41540:
URL: https://github.com/apache/spark/pull/41540#discussion_r1227073345


##########
sql/core/src/main/scala/org/apache/spark/sql/streaming/StreamingQueryListener.scala:
##########
@@ -123,7 +128,17 @@ object StreamingQueryListener {
       val id: UUID,
       val runId: UUID,
       val name: String,
-      val timestamp: String) extends Event
+      val timestamp: String) extends Event {
+
+    def json: String = compact(render(jsonValue))
+
+    private def jsonValue: JValue = {

Review Comment:
   Thanks for the reply! Searching for the usage of this API I actually found 
that there are already JSON serialization implemented for these events
   
   
https://github.com/apache/spark/blame/master/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQueryListenerSuite.scala#L267-L278
 
   
   I think I can actually remove these fields, wdyt? Also cc @HyukjinKwon 
@HeartSaVioR 



-- 
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