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 < 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 > >