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

Julian Hyde edited comment on CALCITE-5159 at 5/27/22 7:15 PM:
---------------------------------------------------------------

I reviewed the PR and left some comments. Nice work. A couple of additional 
comments:
* I'd like to see unit tests in {{SqlParserTest}} or similar. There are many 
combinations - e.g. arrays containing nulls, arrays, character literals - and a 
unit test is a good way to cover a lot of them in one place
* Any changes needed to reference.md?

Looks like you are not supporting 
{code}
ARRAY '{1, 2}'
{code}
syntax at this time. That's OK. It might have made some things easier if you 
had an explicit version in addition to implicit. Although you also would have 
to derive the type of the array literal based on the contents of the string.


was (Author: julianhyde):
I reviewed the PR and left some comments. Nice work. A couple of additional 
comments:
* I'd like to see unit tests in {{SqlParserTest}} or similar. There are many 
combinations - e.g. arrays containing nulls, arrays, character literals - and a 
unit test is a good way to cover a lot of them in one place
* Any changes needed to reference.md?


Looks like you are not supporting {{ARRAY '{1, 2}'}} syntax at this time. 
That's OK. It might have made some things easier.

> Postgres dialect should support implicit cast from string literal to array 
> literal
> ----------------------------------------------------------------------------------
>
>                 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
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> According to the documentation 
> [https://www.postgresql.org/docs/current/arrays.html]
> Postgres dialect should support implicit cast from string literal to array 
> literal:
> {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