xiong duan created CALCITE-6450:
-----------------------------------

             Summary: 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


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 message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to