Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20746 Built-in SQL Function Improvement
  3. SPARK-14878

Support Trim characters in the string trim function

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.3.0
    • SQL
    • None

    Description

      The current Spark SQL does not support the trim characters in the string trim function, which is part of ANSI SQL2003’s standard. For example, IBM DB2 fully supports it as shown in the https://www.ibm.com/support/knowledgecenter/SS6NHC/com.ibm.swg.im.dashdb.sql.ref.doc/doc/r0023198.html. We propose to implement it in this JIRA..
      The ANSI SQL2003's trim Syntax:

      SQL
      <trim function> ::= TRIM <left paren> <trim operands> <right paren>
      <trim operands> ::= [ [ <trim specification> ] [ <trim character> ] FROM ] <trim source>
      <trim source> ::= <character value expression>
      <trim specification> ::=
        LEADING
      | TRAILING
      | BOTH
      <trim character> ::= <character value expression>    
      

      Attachments

        Activity

          People

            kevinyu98 kevin yu
            kevinyu98 kevin yu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: