You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2018/11/25 20:46:16 UTC

[GitHub] spark pull request #23135: [SPARK-26168] Update the code comments in Express...

GitHub user gatorsmile opened a pull request:

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

    [SPARK-26168] Update the code comments in Expression and Aggregate

    ## What changes were proposed in this pull request?
    This PR is to improve the code comments to document some common traits and traps about the expression.
    
    ## How was this patch tested?
    N/A


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

    $ git pull https://github.com/gatorsmile/spark addcomments

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

    https://github.com/apache/spark/pull/23135.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 #23135
    
----
commit a6e725641f86309638dc1daf82d8e5e592df1fed
Author: gatorsmile <ga...@...>
Date:   2018-11-25T20:44:23Z

    fix

----


---

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


[GitHub] spark pull request #23135: [SPARK-26168][SQL] Update the code comments in Ex...

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

    https://github.com/apache/spark/pull/23135#discussion_r236117773
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala ---
    @@ -43,9 +43,24 @@ import org.apache.spark.sql.types._
      * There are a few important traits:
      *
      * - [[Nondeterministic]]: an expression that is not deterministic.
    + * - [[Stateful]]: an expression that contains mutable state. For example, MonotonicallyIncreasingID
    + *                 and Rand. A stateful expression is always non-deterministic.
      * - [[Unevaluable]]: an expression that is not supposed to be evaluated.
      * - [[CodegenFallback]]: an expression that does not have code gen implemented and falls back to
      *                        interpreted mode.
    + * - [[NullIntolerant]]: an expression that is null intolerant (i.e. any null input will result in
    + *                       null output).
    + * - [[NonSQLExpression]]: a common base trait for the expressions that doesn't have SQL
    + *                         expressions like representation. For example, `ScalaUDF`, `ScalaUDAF`,
    + *                         and object `MapObjects` and `Invoke`.
    + * - [[UserDefinedExpression]]: a common base trait for user-defined functions, including
    + *                              UDF/UDAF/UDTF.
    + * - [[HigherOrderFunction]]: a common base trait for higher order functions that take one or more
    + *                            (lambda) functions and applies these to some objects. The function
    + *                            produces a number of variables which can be consumed by some lambda
    + *                            function.
    + * - [[NamedExpression]]: An [[Expression]] that is named.
    + * - [[TimeZoneAwareExpression]]: A common base trait for time zone aware expressions.
    --- End diff --
    
    Added.


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

    https://github.com/apache/spark/pull/23135
  
    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 #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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


[GitHub] spark pull request #23135: [SPARK-26168][SQL] Update the code comments in Ex...

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

    https://github.com/apache/spark/pull/23135#discussion_r236097033
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala ---
    @@ -575,6 +575,19 @@ case class Range(
       }
     }
     
    +/**
    + * This is a Group by operator with the aggregate functions and projections.
    + *
    + * @param groupingExpressions expressions for grouping keys
    + * @param aggregateExpressions expressions for a project list, which could contain
    + *                   [[org.apache.spark.sql.catalyst.expressions.aggregate.AggregateFunction]]s.
    + *
    + * Note: Currently, aggregateExpressions correspond to both [[AggregateExpression]] and the output
    --- End diff --
    
    Removed it from the description.


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

    https://github.com/apache/spark/pull/23135
  
    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 #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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


[GitHub] spark pull request #23135: [SPARK-26168][SQL] Update the code comments in Ex...

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/23135#discussion_r236106495
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala ---
    @@ -43,9 +43,24 @@ import org.apache.spark.sql.types._
      * There are a few important traits:
      *
      * - [[Nondeterministic]]: an expression that is not deterministic.
    + * - [[Stateful]]: an expression that contains mutable state. For example, MonotonicallyIncreasingID
    + *                 and Rand. A stateful expression is always non-deterministic.
      * - [[Unevaluable]]: an expression that is not supposed to be evaluated.
      * - [[CodegenFallback]]: an expression that does not have code gen implemented and falls back to
      *                        interpreted mode.
    + * - [[NullIntolerant]]: an expression that is null intolerant (i.e. any null input will result in
    + *                       null output).
    + * - [[NonSQLExpression]]: a common base trait for the expressions that doesn't have SQL
    + *                         expressions like representation. For example, `ScalaUDF`, `ScalaUDAF`,
    + *                         and object `MapObjects` and `Invoke`.
    + * - [[UserDefinedExpression]]: a common base trait for user-defined functions, including
    + *                              UDF/UDAF/UDTF.
    + * - [[HigherOrderFunction]]: a common base trait for higher order functions that take one or more
    + *                            (lambda) functions and applies these to some objects. The function
    + *                            produces a number of variables which can be consumed by some lambda
    + *                            function.
    + * - [[NamedExpression]]: An [[Expression]] that is named.
    + * - [[TimeZoneAwareExpression]]: A common base trait for time zone aware expressions.
    --- End diff --
    
    shall we also mention `SubqueryExpression`?


---

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


[GitHub] spark pull request #23135: [SPARK-26168][SQL] Update the code comments in Ex...

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

    https://github.com/apache/spark/pull/23135#discussion_r236089467
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala ---
    @@ -575,6 +575,19 @@ case class Range(
       }
     }
     
    +/**
    + * This is a Group by operator with the aggregate functions and projections.
    + *
    + * @param groupingExpressions expressions for grouping keys
    + * @param aggregateExpressions expressions for a project list, which could contain
    + *                   [[org.apache.spark.sql.catalyst.expressions.aggregate.AggregateFunction]]s.
    + *
    + * Note: Currently, aggregateExpressions correspond to both [[AggregateExpression]] and the output
    --- End diff --
    
    It is not clear what “resultExpressions” mean.


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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


[GitHub] spark issue #23135: [SPARK-26168] Update the code comments in Expression and...

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

    https://github.com/apache/spark/pull/23135
  
    cc @rxin @rednaxelafx @cloud-fan 


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

    https://github.com/apache/spark/pull/23135
  
    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 #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

    https://github.com/apache/spark/pull/23135
  
    **[Test build #99248 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/99248/testReport)** for PR 23135 at commit [`fe8e385`](https://github.com/apache/spark/commit/fe8e3850187d7a36fc95ade68bb173088c6e8aa1).
     * 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 #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

    https://github.com/apache/spark/pull/23135
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/5333/
    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 #23135: [SPARK-26168][SQL] Update the code comments in Ex...

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

    https://github.com/apache/spark/pull/23135#discussion_r236104602
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala ---
    @@ -43,9 +43,24 @@ import org.apache.spark.sql.types._
      * There are a few important traits:
      *
      * - [[Nondeterministic]]: an expression that is not deterministic.
    + * - [[Stateful]]: an expression that contains mutable state. For example, MonotonicallyIncreasingID
    + *                 and Rand. A stateful expression is always non-deterministic.
      * - [[Unevaluable]]: an expression that is not supposed to be evaluated.
      * - [[CodegenFallback]]: an expression that does not have code gen implemented and falls back to
      *                        interpreted mode.
    + * - [[NullIntolerant]]: an expression that is null intolerant (i.e. any null input will result in
    + *                       null output).
    + * - [[NonSQLExpression]]: a common base trait for the expressions that doesn't have SQL
    --- End diff --
    
    nit: `doesn't` -> `do not`


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

    https://github.com/apache/spark/pull/23135
  
    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 #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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


[GitHub] spark pull request #23135: [SPARK-26168][SQL] Update the code comments in Ex...

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

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


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

    https://github.com/apache/spark/pull/23135
  
    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 #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

    https://github.com/apache/spark/pull/23135
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/99257/
    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 #23135: [SPARK-26168][SQL] Update the code comments in Ex...

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

    https://github.com/apache/spark/pull/23135#discussion_r236103936
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala ---
    @@ -43,9 +43,24 @@ import org.apache.spark.sql.types._
      * There are a few important traits:
      *
      * - [[Nondeterministic]]: an expression that is not deterministic.
    + * - [[Stateful]]: an expression that contains mutable state. For example, MonotonicallyIncreasingID
    + *                 and Rand. A stateful expression is always non-deterministic.
      * - [[Unevaluable]]: an expression that is not supposed to be evaluated.
      * - [[CodegenFallback]]: an expression that does not have code gen implemented and falls back to
      *                        interpreted mode.
    + * - [[NullIntolerant]]: an expression that is null intolerant (i.e. any null input will result in
    + *                       null output).
    + * - [[NonSQLExpression]]: a common base trait for the expressions that doesn't have SQL
    + *                         expressions like representation. For example, `ScalaUDF`, `ScalaUDAF`,
    + *                         and object `MapObjects` and `Invoke`.
    + * - [[UserDefinedExpression]]: a common base trait for user-defined functions, including
    + *                              UDF/UDAF/UDTF.
    + * - [[HigherOrderFunction]]: a common base trait for higher order functions that take one or more
    + *                            (lambda) functions and applies these to some objects. The function
    + *                            produces a number of variables which can be consumed by some lambda
    + *                            function.
    --- End diff --
    
    nit: `function` -> `functions` ?


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

    https://github.com/apache/spark/pull/23135
  
    thanks, merging to master!


---

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


[GitHub] spark issue #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

    https://github.com/apache/spark/pull/23135
  
    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 #23135: [SPARK-26168][SQL] Update the code comments in Expressio...

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

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


---

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