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

Yu Xu commented on CALCITE-7186:
--------------------------------

Yes, it's more appropriate to re-frame it as a bug. I added UdfTest, but during 
testing, I discovered compatibility issues with the codegen-generated code, 
which I've documented: https://issues.apache.org/jira/browse/CALCITE-7187

Byte/byte[] type can't be directly converted to ByteString , and it seems 
there's currently no compatibility. However, char/Character[] type can be 
converted to VARCHAR. 

Therefore, I've made a fix for this issue to adapt the Character[] mapping to 
VARCHAR.

> Add mapping from Byte[] to VARBINARY and Character[] to VARCHAR in Java UDF
> ---------------------------------------------------------------------------
>
>                 Key: CALCITE-7186
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7186
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.40.0
>            Reporter: Yu Xu
>            Assignee: Yu Xu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.41.0
>
>
> Java user-defined function (UDF) UDF functions with *Character[]* and 
> *Byte[]* return types are recognized as {*}OTHER{*}, but UDF functions with 
> *char[]* and *byte[]* return types are recognized as *VARCHAR* and 
> {*}VARBINARY{*}. *Character[]* should be consistent with {*}char[]{*}, and 
> *Byte[]* should be consistent with {*}byte[]{*}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to