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 #19803: [SPARK-22596][SQL] set ctx.currentVars in Codegen...
Date Thu, 23 Nov 2017 23:56:31 GMT
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19803#discussion_r152881704
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/BoundAttribute.scala
---
    @@ -60,20 +60,23 @@ case class BoundReference(ordinal: Int, dataType: DataType, nullable:
Boolean)
     
       override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
         val javaType = ctx.javaType(dataType)
    -    val value = ctx.getValue(ctx.INPUT_ROW, dataType, ordinal.toString)
         if (ctx.currentVars != null && ctx.currentVars(ordinal) != null) {
           val oev = ctx.currentVars(ordinal)
           ev.isNull = oev.isNull
           ev.value = oev.value
    -      val code = oev.code
    -      oev.code = ""
    -      ev.copy(code = code)
    --- End diff --
    
    Great, thanks.


---

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


Mime
View raw message