AMashenkov commented on code in PR #6648:
URL: https://github.com/apache/ignite-3/pull/6648#discussion_r2381857800
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/descriptors/CatalogTableDescriptor.java:
##########
@@ -143,35 +107,39 @@ public CatalogTableDescriptor(
this.colocationColumns = Objects.requireNonNullElse(colocationCols,
pkCols);
this.schemaVersions = Objects.requireNonNull(schemaVersions, "No
catalog schema versions.");
this.storageProfile = Objects.requireNonNull(storageProfile, "No
storage profile.");
+
+ TableVersion latestTableVersion =
Objects.requireNonNull(schemaVersions.get(schemaVersions.latestVersion()));
+ if (!Objects.equals(latestTableVersion.columns(), columns)) {
+ throw new IllegalArgumentException(format(
+ "Latest schema version columns do not match descriptor
definition columns. Schema columns: {}, table columns: {}.",
+ latestTableVersion.columns(),
+ columns
+ ));
+ }
Review Comment:
Let's move all validation into builder.
--
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]