Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5807

Add SUBSTRING_INDEX function (enabled in Spark library)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.38.0
    • core

    Description

      https://spark.apache.org/docs/2.3.0/api/sql/#substring_index

       

       

      substring_index(str, delim, count) - Returns the substring from str before count occurrences of the delimiter delim. If count is positive, everything to the left of the final delimiter (counting from the left) is returned. If count is negative, everything to the right of the final delimiter (counting from the right) is returned. The function substring_index performs a case-sensitive match when searching for delim.
      Examples:
       
      > SELECT substring_index('www.apache.org', '.', 2); www.apache
      

      {{}}

      Attachments

        Issue Links

          Activity

            People

              rocky.hu hujianhong
              MasseGuillaume Guillaume Massé
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: