Hi Everyone. I am trying to parse a nested field i...
# random
a
Hi Everyone. I am trying to parse a nested field in a row of a data stream through RichMapFunction<Row, Row>. The input and output of this is Row type. This nested column in a row can have any number of fields.
Copy code
DataStream<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)