Github user jacek-lewandowski commented on the pull request: https://github.com/apache/spark/pull/4220#issuecomment-72274441 It serializes the object and then deserializes so I suppose this is a deep copy. For the `stringPropertyNames` - you can, but this will not be a 1:1 copy: ```scala val parent = new Properties() parent.setProperty("test1", "A") val child = new Properties(parent) child.put("test1", "C") child.put("test2", "B") child.getProperty("test1") child.remove("test1") child.getProperty("test1") ``` will give you ``` scala> res17: Object = C scala> res18: String = A ``` When you copy in the way you suggested, there will be `null` after removal.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org