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

Jark Wu commented on FLINK-16599:
---------------------------------

Under the hood, the computed columns can be thought as a SELECT query, it's 
also impossible to have expression reference other expression in the SELECT 
query, e.g. {{SELECT FUN_1(origin) as col1, FUN_2(col1) as col2 FROM T}} is 
invalid.

> Throw Unknown identifier when having nested computed column
> -----------------------------------------------------------
>
>                 Key: FLINK-16599
>                 URL: https://issues.apache.org/jira/browse/FLINK-16599
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.10.0
>            Reporter: YufeiLiu
>            Priority: Major
>
> {code:sql}
> CREATE TABLE source {
>   origin STRING,
>   col1 AS FUN_1(origin),
>   col2 AS FUN_2(col1),
>   col3 AS FUN_3(col1)
> }
> {code}
> Throws "Unknown identifier 'col1'  ".
> I konw maybe is not a bug, because of computed column implementation logic. 
> But I think it's a little bit inconvenient case I have to write like this.
> {code:sql}
> CREATE TABLE source {
>   origin STRING,
>   col2 AS FUN_2(FUN_1(origin)),
>   col3 AS FUN_3(FUN_1(origin))
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to