WweiL commented on code in PR #40937:
URL: https://github.com/apache/spark/pull/40937#discussion_r1177124740
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -2092,6 +2097,11 @@ class SparkConnectPlanner(val session: SparkSession) {
case path => writer.start(path)
}
+ // Register the new query so that the session and query references are
cached.
+ SparkConnectService.streamingSessionManager.registerNewStreamingQuery(
Review Comment:
If the query throws before this line. What would happen? I would think the
`orElse` would be triggered:
```
val query = SparkConnectService.streamingSessionManager
.findCachedQuery(id, session) // Common case: query is cached in
connect session manager.
.orElse { // Else try to find it in active streams. Mostly will not be
found here.
Option(session.streams.get(id))
```
And that'd still return a query ID not found exception?
--
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]