Schema with TypeInformation or DataType

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Schema with TypeInformation or DataType

tison
Hi,

I notice that our type system has two branches. One  is TypeInformation while the other is
DataType. It is said that Table API will use DataType but there are several questions about
this statement:

1. Will TypeInformation be deprecated and we use DataType as type system everywhere?
2. Schema in Table API currently support only TypeInformation to register a field, shall we support
the DataType way as well?

Best,
tison.
Reply | Threaded
Open this post in threaded view
|

Re: Schema with TypeInformation or DataType

godfrey he
Hi tison,

>1. Will TypeInformation be deprecated and we use DataType as type system everywhere?
AFAIK, runtime will still supports TypeInformation, while table module supports DataType

2. Schema in Table API currently support only TypeInformation to register a field, shall we support
the DataType way as well?
Schema also supports DataType since FLINK-14645[1]


Best,
Godfrey

tison <[hidden email]> 于2020年4月17日周五 下午2:14写道:
Hi,

I notice that our type system has two branches. One  is TypeInformation while the other is
DataType. It is said that Table API will use DataType but there are several questions about
this statement:

1. Will TypeInformation be deprecated and we use DataType as type system everywhere?
2. Schema in Table API currently support only TypeInformation to register a field, shall we support
the DataType way as well?

Best,
tison.
Reply | Threaded
Open this post in threaded view
|

Re: Schema with TypeInformation or DataType

Jark Wu-3
In reply to this post by tison
Hi Tison,

Migration from TypeInformation to DataType is a large work and will across many releases. As far as I can tell, we will finalize the work in 1.11.
As godfrey said above, Flink SQL & Table API should always use DataType, DataStream uses TypeInformation. 

Schema already supports DataType to register a field, and the the method using TypeInformation to register field is deprecated since 1.10. 

Best,
Jark

On Fri, 17 Apr 2020 at 14:14, tison <[hidden email]> wrote:
Hi,

I notice that our type system has two branches. One  is TypeInformation while the other is
DataType. It is said that Table API will use DataType but there are several questions about
this statement:

1. Will TypeInformation be deprecated and we use DataType as type system everywhere?
2. Schema in Table API currently support only TypeInformation to register a field, shall we support
the DataType way as well?

Best,
tison.
Reply | Threaded
Open this post in threaded view
|

Re: Schema with TypeInformation or DataType

tison
Thanks for your inputs and sorry that I said Schema doesn't support DataType to register a field because I was looking into Flink 1.9 codes...

Best,
tison.


Jark Wu <[hidden email]> 于2020年4月17日周五 下午2:42写道:
Hi Tison,

Migration from TypeInformation to DataType is a large work and will across many releases. As far as I can tell, we will finalize the work in 1.11.
As godfrey said above, Flink SQL & Table API should always use DataType, DataStream uses TypeInformation. 

Schema already supports DataType to register a field, and the the method using TypeInformation to register field is deprecated since 1.10. 

Best,
Jark

On Fri, 17 Apr 2020 at 14:14, tison <[hidden email]> wrote:
Hi,

I notice that our type system has two branches. One  is TypeInformation while the other is
DataType. It is said that Table API will use DataType but there are several questions about
this statement:

1. Will TypeInformation be deprecated and we use DataType as type system everywhere?
2. Schema in Table API currently support only TypeInformation to register a field, shall we support
the DataType way as well?

Best,
tison.