shengli created SPARK-4151:
------------------------------

             Summary: Add string operation function trim, ltrim, rtrim, length 
to support SparkSql (HiveQL) 
                 Key: SPARK-4151
                 URL: https://issues.apache.org/jira/browse/SPARK-4151
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 1.1.0
            Reporter: shengli
            Priority: Minor
             Fix For: 1.1.1, 1.1.0


Add three string operation functions to support spark sql and hiveql.
eg:
sql("select trim(' a b ') from src ").collect() --> 'a b'
sql("select ltrim(' a b ') from src ").collect() --> 'a b ' 
sql("select rtrim(' a b ') from src ").collect() --> ' a b'
sql("select length('ab') from src ").collect() --> 2

And Rename the trait of stringOperations.scala.
I prefer to rename trait CaseConversionExpression to 
StringTransformationExpression, it is more make sence than before so that this 
trait can support more string transformation but not only caseconversion.

And also add a trait StringCalculationExpression that do string computation 
like length, indexof etc....



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to