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 2021/09/28 13:01:09 UTC

[GitHub] [ignite] zstan commented on a change in pull request #9427: IGNITE-15547 QueryTypeDescriptorImpl: Accept Classes/Enums extending an Interface which is used as cache indexed field

zstan commented on a change in pull request #9427:
URL: https://github.com/apache/ignite/pull/9427#discussion_r717551329



##########
File path: modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryTypeDescriptorImpl.java
##########
@@ -721,6 +721,16 @@ else if (F.eq(idxField, valueFieldAlias()) || F.eq(idxField, VAL_FIELD_NAME)) {
                 }
                 else if (coCtx.kernalContext().cacheObjects().typeId(propType.getName()) !=
                     ((BinaryObject)propVal).type().typeId()) {
+                    // Check for classes/enums implementing indexed interfaces
+                    String clsName = ((BinaryObject) propVal).type().typeName();
+                    try {
+                        final Class<?> cls = Class.forName(clsName);
+                        if (U.box(propType).isAssignableFrom(U.box(cls))) {
+                            continue;
+                        }
+                    } catch (ClassNotFoundException ignored) {

Review comment:
       minimally we need to log into debug here ?




-- 
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