hvanhovell opened a new pull request, #42473:
URL: https://github.com/apache/spark/pull/42473
### What changes were proposed in this pull request?
Connects arrow deserialization currently does not work with REPL generated
classes. For example the following code would fail:
```scala
case class MyTestClass(value: Int) {
override def toString: String = value.toString
}
spark.range(10).map(i => MyTestClass(i.toInt)).collect()
```
The problem is that for instantiation of the `MyTestClass` class we need the
instance of the class that it was defined in (its outerscope). In Spark we have
a mechanism called `OuterScopes` to register these instances in. The
`ArrowDeserializer` was not resolving this outer instance. This PR fixes this.
We have a similar issue on the executor/driver side. This will be fixed in a
different PR.
### Why are the changes needed?
It is a bug.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
I have added tests to `ReplE2Esuite` and to the `ArrowEncoderSuite`.
--
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]