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

Jark Wu edited comment on FLINK-14085 at 4/29/21, 8:53 AM:
-----------------------------------------------------------

Can't reproduce in 1.12, 1.13 versions. Maybe has been fixed. Please reopen it 
if it still exists. 


was (Author: jark):
Can't reproduce in 1.12, 1.13 versions. Maybe has been fixed. 

> schema changes after using  "create view" command via flink-table-sql-client
> ----------------------------------------------------------------------------
>
>                 Key: FLINK-14085
>                 URL: https://issues.apache.org/jira/browse/FLINK-14085
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Client, Table SQL / Planner
>    Affects Versions: 1.7.2, 1.8.0, 1.9.0
>         Environment: Centos 7.0 / JAVA 1.8
>            Reporter: Junling
>            Priority: Major
>              Labels: stale-major
>
> Assume there are two tables in the running environment of the flink sql 
> client.
> One is abc12, the schema is  ROW<taskId VARCHAR, sourceId VARCHAR,data ROW<id 
> VARCHR,value1 VARCHAR>> 
> The other is abc13, the schema is  ROW<taskId VARCHAR, sourceId VARCHAR,data 
> ROW<id VARCHR,value2 VARCHAR>> 
>  
> If we execute the "create view" command such as " create view myview as 
> select data from abc12",  then the bug will happen.  The schema of the table 
> abc13 will change as ROW<taskId VARCHAR, sourceId VARCHAR,data ROW<id 
> VARCHR,value1 VARCHAR>>, in which the schema of the "data" field becomes the 
> same as the "data" field in the table "abc12".
>  
> In summary, we found that the schema of the second table will change after 
> running "create view" command on the first table  if these two tables have 
> the row type field with the same structure (Here the same structure means 
> that the field type of the row field is same, and the field name can be 
> different.   e.g.  data ROW<a VARCHAR,b VARCHAR> and data1 ROW<c VARCHAR,d 
> VARCHAR> has the same structure).   As the affect of the row type field with 
> the same structure, the orignal schema of the row type field in the second 
> table will be replaced by the schema of the row type field in the first table.
>  
> This bug exits in the flink 1.7, 1.8 and 1.9.   In the 1.7 version,  we can 
> use the "describe" command to see the changed schema. In the 1.9 version, 
> since the catalogManager is introduced, it looks good when using the 
> "describe" command. However, when using "select" command to select the filed 
> name in the row type filed, it will rise up an exception that says the column 
> not exists in the table, which indicates that the schema of the table still 
> changes.   
>  



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

Reply via email to