slinkydeveloper commented on pull request #17544:
URL: https://github.com/apache/flink/pull/17544#issuecomment-953184692


   The last commit I made 
https://github.com/apache/flink/pull/17544/commits/a20fe2427c03ceb71b8d4b5f30bdc282aba530fe
 fixes the behaviour of `TestCsvDeserializationSchema`. In particular, before 
this PR, `TestCsvDeserializationSchema` was implicitly assuming that the input 
data type was a 1:1 mapping to the parsed csv row. This is not the case, and 
the DeserializationSchema should take care of performing the proper mapping 
between the input records (in whatever format) and the output `RowData`, which 
may or may not contain all the fields of the input record and may or may not 
contain those ordered in the same way the input is. This PR addresses the 
issue. Note that the problem exists for this particular csv format, because 
`flink-csv` is still using the old interface (hence, no change) and because 
json deserialization schema properly map the input object fields to the output 
row data, without performing any bad assumption: 
https://github.com/apache/flink/blob/master/flink-formats/fli
 
nk-json/src/main/java/org/apache/flink/formats/json/JsonToRowDataConverters.java#L334


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to