Github user shivaram commented on a diff in the pull request:
https://github.com/apache/spark/pull/7280#discussion_r34591372
--- Diff: core/src/main/scala/org/apache/spark/api/r/SerDe.scala ---
@@ -46,9 +46,18 @@ private[spark] object SerDe {
dis.readByte().toChar
}
- def readObject(dis: DataInputStream): Object = {
+ def readObject(dis: DataInputStream, typeName: String = ""): Object = {
--- End diff --
Yeah I think its fair assumption that the SerDe will return a double in
case the schema type is a float. If its not a double it means something went
wrong somewhere down the line ? If we want to be really careful we could add a
check with `isInstanceOf[Double]` and throw an exception saying `Unexpected
type: Expected Double got <>`.
BTW the reason I'm trying to move this out of SerDe is that the
`readObject` code path is used by everything else while the float, double issue
only comes up in the case where we create a DataFrame from a local R object.
---
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]