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

[jira] [Created] (CALCITE-4999) `least restrictive` type inference does not work when one operand is scalar and another is row with one field

Dmitry Sysolyatin created CALCITE-4999:
------------------------------------------

             Summary: `least restrictive` type inference does not work when one operand is scalar and another is row with one field
                 Key: CALCITE-4999
                 URL: https://issues.apache.org/jira/browse/CALCITE-4999
             Project: Calcite
          Issue Type: Bug
          Components: core
            Reporter: Dmitry Sysolyatin
            Assignee: Dmitry Sysolyatin


I faced with a issue that the following query:
"SELECT ARRAY_CONCAT(ARRAY['1', '2'], array(select 'toast.' || x from unnest(ARRAY['1','2']) x))" didn't work, because of:

"java.lang.IllegalArgumentException: Cannot infer return type for ARRAY_CONCAT; operand types: [CHAR(1) ARRAY, RecordType(CHAR(7) EXPR$0) ARRAY]"

`least restrictive` type inference does not work when one operand is scalar and another is row with one field



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