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

xiong duan commented on CALCITE-6450:
-------------------------------------

Fixed in 
[e355036e|https://github.com/apache/calcite/commit/ace3afeafb3212dc96fb00f72ccd1632e355036e].
 Thanks for the PR [~eveywu] . Thanks for the review [~cancai] .

> Postgres CONCAT_WS function throws exception when parameter type is 
> (<CHAR(1)>, <INTEGER ARRAY>)
> ------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-6450
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6450
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.37.0
>            Reporter: xiong duan
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2024-06-29-14-57-56-513.png
>
>
> The SQL can run success in Postgres:
> {code:java}
> select concat_ws(',',ARRAY[10000, 10000, 10000, 10000]); {code}
> But in Calcite, It will throw exception:
> {code:java}
> @Test void testConcatFunction() {
> final String sql = "select concat_ws(',',ARRAY[10000, 10000, 10000, 10000]) 
> as c";
> fixture()
> .withFactory(c ->
> c.withOperatorTable(t ->
> SqlValidatorTest.operatorTableFor(SqlLibrary.POSTGRESQL)))
> .withCatalogReader(MockCatalogReaderExtended::create)
> .withSql(sql)
> .ok();
> }{code}
> {code:java}
> From line 1, column 8 to line 1, column 55: Cannot apply 'CONCAT_WS' to 
> arguments of type 'CONCAT_WS(<CHAR(1)>, <INTEGER ARRAY>)'. Supported form(s): 
> 'CONCAT_WS(<STRING>)'{code}
> This issue find in comment 
> [CALCITE-6446|https://github.com/apache/calcite/pull/3831] .



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

Reply via email to