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

Jiajun Xie edited comment on CALCITE-5241 at 8/23/22 12:31 PM:
---------------------------------------------------------------

* New commit: 
[https://github.com/apache/calcite/pull/2878/commits/2719a102f66b984ef138c03fbe56d39a29eba341]
 ** I moved `CHAR` to SqlLibraryOperators because Oracle, Postgres not support 
it and only enable for MySQL, Spark.
 ** I added some unit tests in `testChar` rather than `testJdbcFn`,  when 
operand is negative numbers or null, SQLServer 2014 will return null. So I also 
return null in calcite.
 * Need to discuss again about `CHR`, `CHR` that in Postgresql is same as `CHR` 
that in Calcite. Both can return UTF8 character.
 ** FYI: [https://www.postgresql.org/docs/current/functions-string.html]


was (Author: jiajunbernoulli):
* New commit: 
https://github.com/apache/calcite/pull/2878/commits/2719a102f66b984ef138c03fbe56d39a29eba341
 ** I moved `CHAR` to SqlLibraryOperators because Oracle, Postgres not support 
it and only enable for MySQL, Spark.
 ** I add some unit tests in `testChar` rather than `testJdbcFn`,  when operand 
is negative numbers or null, SQLServer 2014 will return null. So I also return 
null in calcite.
 * Need to discuss again about `CHR`, `CHR` that in Postgresql is same as `CHR` 
that in Calcite. Both can return UTF8 character.
 ** FYI: https://www.postgresql.org/docs/current/functions-string.html

> Implement CHAR function
> -----------------------
>
>                 Key: CALCITE-5241
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5241
>             Project: Calcite
>          Issue Type: Wish
>          Components: core
>            Reporter: pengfei.zhan
>            Assignee: Jiajun Xie
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Implement the {{CHAR\(n)}} function and the \{fn CHAR(string)\} JDBC function.
> Spark and hive support `char\(n\)`, however, calcite doesn't support it. Is 
> there any message I missed?



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

Reply via email to