You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Xingcan Cui (Jira)" <ji...@apache.org> on 2024/03/09 01:18:00 UTC

[jira] [Created] (FLINK-34633) Support unnesting array constants

Xingcan Cui created FLINK-34633:
-----------------------------------

             Summary: Support unnesting array constants
                 Key: FLINK-34633
                 URL: https://issues.apache.org/jira/browse/FLINK-34633
             Project: Flink
          Issue Type: New Feature
          Components: Table SQL / Planner
    Affects Versions: 1.18.1
            Reporter: Xingcan Cui


It seems that the current planner doesn't support using UNNEST on array constants.(x)
{code:java}
SELECT * FROM UNNEST(ARRAY[1,2,3]);{code}
 
The following query can be compiled.(x)
{code:java}
SELECT * FROM (VALUES('a')) CROSS JOIN UNNEST(ARRAY[1, 2, 3]){code}
 
The rewritten version works. (/)
{code:java}
SELECT * FROM (SELECT *, ARRAY[1,2,3] AS A FROM (VALUES('a'))) CROSS JOIN UNNEST(A){code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)