JAkutenshi commented on code in PR #6712:
URL: https://github.com/apache/ignite-3/pull/6712#discussion_r2450611409
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CreateTableCommand.java:
##########
@@ -127,13 +139,36 @@ public List<UpdateEntry> get(UpdateContext updateContext)
{
ensureNoTableIndexOrSysViewExistsWithGivenName(schema, tableName);
+ int id = catalog.objectIdGenState();
+ int tableId = id++;
+ int pkIndexId = id++;
+
+ // We will have at max 5 entries if there is lazy default data zone
creation action is needed.
+ List<UpdateEntry> updateEntries = new ArrayList<>(5);
+
CatalogZoneDescriptor zone;
if (zoneName == null) {
if (catalog.defaultZone() == null) {
- throw new CatalogValidationException("The zone is not
specified. Please specify zone explicitly or set default one.");
+ int zoneId = id++;
+
+ zone = new CatalogZoneDescriptor(
Review Comment:
I've added the corresponding checks into `testTableEvents` and `testTables`.
I believe it's more convenient for lazy default zone invariant check than a
separate test.
--
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]