joooger commented on a change in pull request #5676: IGNITE-10654 Print warn 
message in case of index creating with already existing fields.
URL: https://github.com/apache/ignite/pull/5676#discussion_r267234341
 
 

 ##########
 File path: 
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
 ##########
 @@ -837,9 +920,16 @@ public void proposeUserIndex(Index idx) throws 
IgniteCheckedException {
         try {
             ensureNotDestroyed();
 
-            for (Index oldIdx : idxs) {
-                if (F.eq(oldIdx.getName(), idx.getName()))
-                    throw new IgniteCheckedException("Index already exists: " 
+ idx.getName());
+            Index idxExist = checkIndexPresence(idx);
+
+            if (idxExist != null) {
+                String idxCols = Stream.of(idx.getIndexColumns())
 
 Review comment:
   Don't use a result of such operation

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to