You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2017/07/09 10:44:36 UTC

[GitHub] spark pull request #18579: [SPARK-18016][SQL][followup] merge declareAddedFu...

GitHub user cloud-fan opened a pull request:

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

    [SPARK-18016][SQL][followup] merge declareAddedFunctions, initNestedClasses and declareNestedClasses

    ## What changes were proposed in this pull request?
    
    These 3 methods have to be used together, so it makes more sense to merge them into one method and then the caller side only need to call one method.
    
    ## How was this patch tested?
    
    existing tests.

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

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

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

    https://github.com/apache/spark/pull/18579.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 #18579
    
----
commit 7c8979e9d44927af96af9f31022acb4ffa9d59ae
Author: Wenchen Fan <we...@databricks.com>
Date:   2017-07-09T10:42:33Z

    merge declareAddedFunctions, initNestedClasses and declareNestedClasses

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18579: [SPARK-18016][SQL][followup] merge declareAddedFunctions...

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

    https://github.com/apache/spark/pull/18579
  
    LGTM except one minor comment


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18579: [SPARK-18016][SQL][followup] merge declareAddedFunctions...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18579: [SPARK-18016][SQL][followup] merge declareAddedFunctions...

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

    https://github.com/apache/spark/pull/18579
  
    Thanks everyone!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18579: [SPARK-18016][SQL][followup] merge declareAddedFunctions...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18579: [SPARK-18016][SQL][followup] merge declareAddedFu...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18579: [SPARK-18016][SQL][followup] merge declareAddedFu...

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

    https://github.com/apache/spark/pull/18579#discussion_r126307752
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala ---
    @@ -302,37 +302,30 @@ class CodegenContext {
       }
     
       /**
    -   * Instantiates all nested, private sub-classes as objects to the `OuterClass`
    +   * Declares all function code. If the added functions are too many, split them into nested
    +   * sub-classes to avoid hitting Java compiler constant pool limitation.
        */
    -  private[sql] def initNestedClasses(): String = {
    +  def declareAddedFunctions(): String = {
    +    val inlinedFunctions = classFunctions(outerClassName).values
    --- End diff --
    
    You are right. I made a mistake. `outerClassName` is used for the non-nested class.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18579: [SPARK-18016][SQL][followup] merge declareAddedFunctions...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18579: [SPARK-18016][SQL][followup] merge declareAddedFu...

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

    https://github.com/apache/spark/pull/18579#discussion_r126314432
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala ---
    @@ -302,37 +302,30 @@ class CodegenContext {
       }
     
       /**
    -   * Instantiates all nested, private sub-classes as objects to the `OuterClass`
    +   * Declares all function code. If the added functions are too many, split them into nested
    +   * sub-classes to avoid hitting Java compiler constant pool limitation.
        */
    -  private[sql] def initNestedClasses(): String = {
    +  def declareAddedFunctions(): String = {
    --- End diff --
    
    It seems that we can keep this as `private[sql]` because all previous three functions are.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18579: [SPARK-18016][SQL][followup] merge declareAddedFunctions...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18579: [SPARK-18016][SQL][followup] merge declareAddedFunctions...

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

    https://github.com/apache/spark/pull/18579
  
    Thanks! Merging to master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18579: [SPARK-18016][SQL][followup] merge declareAddedFu...

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

    https://github.com/apache/spark/pull/18579#discussion_r126306255
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala ---
    @@ -302,37 +302,30 @@ class CodegenContext {
       }
     
       /**
    -   * Instantiates all nested, private sub-classes as objects to the `OuterClass`
    +   * Declares all function code. If the added functions are too many, split them into nested
    +   * sub-classes to avoid hitting Java compiler constant pool limitation.
        */
    -  private[sql] def initNestedClasses(): String = {
    +  def declareAddedFunctions(): String = {
    +    val inlinedFunctions = classFunctions(outerClassName).values
    --- End diff --
    
    They are different. This line inline pure functions which are not in the nested classes, and the next line inline these nested classes containing other functions.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #18579: [SPARK-18016][SQL][followup] merge declareAddedFu...

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

    https://github.com/apache/spark/pull/18579#discussion_r126306122
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala ---
    @@ -302,37 +302,30 @@ class CodegenContext {
       }
     
       /**
    -   * Instantiates all nested, private sub-classes as objects to the `OuterClass`
    +   * Declares all function code. If the added functions are too many, split them into nested
    +   * sub-classes to avoid hitting Java compiler constant pool limitation.
        */
    -  private[sql] def initNestedClasses(): String = {
    +  def declareAddedFunctions(): String = {
    +    val inlinedFunctions = classFunctions(outerClassName).values
    --- End diff --
    
    nit: Would it be better to move this line after the comment at line 311-312? This is because this output is declared in Line 312 (i.e. inlined fuction into OuterClass).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #18579: [SPARK-18016][SQL][followup] merge declareAddedFunctions...

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

    https://github.com/apache/spark/pull/18579
  
    cc @bdrillard 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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