[
https://issues.apache.org/jira/browse/CALCITE-6450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
xiong duan resolved CALCITE-6450.
---------------------------------
Fix Version/s: 1.38.0
Resolution: Fixed
> 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
> Fix For: 1.38.0
>
> 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)