anatasiavela commented on a change in pull request #9526: URL: https://github.com/apache/kafka/pull/9526#discussion_r517699783
########## File path: generator/src/main/java/org/apache/kafka/message/JsonConverterGenerator.java ########## @@ -380,8 +380,9 @@ private void generateVariableLengthTargetToJson(Target target, Versions versions target.sourceVariable(), target.sourceVariable()))); } } else if (target.field().type().isRecords()) { - headerGenerator.addImport(MessageGenerator.BINARY_NODE_CLASS); - buffer.printf("%s;%n", target.assignmentStatement("new BinaryNode(new byte[]{})")); + headerGenerator.addImport(MessageGenerator.INT_NODE_CLASS); + buffer.printf("%s;%n", target.assignmentStatement( + String.format("new IntNode(%s.sizeInBytes())", target.sourceVariable()))); Review comment: Nvm, we can't deserialize `recordSet` to an IntNode because `FetchResponseData` expects `recordSet` to be of type `BaseRecords`, not `int`. What I've done was left deserialization the same and added the verbose tag to serialization. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org