GitHub user vofque opened a pull request:
https://github.com/apache/spark/pull/22768
[SPARK-21402][SQL][BACKPORT-2.2] Fix java array of structs deserialization
This PR is to backport #22708 to branch 2.2.
## What changes were proposed in this pull request?
MapObjects expression is used to map array elements to java beans. Struct
type of elements is inferred from java bean structure and ends up with mixed up
field order.
I used UnresolvedMapObjects instead of MapObjects, which allows to provide
element type for MapObjects during analysis based on the resolved input data,
not on the java bean.
## How was this patch tested?
Added a test case.
Built complete project on travis.
@dongjoon-hyun @cloud-fan
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vofque/spark SPARK-21402-2.2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/22768.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 #22768
----
commit f27db093fc301e4cfb559a79b2fd17e00bdfd43c
Author: Vladimir Kuriatkov <vofque@...>
Date: 2018-10-18T07:50:52Z
Merge pull request #11 from apache/branch-2.2
Sync with apache/spark
commit 90d3a7498165ff1177a87d95245f1d4fdfcc4c64
Author: Vladimir Kuriatkov <vladimir_kuriatkov@...>
Date: 2018-10-11T12:56:15Z
Fix java array of structs deserialization
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]