spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ueshin <...@git.apache.org>
Subject [GitHub] spark pull request #15901: [SPARK-18467][SQL] Extracts method for preparing ...
Date Thu, 17 Nov 2016 05:44:36 GMT
Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15901#discussion_r88390158
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
---
    @@ -33,6 +33,88 @@ import org.apache.spark.sql.catalyst.util.{ArrayBasedMapData, GenericArrayData}
     import org.apache.spark.sql.types._
     
     /**
    + * Common base class for [[StaticInvoke]], [[Invoke]], and [[NewInstance]].
    + */
    +trait InvokeLike {
    +
    +  def arguments: Seq[Expression]
    +
    +  def propagateNull: Boolean
    +
    +  protected lazy val propagatingNull: Boolean = propagateNull && arguments.exists(_.nullable)
    +
    +  /**
    +   * Prepares codes for arguments.
    +   *
    +   * - generate codes for argument.
    +   * - use ctx.splitExpressions() not to exceed 64kb JVM limit while preparing arguments.
    +   * - avoid some of nullabilty checking which are not needed because the expression
is not
    +   *   nullable.
    +   * - when progagateNull == true, short circuit if we found one of arguments is null
because
    --- End diff --
    
    Thanks, I used `needNullCheck` for now.


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