maksaska commented on code in PR #12009: URL: https://github.com/apache/ignite/pull/12009#discussion_r2069140648
########## modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderEx.java: ########## Review Comment: #getOrCreateSchema() is exposing BinarySchema. Do you think we can move it to BinaryReaderExImpl? It seems it's only used in org.apache.ignite.internal.binary package ########## modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryMetadata.java: ########## Review Comment: BinaryMetadata constructor has non-public argument. Maybe we can create a static #createBinaryMetadata() method in BinaryUtils for that case? ########## modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryReaderEx.java: ########## Review Comment: And the same goes to #currentSchema() of BinaryWriterEx ########## modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientUtils.java: ########## @@ -169,30 +115,22 @@ BinaryMetadata binaryMetadata(BinaryInputStream in) throws IOException { String typeName = reader.readString(); String affKeyFieldName = reader.readString(); - Map<String, BinaryFieldMetadata> fields = ClientUtils.map( + Map<String, BinaryFieldMetadata> fields = map( in, unused -> reader.readString(), unused2 -> new BinaryFieldMetadata(reader.readInt(), reader.readInt()) ); boolean isEnum = reader.readBoolean(); - Map<String, Integer> enumValues = isEnum ? ClientUtils.map(in, unsed -> reader.readString(), unsed2 -> reader.readInt()) : null; - - Collection<BinarySchema> schemas = ClientUtils.collection( - in, - unused -> new BinarySchema( - reader.readInt(), - new ArrayList<>(ClientUtils.collection(in, unused2 -> reader.readInt())) - ) - ); + Map<String, Integer> enumValues = isEnum ? map(in, unsed -> reader.readString(), unsed2 -> reader.readInt()) : null; return new BinaryMetadata( typeId, typeName, fields, affKeyFieldName, - schemas, + readSchemas(reader, in), Review Comment: We can move the initialization to BinaryUtils and access #readSchemas from there -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org