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

Julian Hyde commented on CALCITE-5159:
--------------------------------------

It seems more like an array literal than a cast. If it were a cast, expressions 
would work, but they don't; the following fails in Postgres:
{code}
select array[1,2,3] =('{1,2' || ',3}')
{code}

The following doesn't work in Postgres but arguably it should (by analogy with 
{{DATE}}, {{TIME}}, {{TIMESTAMP}}, {{INTERVAL}} literals):
{code}
select array '{1,2,3}'
{code}

This feature should, if possible, be implemented in the same way that character 
literals are implicitly converted to dates.

> Postgres dialect should support implicit cast from string to array
> ------------------------------------------------------------------
>
>                 Key: CALCITE-5159
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5159
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Dmitry Sysolyatin
>            Assignee: Dmitry Sysolyatin
>            Priority: Major
>
> According to the documentation 
> [https://www.postgresql.org/docs/current/arrays.html]
> Postgres dialect should support implicit cast from string to array:
> {code:java}
> SELECT ARRAY[1,2,3] = '{1,2,3}'
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to