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

Zhenghua Gao edited comment on FLINK-15469 at 1/17/20 7:12 AM:
---------------------------------------------------------------

Hi [~lzljs3620320], after re-think the whole thing, we should bring the 
physical data types of the sink and the type class(java tuple2 or scale tuple2) 
to the planner so that our blink planner could handle the precision things. So 
there is a proposal as following:
 # deprecate getRecordType and introduce getRecordDataType instead
 # -remove getOutputType and introduce getConsumedDataType, which returns 
ROW<BOOL, ROW>-
 # -introduce getTypeClass interface, which returns type class for codegen-

What do you think? I will file a PR soon if this works. 

 
  
 


was (Author: docete):
Hi [~lzljs3620320], after re-think the whole thing, we should bring the 
physical data types of the sink and the type class(java tuple2 or scale tuple2) 
to the planner so that our blink planner could handle the precision things. So 
there is a proposal as following:
 # deprecate getRecordType and introduce getRecordDataType instead
 # remove getOutputType and introduce getConsumedDataType, which returns 
ROW<BOOL, ROW>
 # introduce getTypeClass interface, which returns type class for codegen

What do you think? I will file a PR soon if this works. 

 
 

> Update UpsertStreamTableSink and RetractStreamTableSink and related interface 
> to new type system
> ------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-15469
>                 URL: https://issues.apache.org/jira/browse/FLINK-15469
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>    Affects Versions: 1.10.0
>            Reporter: Zhenghua Gao
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.11.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently *UpsertStreamTableSink* can only returns TypeInformation of the 
> requested record, which can't support types with precision and scale, e.g. 
> TIMESTAMP(p), DECIMAL(p,s).
> A proposal is deprecating the *getRecordType* API and adding a 
> *getRecordDataType* API instead to return the data type of the requested 
> record.
> {code:java}
> /**
>  * Returns the requested record type.
>  * 
>  * @Deprecated This method will be removed in future versions. It's 
> recommended to use {@link #getRecordDataType()} instead.
>  */
> @Deprecated
> TypeInformation<T> getRecordType();
> /*
>  * Returns the requested record data type.
>  */
> DataType getRecordDataType();
> {code}
>  



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

Reply via email to