beliefer commented on code in PR #47084:
URL: https://github.com/apache/spark/pull/47084#discussion_r1665205152
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala:
##########
@@ -306,9 +296,13 @@ class SimpleFunctionRegistry
extends SimpleFunctionRegistryBase[Expression]
with FunctionRegistry {
- override def clone(): SimpleFunctionRegistry = synchronized {
+ override def clone(): SimpleFunctionRegistry = {
val registry = new SimpleFunctionRegistry
- functionBuilders.iterator.foreach { case (name, (info, builder)) =>
+ val iterator = functionBuilders.entrySet().iterator()
+ while (iterator.hasNext) {
+ val entry = iterator.next()
+ val name = entry.getKey
+ val (info, builder) = entry.getValue
Review Comment:
Good idea.
--
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]