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

Danny Chen commented on CALCITE-3415:
-------------------------------------

Thanks [~pranay.parmar] for reporting this, i checked that there indeed don't 
have a REGEXP_SUBSTR function in Calcite now, i found that Oracle has such 
function as you described, maybe we can add one for the Oracle dialect. You can 
add one in SqlLibraryOperators[2]

[1] https://docs.oracle.com/cd/B12037_01/server.101/b10759/functions116.htm
[2] 
https://github.com/apache/calcite/blob/3cbbafa941128dc5097c2a26711f5751f764e12d/core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java#L173

> Cannot parse REGEXP_SUBSTR in BigQuery
> --------------------------------------
>
>                 Key: CALCITE-3415
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3415
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Pranay Parmar
>            Priority: Minor
>             Fix For: 1.22.0
>
>
> REGEXP_SUBSTR error :
> {code:java}
> No match found for function signature REGEXP_SUBSTR(<CHARACTER>, <CHARACTER>, 
> [<INT>, <CHARACTER>, <CHARACTER>]){code}
>  
> Example query:
> {code:sql}
> SELECT REGEXP_SUBSTR('chocolate Chip cookies', 'c+.{2}', 1, product_id, 'i')
> FROM public.account{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to