Github user mgaido91 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19964#discussion_r156671610
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
 ---
    @@ -289,53 +289,61 @@ case class Elt(children: Seq[Expression])
         val index = indexExpr.genCode(ctx)
         val strings = stringExprs.map(_.genCode(ctx))
         val indexVal = ctx.freshName("index")
    +
    +    // -1 means the given index doesn't match indices of strings in split 
function.
    +    val NOT_MATCHED = -1
    +    // 0 means the given index matches one of indices of strings in split 
function.
    +    val MATCHED = 0
    +    val resultState = ctx.freshName("eltResultState")
    --- End diff --
    
    this can be a `boolean` instead of a `byte` IMHO


---

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

Reply via email to