[ 
https://issues.apache.org/jira/browse/FLINK-13389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Flink Jira Bot updated FLINK-13389:
-----------------------------------
    Labels: auto-deprioritized-major stale-minor  (was: 
auto-deprioritized-major)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help 
the community manage its development. I see this issues has been marked as 
Minor but is unassigned and neither itself nor its Sub-Tasks have been updated 
for 180 days. I have gone ahead and marked it "stale-minor". If this ticket is 
still Minor, please either assign yourself or give an update. Afterwards, 
please remove the label or in 7 days the issue will be deprioritized.


> Setting DataStream return type breaks some type conversion between Table and 
> DataStream
> ---------------------------------------------------------------------------------------
>
>                 Key: FLINK-13389
>                 URL: https://issues.apache.org/jira/browse/FLINK-13389
>             Project: Flink
>          Issue Type: Bug
>          Components: API / DataStream, Table SQL / API
>            Reporter: Rong Rong
>            Priority: Minor
>              Labels: auto-deprioritized-major, stale-minor
>
> When converting between data stream and table, there are situations where 
> only GenericTypeInfo can be successfully applied, but not directly setting 
> the specific RowTypeInfo.
> For example the following code doesn't work
> {code:java}
>               TypeInformation<?>[] types = {
>                       BasicTypeInfo.INT_TYPE_INFO,
>                       TimeIndicatorTypeInfo.ROWTIME_INDICATOR(),
>                       BasicTypeInfo.STRING_TYPE_INFO};
>               String[] names = {"a", "b", "c"};
>               RowTypeInfo typeInfo = new RowTypeInfo(types, names);
>               DataStream<Row> ds = env.fromCollection(data).returns(typeInfo);
>               Table sourceTable = tableEnv.fromDataStream(ds, "a,b,c");
>               tableEnv.registerTable("MyTableRow", sourceTable);
>               DataStream<Row> stream = tableEnv.toAppendStream(sourceTable, 
> Row.class)
>                       .map(a -> a)
>                       // this line breaks the conversion, it sets the 
> typeinfo to RowTypeInfo.
>                       // without this line the output type is 
> GenericTypeInfo(Row)
>                       .returns(sourceTable.getSchema().toRowType());  
>               stream.addSink(new StreamITCase.StringSink<Row>());
>               env.execute();
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to