Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/19964#discussion_r156671950
--- 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 --
oh, right. :-)
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]