You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Guillaume Massé (Jira)" <ji...@apache.org> on 2023/06/29 17:33:00 UTC

[jira] [Updated] (CALCITE-5807) Add SUBSTRING_INDEX function (enabled in Spark library)

     [ https://issues.apache.org/jira/browse/CALCITE-5807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Massé updated CALCITE-5807:
-------------------------------------
    Summary: Add SUBSTRING_INDEX function (enabled in Spark library)  (was: implement substring_index in Apache Spark Library)

> Add SUBSTRING_INDEX function (enabled in Spark library)
> -------------------------------------------------------
>
>                 Key: CALCITE-5807
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5807
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Guillaume Massé
>            Priority: Minor
>
> [https://spark.apache.org/docs/2.3.0/api/sql/#substring_index]
>  
>  
> {code:java}
> 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
> {code}
> {{}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)