spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viirya <...@git.apache.org>
Subject [GitHub] spark pull request #19324: [SPARK-22103] Move HashAggregateExec parent consu...
Date Tue, 26 Sep 2017 13:45:52 GMT
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19324#discussion_r141060165
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
---
    @@ -328,6 +331,22 @@ class CodegenContext {
         (inlinedFunctions ++ initNestedClasses ++ declareNestedClasses).mkString("\n")
       }
     
    +  /**
    +   * Emits any source code added with addExtraCode
    +   */
    +  def emitExtraCode(): String = {
    +    extraCode.mkString("\n")
    +  }
    +
    +  /**
    +   * Add extra source code to the outermost generated class.
    +   * @param code verbatim source code to be added.
    +   */
    +  def addExtraCode(code: String): Unit = {
    --- End diff --
    
    +1 Although it doesn't prevent you going to add functions, but we have `addNewFunction`
for it. So we'd better claim that this is just for inner class.


---

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


Mime
View raw message