hvanhovell commented on code in PR #50006:
URL: https://github.com/apache/spark/pull/50006#discussion_r1962298751
##########
sql/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/StreamingForeachBatchHelper.scala:
##########
@@ -135,7 +136,10 @@ object StreamingForeachBatchHelper extends Logging {
sessionHolder: SessionHolder): (ForeachBatchFnType, AutoCloseable) = {
val port = SparkConnectService.localPort
- val connectUrl = s"sc://localhost:$port/;user_id=${sessionHolder.userId}"
+ var connectUrl = s"sc://localhost:$port/;user_id=${sessionHolder.userId}"
+ Connect.getAuthenticateToken.foreach { token =>
Review Comment:
Nit: If you like reusing code then factor this into a helper function in
`sql/connect/server/src/main/scala/org/apache/spark/sql/connect/config/Connect.scala`.
```scala
def authenticationTokenParam: String = getAuthenticateToken.map(token =>
";token=" + token).getOrElse("")
```
--
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]