HI, 
> about the question can I assume that ResolvedCatalogTable will be always a 
> runtime type. 

Sorry for I don't really understand your question , why do you have such 
assumtion? 

Best regards, 
Yuxia 


发件人: "Krzysztof Chmielewski" <krzysiek.chmielew...@gmail.com> 
收件人: "User" <user@flink.apache.org> 
发送时间: 星期六, 2023年 1 月 21日 上午 3:13:12 
主题: Re: Custom catalog implementation - getting table schema for computed 
columns 

Ok, 
so now I see that runtime type of "table" parameter is ResolvedCatalogTable 
that has method getResolvedSchema. 

So I guess my question is, can I assume that ResolvedCatalogTable will be 
always a runtime type? 

pt., 20 sty 2023 o 19:27 Krzysztof Chmielewski < [ 
mailto:krzysiek.chmielew...@gmail.com | krzysiek.chmielew...@gmail.com ] > 
napisał(a): 



Hi, 
I'm implementing a custom Catalog where for "create table" I need to get tables 
schema, both column names and types from DDL. 

Now the Catalog's createTable method has "CatalogBaseTable table" argument. 
The CatalogBaseTable has a deprecated "getSchema" and suggest to use 
getUnresolvedSchema instead. 

I was able to resolve schema types for physical columns, but I'm struggling 
with computed columns [1]. To be more precise I'm struggling to get//resolve 
the type of this field. 

I see that all implementations that would be needed to resolve inderlying 
expression of UnresolvedComputedColumn are marked as @Internal. 

On the other hand the deprecated "getSchema" has a proper type for this 
ComputedColumn. 

I'm wondering now, what should I do. Should I use the deprecated API that has 
what I need already or should I use suggested API and somehow try to resolve 
the type using @Internal classes which also does not seems safe. 

I would appreciate for any hint here. 

[1] [ 
https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/dev/table/sql/create/#:~:text=BIGINT%2C%20%60name%60%20STRING)-,Computed%20Columns,-Computed%20columns%20are
 | 
https://nightlies.apache.org/flink/flink-docs-release-1.16/docs/dev/table/sql/create/#:~:text=BIGINT%2C%20%60name%60%20STRING)-,Computed%20Columns,-Computed%20columns%20are
 ] 





Reply via email to