spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rxin <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-12791][SQL] Simplify CaseWhen by breaki...
Date Wed, 13 Jan 2016 03:37:10 GMT
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10734#discussion_r49548447
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/conditionalExpressions.scala
---
    @@ -81,44 +81,38 @@ case class If(predicate: Expression, trueValue: Expression, falseValue:
Expressi
     /**
      * Case statements of the form "CASE WHEN a THEN b [WHEN c THEN d]* [ELSE e] END".
      * When a = true, returns b; when c = true, returns d; else returns e.
    + *
    + * The last value is (optionally) the else value.
      */
    -case class CaseWhen(branches: Seq[Expression]) extends Expression {
    -
    -  // Use private[this] Array to speed up evaluation.
    -  @transient private[this] lazy val branchesArr = branches.toArray
    -
    -  override def children: Seq[Expression] = branches
    +case class CaseWhen(conditions: Seq[Expression], values: Seq[Expression]) extends Expression
{
    --- End diff --
    
    it is easier to review this by looking at the file rather than the diff.


---
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


Mime
View raw message