You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by maropu <gi...@git.apache.org> on 2018/04/05 04:02:31 UTC

[GitHub] spark pull request #20979: [SPARK-23588][SQL] CatalystToExternalMap should s...

GitHub user maropu opened a pull request:

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

    [SPARK-23588][SQL] CatalystToExternalMap should support interpreted execution

    ## What changes were proposed in this pull request?
    This pr supported interpreted mode for `CatalystToExternalMap`.
    
    ## How was this patch tested?
    Added tests in `ObjectExpressionsSuite`.
    


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

    $ git pull https://github.com/maropu/spark SPARK-23588

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

    https://github.com/apache/spark/pull/20979.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 #20979
    
----
commit 352777b162752397efac0556a87c924935000e4a
Author: Takeshi Yamamuro <ya...@...>
Date:   2018-03-12T05:32:22Z

    CatalystToExternalMap should support interpreted execution

----


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88935/
    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 #20979: [SPARK-23588][SQL] CatalystToExternalMap should s...

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

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


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    **[Test build #88925 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88925/testReport)** for PR 20979 at commit [`352777b`](https://github.com/apache/spark/commit/352777b162752397efac0556a87c924935000e4a).


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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/2470/
    Test PASSed.


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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/1999/
    Test PASSed.


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    ok, thanks!


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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/2217/
    Test PASSed.


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

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


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    **[Test build #89201 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89201/testReport)** for PR 20979 at commit [`acfad49`](https://github.com/apache/spark/commit/acfad4992e3028b75436c3bae7445841df774c48).


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

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


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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/1990/
    Test PASSed.


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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/2485/
    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 #20979: [SPARK-23588][SQL] CatalystToExternalMap should s...

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

    https://github.com/apache/spark/pull/20979#discussion_r182730393
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -1009,8 +1009,39 @@ case class CatalystToExternalMap private(
       override def children: Seq[Expression] =
         keyLambdaFunction :: valueLambdaFunction :: inputData :: Nil
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported")
    +  private lazy val inputMapType = inputData.dataType.asInstanceOf[MapType]
    +
    +  private lazy val keyConverter =
    +    CatalystTypeConverters.createToScalaConverter(inputMapType.keyType)
    +  private lazy val valueConverter =
    +    CatalystTypeConverters.createToScalaConverter(inputMapType.valueType)
    +
    +  private def newMapBuilder(): Builder[AnyRef, AnyRef] = {
    --- End diff --
    
    Can you make sure the builder only get's resolved once per expression instead of once per row. Can you address this in a follow-up?


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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 #20979: [SPARK-23588][SQL] CatalystToExternalMap should s...

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

    https://github.com/apache/spark/pull/20979#discussion_r179355419
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -988,8 +988,20 @@ case class CatalystToExternalMap private(
       override def children: Seq[Expression] =
         keyLambdaFunction :: valueLambdaFunction :: inputData :: Nil
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported")
    +  private lazy val toScalaValue: Any => Any = {
    +    assert(inputData.dataType.isInstanceOf[MapType])
    +    val mapType = inputData.dataType.asInstanceOf[MapType]
    +    CatalystTypeConverters.createToScalaConverter(mapType)
    --- End diff --
    
    yea, you're right. I'll update soon. 


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    **[Test build #89548 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89548/testReport)** for PR 20979 at commit [`17a0bca`](https://github.com/apache/spark/commit/17a0bcae832baa9b2c2c4f64fae40dd2cd804b64).
     * This patch **fails Scala style 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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    Disregard my earlier comment. Merging to master. Thanks! Can you address my last comment in a follow-up?


---

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


[GitHub] spark pull request #20979: [SPARK-23588][SQL] CatalystToExternalMap should s...

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

    https://github.com/apache/spark/pull/20979#discussion_r179347546
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -988,8 +988,20 @@ case class CatalystToExternalMap private(
       override def children: Seq[Expression] =
         keyLambdaFunction :: valueLambdaFunction :: inputData :: Nil
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported")
    +  private lazy val toScalaValue: Any => Any = {
    +    assert(inputData.dataType.isInstanceOf[MapType])
    +    val mapType = inputData.dataType.asInstanceOf[MapType]
    +    CatalystTypeConverters.createToScalaConverter(mapType)
    --- End diff --
    
    hmm, don't we need to support `collClass`?


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    **[Test build #89201 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89201/testReport)** for PR 20979 at commit [`acfad49`](https://github.com/apache/spark/commit/acfad4992e3028b75436c3bae7445841df774c48).
     * 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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    **[Test build #88935 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88935/testReport)** for PR 20979 at commit [`352777b`](https://github.com/apache/spark/commit/352777b162752397efac0556a87c924935000e4a).
     * 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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    **[Test build #89548 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89548/testReport)** for PR 20979 at commit [`17a0bca`](https://github.com/apache/spark/commit/17a0bcae832baa9b2c2c4f64fae40dd2cd804b64).


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    **[Test build #88935 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88935/testReport)** for PR 20979 at commit [`352777b`](https://github.com/apache/spark/commit/352777b162752397efac0556a87c924935000e4a).


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    Oh, your other PR conflicts with this one. Can you update the PR (and preferably address the newBuilder comment)? Thanks!


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    **[Test build #88925 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88925/testReport)** for PR 20979 at commit [`352777b`](https://github.com/apache/spark/commit/352777b162752397efac0556a87c924935000e4a).
     * This patch **fails Spark unit 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 #20979: [SPARK-23588][SQL] CatalystToExternalMap should s...

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

    https://github.com/apache/spark/pull/20979#discussion_r179430079
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -988,8 +988,20 @@ case class CatalystToExternalMap private(
       override def children: Seq[Expression] =
         keyLambdaFunction :: valueLambdaFunction :: inputData :: Nil
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported")
    +  private lazy val toScalaValue: Any => Any = {
    +    assert(inputData.dataType.isInstanceOf[MapType])
    +    val mapType = inputData.dataType.asInstanceOf[MapType]
    +    CatalystTypeConverters.createToScalaConverter(mapType)
    --- End diff --
    
    I am not sure if I buy that argument. This expression can produce a map type other than `scala.collection.immutable.Map`, so we should either implement this, or we should remove the ability to produce different map types.


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    **[Test build #89567 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89567/testReport)** for PR 20979 at commit [`07f4c82`](https://github.com/apache/spark/commit/07f4c824f48f6eeb03b2b44749a0ac0be1d35a6f).
     * 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 issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

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


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    **[Test build #89567 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89567/testReport)** for PR 20979 at commit [`07f4c82`](https://github.com/apache/spark/commit/07f4c824f48f6eeb03b2b44749a0ac0be1d35a6f).


---

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


[GitHub] spark pull request #20979: [SPARK-23588][SQL] CatalystToExternalMap should s...

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

    https://github.com/apache/spark/pull/20979#discussion_r179360604
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -988,8 +988,20 @@ case class CatalystToExternalMap private(
       override def children: Seq[Expression] =
         keyLambdaFunction :: valueLambdaFunction :: inputData :: Nil
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported")
    +  private lazy val toScalaValue: Any => Any = {
    +    assert(inputData.dataType.isInstanceOf[MapType])
    +    val mapType = inputData.dataType.asInstanceOf[MapType]
    +    CatalystTypeConverters.createToScalaConverter(mapType)
    --- End diff --
    
    We already have a helper function for `Class[_] -> DataType`? It seems the most similar one is `HiveInspectors.javaTypeToDataType`?


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

    https://github.com/apache/spark/pull/20979
  
    retest this please


---

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


[GitHub] spark issue #20979: [SPARK-23588][SQL] CatalystToExternalMap should support ...

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

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


---

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


[GitHub] spark pull request #20979: [SPARK-23588][SQL] CatalystToExternalMap should s...

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

    https://github.com/apache/spark/pull/20979#discussion_r179705283
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -988,8 +988,20 @@ case class CatalystToExternalMap private(
       override def children: Seq[Expression] =
         keyLambdaFunction :: valueLambdaFunction :: inputData :: Nil
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported")
    +  private lazy val toScalaValue: Any => Any = {
    +    assert(inputData.dataType.isInstanceOf[MapType])
    +    val mapType = inputData.dataType.asInstanceOf[MapType]
    +    CatalystTypeConverters.createToScalaConverter(mapType)
    --- End diff --
    
    ok, I'll consider again.


---

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