You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2024/12/16 04:23:16 UTC
(spark) branch branch-3.5 updated: [SPARK-50430][CORE][FOLLOW-UP] Keep the logic of manual putting key and values in Properties
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.5 by this push:
new 8168ea8548a4 [SPARK-50430][CORE][FOLLOW-UP] Keep the logic of manual putting key and values in Properties
8168ea8548a4 is described below
commit 8168ea8548a4935a0506edcadc601850096a10ab
Author: Hyukjin Kwon <gu...@apache.org>
AuthorDate: Tue Dec 3 15:37:43 2024 +0900
[SPARK-50430][CORE][FOLLOW-UP] Keep the logic of manual putting key and values in Properties
This PR proposes to actually more conservatively preserve the original code of creating new properties instead of cloning.
Previous codes only copied the key and values but `clone` actually copies more fields in `Properties`. `cloneProperties` is being used in Spark Core, and all other components so I propose to keep the logic as is.
This is more a fix of a potential bug.
No, it is difficult to add a test.
No.
Closes #49036 from HyukjinKwon/SPARK-50430-followup.
Authored-by: Hyukjin Kwon <gu...@apache.org>
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
(cherry picked from commit 4abaab3ffeba5a3d39216e7224928bb82b254e22)
Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
core/src/main/scala/org/apache/spark/util/Utils.scala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala b/core/src/main/scala/org/apache/spark/util/Utils.scala
index 8762f0a6cdbc..a33bb33ea9c0 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -2982,7 +2982,9 @@ private[spark] object Utils
if (props == null) {
return props
}
- props.clone().asInstanceOf[Properties]
+ val resultProps = new Properties()
+ resultProps.putAll(props.clone().asInstanceOf[Properties])
+ resultProps
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org