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

Youjun Yuan commented on CALCITE-3395:
--------------------------------------

Hi Julian,

 

For "addMonths", "overlay", we do have different entries for different 
versions, so adding another entry for "substring" would be a nature fix.

We are leveraging calcite to generate golang code, which does not support 
method overload, hence it's a PROBLEM for us. Though I can walk around this, I 
thought fixing it in calcite would make other's life a little bit easier (in 
similar scenario).

 

I'd like to contribute on this, once we agree it's the right way to go.

> add BuiltinMethod for Substring(String, int)
> --------------------------------------------
>
>                 Key: CALCITE-3395
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3395
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Youjun Yuan
>            Priority: Minor
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> substring function has two versoins:
> 1, Substring(String, int, int)
> 2, Substring(String, int)
> currently in BuiltinMethod.java, only the first one is defined. Need to 
> define the second one as well, so that we can use both of them.
> Apache Flink(FunctionGenerator.scala), reference the BuiltinMethod, since 
> Calcite only defines 1, not 2, Flink always resolve SUBSTRING to 
> Substring(String, int, int) even if there is only 2 parameters. This problem 
> happens to be covered by method overloading of java, but it's still a 
> potential problem.



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

Reply via email to