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

    https://github.com/apache/spark/pull/1359#discussion_r14915562
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala
 ---
    @@ -205,3 +207,72 @@ case class EndsWith(left: Expression, right: 
Expression)
         extends BinaryExpression with StringComparison {
       def compare(l: String, r: String) = l.endsWith(r)
     }
    +
    +/**
    + * A function that takes a substring of its first argument starting at a 
given position.
    + * Defined for String and Binary types.
    + */
    +case class Substring(str: Expression, pos: Expression, len: Expression) 
extends Expression {
    +  
    +  type EvaluatedType = Any
    +  
    +  def nullable: Boolean = true
    --- End diff --
    
    `nullable` could be `str.nullable || pos.nullable || len.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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to