afedulov commented on PR #19286: URL: https://github.com/apache/flink/pull/19286#issuecomment-1145107709
@godfreyhe thanks for the feedback. > I find there is no any difference of the json node after deserialized from the message between changing the csvSchema or not. See the debug info with original schema: I can confirm your findings - something I did not notice after Arvid proposed the optimization. It seems that Jackson ignores the schema when parsing to a generic JsonNode type and not a fixed POJO, even when initialized with schema. `new CsvMapper().readerFor(JsonNode.class).with(csvSchema);`, also indirectly implied [here](https://stackoverflow.com/questions/52384169/is-it-possible-to-parse-the-csv-rows-into-jsonnodes-having-the-correct-value-typ). I propose to remove the optimization part in this case and stick to the original scope of this PR. What do you think? -- 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]
