You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jerin John (Jira)" <ji...@apache.org> on 2023/08/08 18:54:00 UTC

[jira] [Updated] (CALCITE-5910) Implement BigQuery functions REGEXP_EXTRACT and REGEXP_EXTRACT_ALL

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

Jerin John updated CALCITE-5910:
--------------------------------
    Description: 
Add support for [REGEXP_EXTRACT|https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_extract] and [REGEXP_EXTRACT_ALL|https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_extract_all] functions from BigQuery.

*{{REGEXP_EXTRACT(value, regexp[, position[, occurrence]])}}*
Returns the substring in {{value}} that matches the regular expression {{{}regexp{}}}. Returns {{NULL}} if there is no match.

* If the regular expression contains a capturing group ({{{}(...){}}}), and there is a match for that capturing group, that match is returned. If there are multiple matches for a capturing group, the last match is returned.
* If {{position}} is specified, the search starts at this position in {{{}value{}}}, otherwise it starts at the beginning of {{{}value{}}}.
* If {{occurrence}} is specified, the search returns a specific occurrence of the {{regexp}} in {{{}value{}}}, otherwise returns the first match.

*{{REGEXP_EXTRACT_ALL(value, regexp)}}*
Returns an array of all substrings of value that match the re2 regular expression, regexp. Returns an empty array if there is no match.


  was:
Add support for REGEXP_CONTAINS function from BigQuery.

Function returns TRUE if input value is a partial match for the regular expression.


> Implement BigQuery functions REGEXP_EXTRACT and REGEXP_EXTRACT_ALL
> ------------------------------------------------------------------
>
>                 Key: CALCITE-5910
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5910
>             Project: Calcite
>          Issue Type: Task
>            Reporter: Jerin John
>            Assignee: Jerin John
>            Priority: Major
>              Labels: pull-request-available
>
> Add support for [REGEXP_EXTRACT|https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_extract] and [REGEXP_EXTRACT_ALL|https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_extract_all] functions from BigQuery.
> *{{REGEXP_EXTRACT(value, regexp[, position[, occurrence]])}}*
> Returns the substring in {{value}} that matches the regular expression {{{}regexp{}}}. Returns {{NULL}} if there is no match.
> * If the regular expression contains a capturing group ({{{}(...){}}}), and there is a match for that capturing group, that match is returned. If there are multiple matches for a capturing group, the last match is returned.
> * If {{position}} is specified, the search starts at this position in {{{}value{}}}, otherwise it starts at the beginning of {{{}value{}}}.
> * If {{occurrence}} is specified, the search returns a specific occurrence of the {{regexp}} in {{{}value{}}}, otherwise returns the first match.
> *{{REGEXP_EXTRACT_ALL(value, regexp)}}*
> Returns an array of all substrings of value that match the re2 regular expression, regexp. Returns an empty array if there is no match.



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