WweiL commented on code in PR #41540:
URL: https://github.com/apache/spark/pull/41540#discussion_r1230025131
##########
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))
Review Comment:
IMHO it makes less meaning given that we will ended up changing these to
jackson API. Also the test is a little bit hard because we don't have a
`fromJson` API in scala side. The python side json
[code](https://github.com/apache/spark/blob/d725d6d2b2f73243b57f151e998319e4511ac225/python/pyspark/sql/tests/streaming/test_streaming_listener.py#L330-L360)
(except the `StreamingQueryProcess` one) is directly constructed from printing
out `event.json` in python side.
In the next PR there will be tests on Connect, which implicitly tests this
anyways, do you think we could just defer the test there : )
--
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]