You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Omid B (Jira)" <ji...@apache.org> on 2022/04/15 15:05:00 UTC

[jira] [Comment Edited] (CALCITE-5093) Cannot validate Array type

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

Omid B edited comment on CALCITE-5093 at 4/15/22 3:04 PM:
----------------------------------------------------------

[~yanjing.wang]t if a column type is array, it's not working. e.g. 1 = any(a_column_with_type_array). Shouldn't Calcite support that? (it's supported in Postgres for sure)


was (Author: omidbb):
[~yanjing.wang]t if a column type is array, it's not working. e.g. 1 = any(a_column_with_type_array). Shouldn't Calcite support that?

> Cannot validate Array type
> --------------------------
>
>                 Key: CALCITE-5093
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5093
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.30.0
>            Reporter: Omid B
>            Priority: Major
>
> I'm trying to validate a simple query against a schema:
>  
> {code:java}
> // SQL Query
> select id from product
> where 'item0' = any(attributes) {code}
> Running the validator and digging deep in the place that throws an exception I get to here: [https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/type/SameOperandTypeChecker.java#L100]
>  
> The inputs are two types: 
> {code:java}
> RecordType(CHAR(5) ROW_VALUE)
> RecordType(VARCHAR ARRAY ROW_VALUE){code}
> As you can see, these types must be compatible but Calcite don't match them right.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)