You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by ueshin <gi...@git.apache.org> on 2018/07/03 08:16:15 UTC

[GitHub] spark pull request #21703: [SPARK-24732][SQL] Type coercion between MapTypes...

GitHub user ueshin opened a pull request:

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

    [SPARK-24732][SQL] Type coercion between MapTypes.

    ## What changes were proposed in this pull request?
    
    Currently we don't allow type coercion between maps.
    We can support type coercion between MapTypes where both the key types and the value types are compatible.
    
    ## How was this patch tested?
    
    Added tests.


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

    $ git pull https://github.com/ueshin/apache-spark issues/SPARK-24732/maptypecoercion

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

    https://github.com/apache/spark/pull/21703.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 #21703
    
----
commit 928501a63f2ae90b4d95949e6fc505b762d03ac7
Author: Takuya UESHIN <ue...@...>
Date:   2018-07-03T08:08:25Z

    Type coercion between MapTypes.

----


---

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


[GitHub] spark issue #21703: [SPARK-24732][SQL] Type coercion between MapTypes.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21703
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #21703: [SPARK-24732][SQL] Type coercion between MapTypes...

Posted by ueshin <gi...@git.apache.org>.
Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21703#discussion_r200050957
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala ---
    @@ -179,6 +179,12 @@ object TypeCoercion {
           .orElse((t1, t2) match {
             case (ArrayType(et1, containsNull1), ArrayType(et2, containsNull2)) =>
               findWiderTypeForTwo(et1, et2).map(ArrayType(_, containsNull1 || containsNull2))
    +        case (MapType(kt1, vt1, valueContainsNull1), MapType(kt2, vt2, valueContainsNull2)) =>
    --- End diff --
    
    Submitted #21713.


---

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


[GitHub] spark issue #21703: [SPARK-24732][SQL] Type coercion between MapTypes.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21703
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/635/
    Test PASSed.


---

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


[GitHub] spark issue #21703: [SPARK-24732][SQL] Type coercion between MapTypes.

Posted by ueshin <gi...@git.apache.org>.
Github user ueshin commented on the issue:

    https://github.com/apache/spark/pull/21703
  
    cc @gatorsmile @cloud-fan 


---

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


[GitHub] spark issue #21703: [SPARK-24732][SQL] Type coercion between MapTypes.

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21703
  
    **[Test build #92559 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92559/testReport)** for PR 21703 at commit [`928501a`](https://github.com/apache/spark/commit/928501a63f2ae90b4d95949e6fc505b762d03ac7).


---

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


[GitHub] spark issue #21703: [SPARK-24732][SQL] Type coercion between MapTypes.

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/21703
  
    Merged to master.


---

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


[GitHub] spark issue #21703: [SPARK-24732][SQL] Type coercion between MapTypes.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21703
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #21703: [SPARK-24732][SQL] Type coercion between MapTypes...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21703#discussion_r200005737
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala ---
    @@ -179,6 +179,12 @@ object TypeCoercion {
           .orElse((t1, t2) match {
             case (ArrayType(et1, containsNull1), ArrayType(et2, containsNull2)) =>
               findWiderTypeForTwo(et1, et2).map(ArrayType(_, containsNull1 || containsNull2))
    +        case (MapType(kt1, vt1, valueContainsNull1), MapType(kt2, vt2, valueContainsNull2)) =>
    --- End diff --
    
    not related to this PR, but shall we also handle struct type here?


---

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


[GitHub] spark issue #21703: [SPARK-24732][SQL] Type coercion between MapTypes.

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/21703
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92559/
    Test PASSed.


---

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


[GitHub] spark issue #21703: [SPARK-24732][SQL] Type coercion between MapTypes.

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/21703
  
    **[Test build #92559 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/92559/testReport)** for PR 21703 at commit [`928501a`](https://github.com/apache/spark/commit/928501a63f2ae90b4d95949e6fc505b762d03ac7).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #21703: [SPARK-24732][SQL] Type coercion between MapTypes...

Posted by ueshin <gi...@git.apache.org>.
Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21703#discussion_r200005967
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala ---
    @@ -179,6 +179,12 @@ object TypeCoercion {
           .orElse((t1, t2) match {
             case (ArrayType(et1, containsNull1), ArrayType(et2, containsNull2)) =>
               findWiderTypeForTwo(et1, et2).map(ArrayType(_, containsNull1 || containsNull2))
    +        case (MapType(kt1, vt1, valueContainsNull1), MapType(kt2, vt2, valueContainsNull2)) =>
    --- End diff --
    
    Sure, let me think of it.


---

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


[GitHub] spark issue #21703: [SPARK-24732][SQL] Type coercion between MapTypes.

Posted by maropu <gi...@git.apache.org>.
Github user maropu commented on the issue:

    https://github.com/apache/spark/pull/21703
  
    LGTM


---

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


[GitHub] spark pull request #21703: [SPARK-24732][SQL] Type coercion between MapTypes...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

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