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

ShuMing Li commented on CALCITE-3280:
-------------------------------------

Add a review of other databases:

 

BigQuery : 
https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#regexp_replace
Syntax : REGEXP_REPLACE(value, regex, replacement)
Input : STRING
Output : STRING/BYTES


MySQL : 
https://dev.mysql.com/doc/refman/8.0/en/regexp.html#function_regexp-replace
Syntax : REGEXP_REPLACE(expr, pat, repl[, pos[, occurrence[, match_type]]])
Input : String
Output : String

Oracle : https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions130.htm
Syntax : REGEXP_REPLACE
Input : CHAR, VARCHAR2, NCHAR, NVARCHAR2(CLOB or NCLOB)
Output : VARCHAR2/CLOB

PostgreSQL : https://www.postgresql.org/docs/9.3/functions-matching.html
Syntax : regexp_replace(source, pattern, replacement [, flags ])
Input : string
Output : string

Redshift : https://docs.aws.amazon.com/redshift/latest/dg/REGEXP_REPLACE.html
Syntax : REGEXP_REPLACE ( source_string, pattern [, replace_string [ , position 
] ] )
Input : String
Output : VARCHAR

> Cannot parse query REGEXP_REPLACE in Redshift
> ---------------------------------------------
>
>                 Key: CALCITE-3280
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3280
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Ryan Fu
>            Priority: Minor
>
> REGEXP_REPLACE error:
> {code:}
> No match found for function signature REGEXP_REPLACE(<CHARACTER>, 
> <CHARACTER>, <CHARACTER>){code}
>  
> Example query:
> {code:sql}
> SELECT * , MD5(TRIM(BOTH ' ' FROM REGEXP_REPLACE(LOWER(name), 
> '([[:space:]]|,)+([iInNcC]|[lLcC]).*$', ''))) AS company_id FROM 
> public.account {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to