lifulong commented on code in PR #47281: URL: https://github.com/apache/spark/pull/47281#discussion_r1673671369
########## sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala: ########## @@ -279,6 +281,27 @@ class SparkSession private( initialSessionOptions) } + /** + * Clone JobArtifact set info from parent session while call cloneSession api. + * + * @since 3.5.1 + */ + private[sql] def cloneJobArtifactSet(parentSessionId: String, + childSessionId: String): Unit = { + sparkContext.addedJars.get(parentSessionId).map{ jars => + val newJars = new ConcurrentHashMap[String, Long]().asScala ++= jars + sparkContext.addedJars.put(childSessionId, newJars) + } + sparkContext.addedFiles.get(parentSessionId).map{ files => + val newFiles = new ConcurrentHashMap[String, Long]().asScala ++= files + sparkContext.addedFiles.put(childSessionId, newFiles) + } + sparkContext.addedArchives.get(parentSessionId).map{ archives => Review Comment: ok, i will optimize the code by your advice -- 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