Should we distinguish *record data type* and *consumed data type*? Currently the design of UpsertStreamTableSink and RetractStreamTableSink DO distinguish them.
In my proposal the framework will ignore *getConsumedDataType*, so it's ok to use *getConsumedDataType* to do the job if we don't distinguish *record data type* and *consumed data type*. *Best Regards,* *Zhenghua Gao* On Mon, Feb 3, 2020 at 4:49 PM Kurt Young <ykt...@gmail.com> wrote: > Would overriding `getConsumedDataType` do the job? > > Best, > Kurt > > > On Mon, Feb 3, 2020 at 3:52 PM Zhenghua Gao <doc...@gmail.com> wrote: > > > Hi all, > > > > FLINK-12254[1] [2] updated TableSink and related interfaces to new type > > system which > > allows connectors use the new type system based on DataTypes. > > > > But FLINK-12911 port UpsertStreamTableSink and RetractStreamTableSink to > > flink-api-java-bridge and returns TypeInformation of the requested record > > type which > > can't support types with precision and scale, e.g. TIMESTAMP(p), > > DECIMAL(p,s). > > > > /** > > * Returns the requested record type. > > */ > > TypeInformation<T> getRecordType(); > > > > > > A proposal is deprecating the *getRecordType* API and adding a > > *getRecordDataType* API instead to return the data type of the requested > > record. I have filed the issue FLINK-15469 and > > an initial PR to verify it. > > > > What do you think about this API changes? Any feedback are appreciated. > > [1] https://issues.apache.org/jira/browse/FLINK-12254 > > [2] https://github.com/apache/flink/pull/8596 > > [3] https://issues.apache.org/jira/browse/FLINK-15469 > > > > *Best Regards,* > > *Zhenghua Gao* > > >