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

[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

GitHub user kiszk opened a pull request:

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

    [SPARK-23582][SQL] StaticInvoke should support interpreted execution

    ## What changes were proposed in this pull request?
    
    This pr added interpreted execution for `StaticInvoke`.
    
    ## 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/kiszk/spark SPARK-23582

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

    https://github.com/apache/spark/pull/20753.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 #20753
    
----
commit 0790deabf238201451438d2b95f108ced9bcd027
Author: Kazuaki Ishizaki <is...@...>
Date:   2018-03-07T00:30:40Z

    initial prototype

----


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r173136700
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -133,8 +134,21 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    if (staticObject == null) {
    +      throw new RuntimeException("The static class cannot be null.")
    +    }
    +
    +    val parmTypes = arguments.map(e =>
    +      CallMethodViaReflection.typeMapping.getOrElse(e.dataType,
    +        Seq(e.dataType.asInstanceOf[ObjectType].cls))(0))
    +    val parms = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val method = staticObject.getDeclaredMethod(functionName, parmTypes : _*)
    --- End diff --
    
    Unfortunately, this movement caused failure of reflection.


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88592 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88592/testReport)** for PR 20753 at commit [`d828f46`](https://github.com/apache/spark/commit/d828f46bc1a7e4eee8838ae655eb8a8b11e42271).
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r177411749
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -188,8 +189,30 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    val args = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val argClasses = ScalaReflection.expressionJavaClasses(arguments)
    +    val cls = if (staticObject.getName == objectName) {
    +      staticObject
    +    } else {
    +      Utils.classForName(objectName)
    +    }
    +    val method = cls.getDeclaredMethod(functionName, argClasses : _*)
    --- End diff --
    
    Why are we resolving this during evaluation, shouldn't we be able to determine this statically?


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88822 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88822/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88822 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88822/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88029 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88029/testReport)** for PR 20753 at commit [`f570692`](https://github.com/apache/spark/commit/f570692616cfd7921470029051705c44e4b9c5db).
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    @hvanhovell @kiszk Yes, the old school JDK reflection does perform bytecode generation to speed it up, since the JDK1.4 era. But the advantage of fully optimized `MethodHandle` versus reflection `Method.invoke` is that the former performs privilege checks at `MethodHandle` creation time, whereas the latter is required to perform privilege checks at every invocation (and that's not covered by the generated bytecode). So theoretically the `MethodHandle` version can be faster.
    
    But note that even in OpenJDK8, the HotSpot VM is still exploring ways to optimize `MethodHandle` performance, and it's somewhat picky about the shape of the `MethodHandle`s, so it's not like we will always get better performance just by sticking it in place of reflection. It'll need some tuning / trial-and-error. We don't have to get it right in the first cut.


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    Sure


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88585 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88585/testReport)** for PR 20753 at commit [`1e3aa0f`](https://github.com/apache/spark/commit/1e3aa0f5b3012bc7eb13fac7556423661f0867a2).
     * This patch **fails to build**.
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88100 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88100/testReport)** for PR 20753 at commit [`f74d48e`](https://github.com/apache/spark/commit/f74d48ed3e8f8a96eb69fdabe4eec51d4e0a8508).
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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/1748/
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r177480722
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -188,8 +189,30 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    val args = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val argClasses = ScalaReflection.expressionJavaClasses(arguments)
    +    val cls = if (staticObject.getName == objectName) {
    +      staticObject
    +    } else {
    +      Utils.classForName(objectName)
    +    }
    +    val method = cls.getDeclaredMethod(functionName, argClasses : _*)
    --- End diff --
    
    @kiszk just to be absolutely sure: you were seeing this before making the val lazy? Anyway please add `@transient` here.


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r177468352
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -188,8 +189,30 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    val args = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val argClasses = ScalaReflection.expressionJavaClasses(arguments)
    +    val cls = if (staticObject.getName == objectName) {
    +      staticObject
    +    } else {
    +      Utils.classForName(objectName)
    +    }
    +    val method = cls.getDeclaredMethod(functionName, argClasses : _*)
    --- End diff --
    
    Naive static resolution caused the following Serialization exception. Now, I succeeded to resolve once using `lazy` as follows:
    ```
      lazy val method = {
        val argClasses = ScalaReflection.expressionJavaClasses(arguments)
        val cls = if (staticObject.getName == objectName) {
          staticObject
        } else {
          Utils.classForName(objectName)
        }
        cls.getDeclaredMethod(functionName, argClasses : _*)
      }
    ```
    
    ```
    java.lang.reflect.Method
    Serialization stack:
    	- object not serializable (class: java.lang.reflect.Method, value: public static java.lang.Boolean java.lang.Boolean.valueOf(java.lang.String))
    	- field (class: org.apache.spark.sql.catalyst.expressions.objects.StaticInvoke, name: method, type: class java.lang.reflect.Method)
    	- object (class org.apache.spark.sql.catalyst.expressions.objects.StaticInvoke, staticinvoke(class java.lang.Boolean, ObjectType(class java.lang.Boolean), valueOf, input[0, java.lang.String, true], true, true))
    java.io.NotSerializableException: java.lang.reflect.Method
    Serialization stack:
    	- object not serializable (class: java.lang.reflect.Method, value: public static java.lang.Boolean java.lang.Boolean.valueOf(java.lang.String))
    	- field (class: org.apache.spark.sql.catalyst.expressions.objects.StaticInvoke, name: method, type: class java.lang.reflect.Method)
    	- object (class org.apache.spark.sql.catalyst.expressions.objects.StaticInvoke, staticinvoke(class java.lang.Boolean, ObjectType(class java.lang.Boolean), valueOf, input[0, java.lang.String, true], true, true))
    	at org.apache.spark.serializer.SerializationDebugger$.improveException(SerializationDebugger.scala:40)
    	at org.apache.spark.serializer.JavaSerializationStream.writeObject(JavaSerializer.scala:46)
    	at org.apache.spark.serializer.JavaSerializerInstance.serialize(JavaSerializer.scala:100)
    	at org.apache.spark.sql.catalyst.expressions.ObjectExpressionsSuite.org$apache$spark$sql$catalyst$expressions$ObjectExpressionsSuite$$checkObjectExprEvaluation(ObjectExpressionsSuite.scala:180)
    	at org.apache.spark.sql.catalyst.expressions.ObjectExpressionsSuite$$anonfun$3$$anonfun$apply$mcV$sp$1.apply(ObjectExpressionsSuite.scala:99)
    	at org.apache.spark.sql.catalyst.expressions.ObjectExpressionsSuite$$anonfun$3$$anonfun$apply$mcV$sp$1.apply(ObjectExpressionsSuite.scala:98)
    	at scala.collection.immutable.List.foreach(List.scala:381)
    	at org.apache.spark.sql.catalyst.expressions.ObjectExpressionsSuite$$anonfun$3.apply$mcV$sp(ObjectExpressionsSuite.scala:98)
    	at org.apache.spark.sql.catalyst.expressions.ObjectExpressionsSuite$$anonfun$3.apply(ObjectExpressionsSuite.scala:90)
    	at org.apache.spark.sql.catalyst.expressions.ObjectExpressionsSuite$$anonfun$3.apply(ObjectExpressionsSuite.scala:90)
    ...
    ```


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r173075682
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -133,8 +134,21 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    if (staticObject == null) {
    --- End diff --
    
    We don't need this check, for sure. See line 132,
    ```
    val objectName = staticObject.getName.stripSuffix("$")
    ```
    ^^ this will run as a part of the constructor, which will throw an NPE if staticObject is `null`, so it's redundant to null check it here.


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    @hvanhovell sorry for ping again


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88687 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88687/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88581 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88581/testReport)** for PR 20753 at commit [`7c52201`](https://github.com/apache/spark/commit/7c52201313d3c465f08df6a9ed2a5711a275b0cd).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88091 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88091/testReport)** for PR 20753 at commit [`7d107a6`](https://github.com/apache/spark/commit/7d107a661c2fec90767c89b497448f8157cd770e).
     * 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 pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r177631719
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -184,12 +217,21 @@ case class StaticInvoke(
         returnNullable: Boolean = true) extends InvokeLike {
     
       val objectName = staticObject.getName.stripSuffix("$")
    +  val cls = if (staticObject.getName == objectName) {
    +    staticObject
    +  } else {
    +    Utils.classForName(objectName)
    +  }
     
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  lazy val argClasses = ScalaReflection.expressionJavaClasses(arguments)
    --- End diff --
    
    We need to make this `lazy`. This is because `StaticInvoke` is also called before `dataType` is resolved.
    For example, `test.org.apache.spark.sql.JavaDatasetSuite.test` was failed without `lazy`.


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88905 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88905/testReport)** for PR 20753 at commit [`984cee7`](https://github.com/apache/spark/commit/984cee7b07e2773fc3a07017516ce0884c752b8b).
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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

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

    https://github.com/apache/spark/pull/20753#discussion_r173159210
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -188,8 +189,32 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +
    --- End diff --
    
    Will remove these lines in the next commit


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r173158406
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ObjectExpressionsSuite.scala ---
    @@ -71,6 +79,66 @@ class ObjectExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
           mapEncoder.serializer.head, mapExpected, mapInputRow)
       }
     
    +  test("SPARK-23582: StaticInvoke should support interpreted execution") {
    --- End diff --
    
    Will use `checkObjectExprEvaluation` in https://github.com/apache/spark/pull/20757/files


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r172722081
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -133,8 +134,21 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    if (staticObject == null) {
    +      throw new RuntimeException("The static class cannot be null.")
    +    }
    +
    +    val parmTypes = arguments.map(e =>
    +      CallMethodViaReflection.typeMapping.getOrElse(e.dataType,
    +        Seq(e.dataType.asInstanceOf[ObjectType].cls))(0))
    --- End diff --
    
    You are right. I have to support other types before merging this change.
    This is a prototype for discussing whether we use reflection or not.



---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88097 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88097/testReport)** for PR 20753 at commit [`eb6171a`](https://github.com/apache/spark/commit/eb6171a8ba6fce7d2499038afa29be34243def11).
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88901 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88901/testReport)** for PR 20753 at commit [`0c61e60`](https://github.com/apache/spark/commit/0c61e6063e4c28c2b6928fc74ddf959a1553bafc).
     * This patch **fails to build**.
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    @kiszk I think we should benchmark it. My rational for considering method handles is that they seem to be made for this purpose, and they should become more performant with newer versions of java.


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88585 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88585/testReport)** for PR 20753 at commit [`1e3aa0f`](https://github.com/apache/spark/commit/1e3aa0f5b3012bc7eb13fac7556423661f0867a2).


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r177628991
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -188,8 +189,30 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    val args = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val argClasses = ScalaReflection.expressionJavaClasses(arguments)
    +    val cls = if (staticObject.getName == objectName) {
    +      staticObject
    +    } else {
    +      Utils.classForName(objectName)
    +    }
    +    val method = cls.getDeclaredMethod(functionName, argClasses : _*)
    --- End diff --
    
    Yeah, finally I added `@transient lazy`.


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    ping @hvanhovell 


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r172755611
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -133,8 +134,21 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    if (staticObject == null) {
    +      throw new RuntimeException("The static class cannot be null.")
    +    }
    +
    +    val parmTypes = arguments.map(e =>
    +      CallMethodViaReflection.typeMapping.getOrElse(e.dataType,
    +        Seq(e.dataType.asInstanceOf[ObjectType].cls))(0))
    +    val parms = arguments.map(e => e.eval(input).asInstanceOf[Object])
    --- End diff --
    
    We need null checks here for inputs? Also, can we add a common function in `InvokeLike` to handle input arguments for other `InvokeLike` eprs? (I mean the interpreted version of `InvokeLike.prepareArguments`).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88629 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88629/testReport)** for PR 20753 at commit [`d7352a9`](https://github.com/apache/spark/commit/d7352a9bd8cc8e46e1490ee938e0171290088b9f).
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r173361648
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -188,8 +189,30 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    val args = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val argClasses = CallMethodViaReflection.expressionJavaClasses(arguments)
    +    val cls = if (staticObject.getName == objectName) {
    +      staticObject
    +    } else {
    +      Utils.classForName(objectName)
    +    }
    +    val method = cls.getDeclaredMethod(functionName, argClasses : _*)
    +    if (needNullCheck && args.exists(_ == null)) {
    +      // return null if one of arguments is null
    +      null
    +    } else {
    +      val ret = method.invoke(null, args: _*)
    +
    +      if (CodeGenerator.defaultValue(dataType) == "null") {
    +        ret
    +      } else {
    +        // cast a primitive value using Boxed class
    +        val boxedClass = CallMethodViaReflection.typeBoxedJavaMapping(dataType)
    --- End diff --
    
    Good catch. When discussions related to ` `typeJavaMapping`, `typeBoxedJavaMapping`, and others are fixed, I will address this.


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r173326718
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -188,8 +189,30 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    val args = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val argClasses = CallMethodViaReflection.expressionJavaClasses(arguments)
    +    val cls = if (staticObject.getName == objectName) {
    +      staticObject
    +    } else {
    +      Utils.classForName(objectName)
    +    }
    +    val method = cls.getDeclaredMethod(functionName, argClasses : _*)
    +    if (needNullCheck && args.exists(_ == null)) {
    +      // return null if one of arguments is null
    +      null
    +    } else {
    +      val ret = method.invoke(null, args: _*)
    +
    +      if (CodeGenerator.defaultValue(dataType) == "null") {
    +        ret
    +      } else {
    +        // cast a primitive value using Boxed class
    +        val boxedClass = CallMethodViaReflection.typeBoxedJavaMapping(dataType)
    --- End diff --
    
    nit: I think we can directly do like this without the `if`.
    ```scala
    val boxedClass = CallMethodViaReflection.typeBoxedJavaMapping.get(dataType)
    boxedClass.map(_.cast(ret)).getOrElse(ret)
    ```


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88028 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88028/testReport)** for PR 20753 at commit [`0790dea`](https://github.com/apache/spark/commit/0790deabf238201451438d2b95f108ced9bcd027).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `      throw new RuntimeException(\"The static class cannot be null.\")`


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88651 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88651/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).
     * This patch **fails due to an unknown error code, -9**.
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r177413074
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -188,8 +189,30 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    val args = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val argClasses = ScalaReflection.expressionJavaClasses(arguments)
    +    val cls = if (staticObject.getName == objectName) {
    +      staticObject
    +    } else {
    +      Utils.classForName(objectName)
    +    }
    +    val method = cls.getDeclaredMethod(functionName, argClasses : _*)
    +    if (needNullCheck && args.exists(_ == null)) {
    +      // return null if one of arguments is null
    +      null
    +    } else {
    +      val ret = method.invoke(null, args: _*)
    +
    +      if (CodeGenerator.defaultValue(dataType) == "null") {
    --- End diff --
    
    This is a bit scary. Can you just use `ScalaReflection.typeBoxedJavaMapping`?


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88093 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88093/testReport)** for PR 20753 at commit [`91a454c`](https://github.com/apache/spark/commit/91a454c524a54c808531c0a6fe5267ed3681e7d0).
     * 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 issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88581 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88581/testReport)** for PR 20753 at commit [`7c52201`](https://github.com/apache/spark/commit/7c52201313d3c465f08df6a9ed2a5711a275b0cd).
     * This patch **fails to build**.
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88663 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88663/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).
     * 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 issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r173339081
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ObjectExpressionsSuite.scala ---
    @@ -95,6 +162,21 @@ class ObjectExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
         checkEvaluation(createExternalRow, Row.fromSeq(Seq(1, "x")), InternalRow.fromSeq(Seq()))
       }
     
    +  // This is an alternative version of `checkEvaluation` to compare results
    --- End diff --
    
    This code is intentionally imported for testing from https://github.com/apache/spark/pull/20757


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88097/
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r173361869
  
    --- Diff: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ObjectExpressionsSuite.scala ---
    @@ -95,6 +162,21 @@ class ObjectExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
         checkEvaluation(createExternalRow, Row.fromSeq(Seq(1, "x")), InternalRow.fromSeq(Seq()))
       }
     
    +  // This is an alternative version of `checkEvaluation` to compare results
    --- End diff --
    
    If this pr is merged first, I'll remove this in my pr.


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    Ok, let's go with reflection then.
    
    cc @rednaxelafx


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    @hvanhovell Is it better to implement method handler approach, too?


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r172713356
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -133,8 +134,21 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    if (staticObject == null) {
    +      throw new RuntimeException("The static class cannot be null.")
    +    }
    +
    +    val parmTypes = arguments.map(e =>
    +      CallMethodViaReflection.typeMapping.getOrElse(e.dataType,
    +        Seq(e.dataType.asInstanceOf[ObjectType].cls))(0))
    +    val parms = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val method = staticObject.getDeclaredMethod(functionName, parmTypes : _*)
    +    val ret = method.invoke(null, parms : _*)
    +    val retClass = CallMethodViaReflection.typeMapping.getOrElse(dataType,
    --- End diff --
    
    We have to support more types (e.g. `ArrayType`)


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88091 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88091/testReport)** for PR 20753 at commit [`7d107a6`](https://github.com/apache/spark/commit/7d107a661c2fec90767c89b497448f8157cd770e).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88633 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88633/testReport)** for PR 20753 at commit [`d7352a9`](https://github.com/apache/spark/commit/d7352a9bd8cc8e46e1490ee938e0171290088b9f).
     * 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 issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    Which use case is typical? The same method is called many times. Are different method called?
    
    If the same method is called, reflection can also improve performance by creating [custom bytecode](https://blogs.oracle.com/buck/inflation-system-properties).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88656 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88656/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    and cc @viirya 


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88648 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88648/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).
     * 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 issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88584 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88584/testReport)** for PR 20753 at commit [`42a5fca`](https://github.com/apache/spark/commit/42a5fca7b9fb17de283634ad568b4ea12871402c).
     * This patch **fails to build**.
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88905 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88905/testReport)** for PR 20753 at commit [`984cee7`](https://github.com/apache/spark/commit/984cee7b07e2773fc3a07017516ce0884c752b8b).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88028 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88028/testReport)** for PR 20753 at commit [`0790dea`](https://github.com/apache/spark/commit/0790deabf238201451438d2b95f108ced9bcd027).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88656 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88656/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).
     * 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 issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88090 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88090/testReport)** for PR 20753 at commit [`9a36442`](https://github.com/apache/spark/commit/9a36442ee68b503b64cc57ddfe02a79769723786).


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r172787347
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -133,8 +134,21 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    if (staticObject == null) {
    +      throw new RuntimeException("The static class cannot be null.")
    +    }
    +
    +    val parmTypes = arguments.map(e =>
    +      CallMethodViaReflection.typeMapping.getOrElse(e.dataType,
    +        Seq(e.dataType.asInstanceOf[ObjectType].cls))(0))
    +    val parms = arguments.map(e => e.eval(input).asInstanceOf[Object])
    --- End diff --
    
    Yeah, it is good since this would be used in 'Invoke', too. After supporting other types, I will create an utility function.
    
    To discuss design choice (reflection or method handle), I put earlier version.



---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r173327074
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/CallMethodViaReflection.scala ---
    @@ -127,6 +128,52 @@ object CallMethodViaReflection {
         StringType -> Seq(classOf[String])
       )
     
    +  val typeJavaMapping = Map[DataType, Class[_]](
    +    BooleanType -> classOf[Boolean],
    +    ByteType -> classOf[Byte],
    +    ShortType -> classOf[Short],
    +    IntegerType -> classOf[Int],
    +    LongType -> classOf[Long],
    +    FloatType -> classOf[Float],
    +    DoubleType -> classOf[Double],
    +    StringType -> classOf[UTF8String],
    +    DateType -> classOf[DateType.InternalType],
    +    TimestampType -> classOf[TimestampType.InternalType],
    +    BinaryType -> classOf[BinaryType.InternalType],
    +    CalendarIntervalType -> classOf[CalendarInterval]
    +  )
    +
    +  val typeBoxedJavaMapping = Map[DataType, Class[_]](
    +    BooleanType -> classOf[java.lang.Boolean],
    +    ByteType -> classOf[java.lang.Byte],
    +    ShortType -> classOf[java.lang.Short],
    +    IntegerType -> classOf[java.lang.Integer],
    +    LongType -> classOf[java.lang.Long],
    +    FloatType -> classOf[java.lang.Float],
    +    DoubleType -> classOf[java.lang.Double],
    +    DateType -> classOf[java.lang.Integer],
    +    TimestampType -> classOf[java.lang.Long]
    +  )
    +
    +  def dataTypeJavaClass(dt: DataType): Class[_] = {
    +    dt match {
    +      case _: DecimalType => classOf[Decimal]
    +      case _: StructType => classOf[InternalRow]
    +      case _: ArrayType => classOf[ArrayData]
    +      case _: MapType => classOf[MapData]
    +      case ObjectType(cls) => cls
    +      case _ => typeJavaMapping.getOrElse(dt, classOf[java.lang.Object])
    +    }
    +  }
    --- End diff --
    
    The above should be in `CallMethodViaReflection` or `CodeGenerator`?


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88090 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88090/testReport)** for PR 20753 at commit [`9a36442`](https://github.com/apache/spark/commit/9a36442ee68b503b64cc57ddfe02a79769723786).
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    `org.apache.spark.sql.execution.streaming.sources.RateSourceSuite.overflow` is not a problem for this PR.
    Other PRs also fails due to this test.


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88922 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88922/testReport)** for PR 20753 at commit [`7b30c30`](https://github.com/apache/spark/commit/7b30c30a68107880cda108e6a0ed923c27ac6d56).
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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/1761/
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r173064355
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -133,8 +134,21 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    if (staticObject == null) {
    +      throw new RuntimeException("The static class cannot be null.")
    +    }
    +
    +    val parmTypes = arguments.map(e =>
    +      CallMethodViaReflection.typeMapping.getOrElse(e.dataType,
    +        Seq(e.dataType.asInstanceOf[ObjectType].cls))(0))
    +    val parms = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val method = staticObject.getDeclaredMethod(functionName, parmTypes : _*)
    --- End diff --
    
    Looks like we can also move `getDeclaredMethod` outside `eval`?


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88093 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88093/testReport)** for PR 20753 at commit [`91a454c`](https://github.com/apache/spark/commit/91a454c524a54c808531c0a6fe5267ed3681e7d0).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88687 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88687/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    ping @hvanhovell 


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88901 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88901/testReport)** for PR 20753 at commit [`0c61e60`](https://github.com/apache/spark/commit/0c61e6063e4c28c2b6928fc74ddf959a1553bafc).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88584 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88584/testReport)** for PR 20753 at commit [`42a5fca`](https://github.com/apache/spark/commit/42a5fca7b9fb17de283634ad568b4ea12871402c).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r172754548
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -133,8 +134,21 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    if (staticObject == null) {
    --- End diff --
    
    We need this check?


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88648 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88648/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88589 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88589/testReport)** for PR 20753 at commit [`c7f3c22`](https://github.com/apache/spark/commit/c7f3c22fa7e577950471dad86cc23eb37a2d61b7).
     * This patch **fails to build**.
     * 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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/1406/
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r172717961
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -133,8 +134,21 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    if (staticObject == null) {
    +      throw new RuntimeException("The static class cannot be null.")
    +    }
    +
    +    val parmTypes = arguments.map(e =>
    +      CallMethodViaReflection.typeMapping.getOrElse(e.dataType,
    +        Seq(e.dataType.asInstanceOf[ObjectType].cls))(0))
    +    val parms = arguments.map(e => e.eval(input).asInstanceOf[Object])
    +    val method = staticObject.getDeclaredMethod(functionName, parmTypes : _*)
    +    val ret = method.invoke(null, parms : _*)
    +    val retClass = CallMethodViaReflection.typeMapping.getOrElse(dataType,
    +      Seq(dataType.asInstanceOf[ObjectType].cls))(0)
    --- End diff --
    
    Will `dataType` always be an `ObjectType` here?


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    ping @hvanhovell


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88651 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88651/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88663 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88663/testReport)** for PR 20753 at commit [`09cdf5e`](https://github.com/apache/spark/commit/09cdf5e9920a4f896fd34fc361cf6c4382fd09e5).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88922 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88922/testReport)** for PR 20753 at commit [`7b30c30`](https://github.com/apache/spark/commit/7b30c30a68107880cda108e6a0ed923c27ac6d56).


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    **[Test build #88089 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88089/testReport)** for PR 20753 at commit [`f9f5701`](https://github.com/apache/spark/commit/f9f570103f67f7bcfc708f5931d4a0f291a89fd1).
     * This patch **fails Spark unit tests**.
     * This patch **does not merge 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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

    https://github.com/apache/spark/pull/20753
  
    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 #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark pull request #20753: [SPARK-23582][SQL] StaticInvoke should support in...

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

    https://github.com/apache/spark/pull/20753#discussion_r172718446
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala ---
    @@ -133,8 +134,21 @@ case class StaticInvoke(
       override def nullable: Boolean = needNullCheck || returnNullable
       override def children: Seq[Expression] = arguments
     
    -  override def eval(input: InternalRow): Any =
    -    throw new UnsupportedOperationException("Only code-generated evaluation is supported.")
    +  override def eval(input: InternalRow): Any = {
    +    if (staticObject == null) {
    +      throw new RuntimeException("The static class cannot be null.")
    +    }
    +
    +    val parmTypes = arguments.map(e =>
    +      CallMethodViaReflection.typeMapping.getOrElse(e.dataType,
    +        Seq(e.dataType.asInstanceOf[ObjectType].cls))(0))
    --- End diff --
    
    The external types of native types `CalendarIntervalType` and `BinaryType` are not `ObjectType`.


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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


[GitHub] spark issue #20753: [SPARK-23582][SQL] StaticInvoke should support interpret...

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

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


---

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