gharris1727 commented on code in PR #15469:
URL: https://github.com/apache/kafka/pull/15469#discussion_r1591671051
##########
connect/api/src/main/java/org/apache/kafka/connect/data/Values.java:
##########
@@ -766,135 +852,23 @@ protected static boolean
canParseSingleTokenLiteral(Parser parser, boolean embed
protected static SchemaAndValue parse(Parser parser, boolean embedded)
throws NoSuchElementException {
Review Comment:
My core difficulty is that the parsing logic and the conversion logic
mutually depend on one another:
1. The convertTo methods check if the input is a String, and then run it
through the Parser.
2. After parsing a map or array, the Parser calls convertTo on the elements
to "cast" them to a common schema
I'm pretty sure convertTo -> parser -> convertTo is a reasonable cycle, and
should happen all the time via convertToList, convertToMap.
I don't think that parser -> convertTo -> parser is a useful cycle for
multiple reasons, but proving that is a little bit slippery. With some time I
think I can break this part of the cycle so that this doesn't end up as one big
ball of code again.
--
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]