[ https://issues.apache.org/jira/browse/FLINK-16599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17059937#comment-17059937 ]
Jark Wu commented on FLINK-16599: --------------------------------- This is not allowed by design, you can find the description in [Flink SQL documentation|https://ci.apache.org/projects/flink/flink-docs-master/dev/table/sql/create.html]: {quote}It is generated from a non-query expression that uses other columns in the same table and is not physically stored within the table.{quote} So you ought to be able to just repeat the expression you would like to reference. This is also the computed column behavior in other databases, such as MS SQL Server. cc [~danny0405] > 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)