jingz-db commented on code in PR #45467: URL: https://github.com/apache/spark/pull/45467#discussion_r1534358386
########## sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/TransformWithStateExec.scala: ########## @@ -271,57 +320,111 @@ case class TransformWithStateExec( case _ => } - if (isStreaming) { - child.execute().mapPartitionsWithStateStore[InternalRow]( + if (hasInitialState) { + val storeConf = new StateStoreConf(session.sqlContext.sessionState.conf) + val hadoopConfBroadcast = sparkContext.broadcast( Review Comment: I am not 100% percent sure, but this will distribute the read-only variable `hadoopConf` to all executors - similar as here: https://github.com/apache/spark/blob/74a9c6cfc6ea937031fe1ca5db539139322339a5/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/state/StateScanBuilder.scala#L55-L57 -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org