zsxwing commented on PR #36589:
URL: https://github.com/apache/spark/pull/36589#issuecomment-1130034286

   @HyukjinKwon Thanks for fixing this. Could you write a python test like 
https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamSuite.scala#L1172-L1178
 ? This test was written before we supported foreach. Now with `foreachBatch`, 
we should be able to throw an exception easily using
   ```
   def runBatch(df, id):
      use py4j to throw a jvm exception
   df.writeStream.foreachBatch(runBatch).start()
   ```


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