GitHub user michalsenkyr opened a pull request: https://github.com/apache/spark/pull/16240
[SPARK-16792][SQL] Dataset containing a Case Class with a List type causes a CompileException (converting sequence to list) ## What changes were proposed in this pull request? Added a `toList` call at the end of the code generated by `ScalaReflection.deserializerFor` if the requested type is `List[_]` Care was taken to preserve the original deserialization for `Seq[_]` to avoid the overhead of `toList` in cases where it is not needed Also fixes [SPARK-16815] Dataset[List[T]] leads to ArrayStoreException ## How was this patch tested? ```bash ./build/mvn -DskipTests clean package && ./dev/run-tests ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/michalsenkyr/spark sql-caseclass-list-fix Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16240.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #16240 ---- commit c47f1895711d5093e4e677ad7ac5f02fe9eb3b61 Author: Michal Senkyr <mike.sen...@gmail.com> Date: 2016-12-09T22:36:49Z Added call to toList if deserializing into List commit 8c15b475fb053aef19906d6a465309d299ca7b4d Author: Michal Senkyr <mike.sen...@gmail.com> Date: 2016-12-09T23:30:49Z Added unit test ---- --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org