You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "James Duong (Jira)" <ji...@apache.org> on 2024/05/22 21:43:00 UTC

[jira] [Commented] (CALCITE-6310) Add REGEXP_REPLACE function (enabled in PostgreSQL library)

    [ https://issues.apache.org/jira/browse/CALCITE-6310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17848753#comment-17848753 ] 

James Duong commented on CALCITE-6310:
--------------------------------------

The current implementation of REGEXP_REPLACE allows implicit conversion for the start and end integer values from string to integer

Eg "REGEXP_REPLACE('abc def ghi', '[a-z]+', 'X', '2')"

however PostgreSQL semantics allow the flags parameter to appear at the same indices as the start and end integer values

Eg "REGEXP_REPLACE('abc def ghi', '[a-z]+', 'X', 'c')"

 

Supporting the PostgreSQL semantics will break the implicit conversion.

 

> Add REGEXP_REPLACE function (enabled in PostgreSQL library)
> -----------------------------------------------------------
>
>                 Key: CALCITE-6310
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6310
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: James Duong
>            Assignee: James Duong
>            Priority: Minor
>
> * There is an existing implementation.
>  * PostgreSQL requires supporting an optional extra flags argument



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