Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/7533#discussion_r35330021
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala
 ---
    @@ -356,6 +358,92 @@ case class StringInstr(str: Expression, substr: 
Expression)
     }
     
     /**
    + * Returns the substring from string str before count occurrences of the 
delimiter delim.
    + * If count is positive, everything the left of the final delimiter 
(counting from left) is
    + * returned. If count is negative, every to the right of the final 
delimiter (counting from the
    + * right) is returned. substring_index performs a case-sensitive match 
when searching for delim.
    + */
    +case class Substring_index(strExpr: Expression, delimExpr: Expression, 
countExpr: Expression)
    + extends Expression with ImplicitCastInputTypes with CodegenFallback {
    +
    +  override def dataType: DataType = StringType
    +  override def inputTypes: Seq[DataType] = Seq(StringType, StringType, 
IntegerType)
    +  override def nullable: Boolean = strExpr.nullable || delimExpr.nullable 
|| countExpr.nullable
    --- End diff --
    
    Sorry, my bad, actually I mean the function `foldable`, not the `nullable`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to