Skip to content

Commit 76e7183

Browse files
committed
adressing onQueryIdle on StreamingQueryListener in Spark 3.5
Signed-off-by: Sotaro Hikita <bering1814@gmail.com>
1 parent 71ed75e commit 76e7183

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

spark/sql-35/src/itest/scala/org/opensearch/spark/sql/streaming/StreamingQueryTestHarness.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ class StreamingQueryTestHarness[S <: java.io.Serializable : Encoder](val sparkSe
131131
}
132132
}
133133

134+
override def onQueryIdle(event: StreamingQueryListener.QueryIdleEvent): Unit = {
135+
captureQueryID(event.id)
136+
if (inputsSeen >= inputsRequired) {
137+
latch.countDown()
138+
}
139+
}
140+
134141
override def onQueryTerminated(event: StreamingQueryListener.QueryTerminatedEvent): Unit = {
135142
try {
136143
captureQueryID(event.id)

0 commit comments

Comments
 (0)