AMashenkov commented on code in PR #5373: URL: https://github.com/apache/ignite-3/pull/5373#discussion_r1993277463
########## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogSystemViewDescriptorSerializers.java: ########## @@ -76,4 +77,39 @@ public void writeTo(CatalogSystemViewDescriptor descriptor, IgniteDataOutput out output.writeByte(descriptor.systemViewType().id()); } } + + /** + * Serializer for {@link CatalogSystemViewDescriptor}. + */ + @CatalogSerializer(version = 2, since = "3.1.0") + static class SystemViewDescriptorSerializerV2 implements CatalogObjectSerializer<CatalogSystemViewDescriptor> { + + private final MarshallableType<CatalogTableColumnDescriptor> columnType = + MarshallableType.typeOf(CatalogTableColumnDescriptor.class, MarshallableEntryType.DESCRIPTOR_TABLE_COLUMN, 2); + + @Override + public CatalogSystemViewDescriptor readFrom(CatalogObjectDataInput input) throws IOException { + int id = input.readVarIntAsInt(); + int schemaId = input.readVarIntAsInt(); + String name = input.readUTF(); + long updateToken = input.readVarInt(); + + List<CatalogTableColumnDescriptor> columns = input.readEntryList(columnType); Review Comment: What if table column descriptor will be changed? Then we should either * rise up the version of current serializer with the only changing `columnType` field. This kills the idea of fine grained versioning. * or keep using old marshaller. But using different serializers (in view and tables) for shared business object may be incorrect. -- 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