Ashutosh Joshi
12/28/2022, 5:19 PMDataStream<Row> outStream = stream.map(new ParsePayload(functionMap, typeInformation))
.uid("ParseNestedColumn");
private static class ParsePayload extends RichMapFunction<Row, Row> implements Serializable
{
@Override
public Row map(Row row) throws Exception {
<business logic>
…….
return resultRow;
}
}
The issue is that, I can return type information of a row only after evaluating map function or by creating output row because of fields are not fixed in nested column. I have tried both Types.ROW_NAMED() and ResultTypeQueryable interface, but both checks type information before evaluating map function and this way I can’t supply type information to the stream.
Can anyone please help by giving solution through some example ?
P.S - I do not want to enable Generic Types for my job. (edited)