[
https://issues.apache.org/jira/browse/CALCITE-6923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943302#comment-17943302
]
Mihai Budiu edited comment on CALCITE-6923 at 4/10/25 5:42 PM:
---------------------------------------------------------------
Fixed in
https://github.com/apache/calcite/commit/78957058c3dbb67bfc1cfc1b53b5bfa171d2eeb6
Thank you for your contribution [~kramerul]
was (Author: JIRAUSER295926):
Fixed in
https://github.com/apache/calcite/commit/21277d89601dc4577ae2847b58dfc4af4c188c64
Thank you for your contribution [~kramerul]
> REGEXP_REPLACE_PG_...: backward references behave differently than in postgres
> ------------------------------------------------------------------------------
>
> Key: CALCITE-6923
> URL: https://issues.apache.org/jira/browse/CALCITE-6923
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.38.0
> Reporter: Ulrich Kramer
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.40.0
>
>
> REGEXP_REPLACE builtin function differs from Postgres/BigQuery
> The builtin function is using {{$1}} for backward reference. Postgres and
> [BigQuery|https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_replace]
> are using {{\1}}.
> {code:SQL}
> SELECT REGEXP_REPLACE('abc','([bc]+)','$1','g')
> {code}
> produces {{abc}}. Running the same query against Postgres or BigQuery will
> return {{a$1}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)