beliefer commented on code in PR #52693:
URL: https://github.com/apache/spark/pull/52693#discussion_r2458500301
##########
core/src/main/scala/org/apache/spark/SparkConf.scala:
##########
@@ -459,9 +459,8 @@ class SparkConf(loadDefaults: Boolean)
/** Gets all the avro schemas in the configuration used in the generic Avro
record serializer */
def getAvroSchema: Map[Long, String] = {
- getAll.filter { case (k, v) => k.startsWith(avroNamespace) }
- .map { case (k, v) => (k.substring(avroNamespace.length).toLong, v) }
- .toMap
+ val f = (k: String) => k.substring(avroNamespace.length).toLong
+ getAllWithPrefix(avroNamespace, f).toMap
Review Comment:
I just want reuse the new API. I will revert this change if you insist.
--
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]