AMashenkov commented on code in PR #5113:
URL: https://github.com/apache/ignite-3/pull/5113#discussion_r1928914385
##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/schema/SqlSchemaManagerImplTest.java:
##########
@@ -489,48 +485,27 @@ public void testHashIndex() {
createHashIndex("T1", "VAL1_IDX", "VAL1")
)));
- {
- int versionAfter = catalogManager.latestCatalogVersion();
- assertThat(versionAfter, equalTo(versionBefore + 1));
-
- SchemaPlus rootSchema = sqlSchemaManager.schema(versionAfter);
- assertNotNull(rootSchema);
-
- SchemaPlus schemaPlus =
rootSchema.getSubSchema(PUBLIC_SCHEMA_NAME);
- assertNotNull(schemaPlus);
-
- IgniteIndex index = findIndex(unwrapSchema(schemaPlus), "T1",
"VAL1_IDX");
- assertNull(index, "Index should not be available");
-
- Map<String, ?> indexes = findTableIndexes(versionAfter,
PUBLIC_SCHEMA_NAME, "T1");
- assertEquals(Set.of("T1_PK"), indexes.keySet());
- }
-
- makeIndexAvailable("VAL1_IDX");
-
- {
- int versionAfter = catalogManager.latestCatalogVersion();
- assertThat(versionAfter, equalTo(versionBefore + 2));
+ int versionAfter = catalogManager.latestCatalogVersion();
+ assertThat(versionAfter, equalTo(versionBefore + 1));
Review Comment:
I guess, here we want to be sure index is not available for SQL in
registered/building state.
So, we table and index should be created using separate catalog command
commands.
However, your case fix make sense. Let's have both tests.
--
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]