[
https://issues.apache.org/jira/browse/CALCITE-5874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17748359#comment-17748359
]
Ran Tao edited comment on CALCITE-5874 at 7/28/23 1:06 AM:
-----------------------------------------------------------
[~jhyde] thanks for reviewing. I have removed the test.
After a brief look, I haven't seen other places where this method can be used
to simplify, but we can keep paying attention.
Adding this PR comes from the review of the `soundex` function with Tanner . If
there is no problem, can you help me to review it again?
and then I can use this method to simplify the `soundex` function and some new
functions first. Of course, we can also find out if there are other similar
places in the future.
was (Author: lemonjing):
[~jhyde] thanks for reviewing. I have removed the test.
Adding this PR comes from the review of the `soundex` function with Tanner . If
there is no problem, can you help me to review it again? and then I can use
this method to simplify the `soundex` function first. Of course, we can also
find out if there are other similar places later.
> Add a withReturnTypeInference copy method for SqlBasicFunction
> --------------------------------------------------------------
>
> Key: CALCITE-5874
> URL: https://issues.apache.org/jira/browse/CALCITE-5874
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.34.0
> Reporter: Ran Tao
> Assignee: Ran Tao
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.36.0
>
>
> some sql functions have same sqlkind and name but with different return types.
> e.g. Soundex function, calcite and bigquery return varchar(4), however spark
> return non-fixed length. If we want reuse Soundex, we can only use create
> method to pass all parameters, it's a bit bloated.
> If we add a `withReturnTypeInference()`, we can simply use this to copy from
> existed functions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)