spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloud-fan <...@git.apache.org>
Subject [GitHub] spark pull request #19813: [SPARK-22600][SQL] Fix 64kb limit for deeply nest...
Date Mon, 04 Dec 2017 07:33:59 GMT
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19813#discussion_r154573755
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
---
    @@ -1001,16 +1017,25 @@ class CodegenContext {
         commonExprs.foreach { e =>
           val expr = e.head
           val fnName = freshName("evalExpr")
    -      val isNull = s"${fnName}IsNull"
    +      val isNull = if (expr.nullable) {
    +        s"${fnName}IsNull"
    +      } else {
    +        ""
    +      }
           val value = s"${fnName}Value"
     
           // Generate the code for this expression tree and wrap it in a function.
           val eval = expr.genCode(this)
    +      val nullValue = if (expr.nullable) {
    +        s"$isNull = ${eval.isNull};"
    --- End diff --
    
    nit:
    ```
    val setIsNull = if (expr.nullable) {
      s"${fnName}IsNull = ${eval.isNull};"
    } else ""
    ```


---

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


Mime
View raw message