AMashenkov commented on a change in pull request #194:
URL: https://github.com/apache/ignite-3/pull/194#discussion_r670555945
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/registry/SchemaRegistryImpl.java
##########
@@ -106,9 +114,37 @@ public SchemaRegistryImpl(int initialVer,
Function<Integer, SchemaDescriptor> hi
if (curSchema.version() == rowSchema.version())
return new Row(rowSchema, row);
- assert rowSchema.version() == curSchema.version() + 1; // TODO:
IGNITE-14864 implement merged mapper for arbitraty schema versions.
+ assert curSchema.version() >= rowSchema.version();
+
+ ColumnMapper mapping = resolveMapping(rowSchema, curSchema);
+
+ return new UpgradingRowAdapter(curSchema, row, mapping);
+ }
+
+ /**
+ * @param rowSchema Row schema.
+ * @param curSchema Target schema.
+ * @return Column mapper for target schema.
+ */
+ public ColumnMapper resolveMapping(SchemaDescriptor rowSchema,
SchemaDescriptor curSchema) {
Review comment:
I think, in this case, we should never get here.
--
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]