GitHub user cloud-fan opened a pull request:

    https://github.com/apache/spark/pull/22812

    [SPARK-25817][SQL] Dataset encoder should support combination of map and 
product type

    ## What changes were proposed in this pull request?
    
    After https://github.com/apache/spark/pull/22745 , Dataset encoder supports 
the combination of java bean and map type. This PR is to fix the Scala side.
    
    The reason why it didn't work before is, `CatalystToExternalMap` tries to 
get the data type of the input map expression, while it can be unresolved and 
its data type is known. To fix it, we can follow `UnresolvedMapObjects`, to 
create a `UnresolvedCatalystToExternalMap`, and only create 
`CatalystToExternalMap` when the input map expression is resolved and the data 
type is known.
    
    ## How was this patch tested?
    
    enable a old test case

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cloud-fan/spark map

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/22812.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 #22812
    
----
commit da31d2602b8e12eb8949336cf14b903c0df731cf
Author: Wenchen Fan <wenchen@...>
Date:   2018-10-24T04:21:44Z

    Dataset encoder should support combination of map and product type

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to