You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/11/09 07:51:17 UTC

[GitHub] [ignite-3] korlov42 commented on a diff in pull request #1318: IGNITE-17729 Forbidding a table and an index with the same name.

korlov42 commented on code in PR #1318:
URL: https://github.com/apache/ignite-3/pull/1318#discussion_r1017533865


##########
modules/schema/src/main/java/org/apache/ignite/internal/schema/configuration/TableValidatorImpl.java:
##########
@@ -40,9 +42,19 @@ public class TableValidatorImpl implements Validator<TableValidator, NamedListVi
     /** {@inheritDoc} */
     @Override
     public void validate(TableValidator annotation, ValidationContext<NamedListView<TableView>> ctx) {
+        TablesView tablesConfig = ctx.getNewRoot(TablesConfiguration.KEY);
+
+        Set<String> idxNames = tablesConfig == null
+                ? Collections.emptySet()
+                : tablesConfig.indexes().namedListKeys().stream().map(String::toUpperCase).collect(Collectors.toSet());

Review Comment:
   Why do you convert names to upper case?



-- 
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-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org