Github user falaki commented on a diff in the pull request:
https://github.com/apache/spark/pull/16154#discussion_r91173424
--- Diff: core/src/main/scala/org/apache/spark/api/r/SerDe.scala ---
@@ -272,18 +282,22 @@ private[spark] object SerDe {
}
}
- private def writeKeyValue(dos: DataOutputStream, key: Object, value:
Object): Unit = {
+ private def writeKeyValue(
+ dos: DataOutputStream,
+ key: Object,
+ value: Object,
+ jvmObjectTracker: JVMObjectTracker): Unit = {
if (key == null) {
throw new IllegalArgumentException("Key in map can't be null.")
} else if (!key.isInstanceOf[String]) {
throw new IllegalArgumentException(s"Invalid map key type:
${key.getClass.getName}")
}
writeString(dos, key.asInstanceOf[String])
- writeObject(dos, value)
+ writeObject(dos, value, jvmObjectTracker)
}
- def writeObject(dos: DataOutputStream, obj: Object): Unit = {
+ def writeObject(dos: DataOutputStream, obj: Object, jvmObjectTracker:
JVMObjectTracker): Unit = {
--- End diff --
I agree. Using implicits has its readability downsides. I don't have a
strong opinion in this case.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]