AMashenkov commented on a change in pull request #9618:
URL: https://github.com/apache/ignite/pull/9618#discussion_r781930756
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryTypeDescriptorImpl.java
##########
@@ -724,8 +724,10 @@ else if (F.eq(idxField, valueFieldAlias()) ||
F.eq(idxField, VAL_FIELD_NAME)) {
}
}
}
- else if
(coCtx.kernalContext().cacheObjects().typeId(propType.getName()) !=
- ((BinaryObject)propVal).type().typeId()) {
+ else if
(U.classForName(((BinaryObject)propVal).type().typeName(), Object.class, true)
+ != propType &&
coCtx.kernalContext().cacheObjects().typeId(propType.getName()) !=
+ ((BinaryObject)propVal).type().typeId()) {
+
Review comment:
Will it be the same?
```suggestion
else if
(coCtx.kernalContext().cacheObjects().typeId(propType.getName()) !=
((BinaryObject)propVal).type().typeId()) {
final Class<?> cls =
U.classForName(((BinaryObject)propVal).type().typeName(), null, true);
if ((cls == null && propType == Object.class) || (cls !=
null && propType.isAssignableFrom(cls)))
continue;
throw new IgniteSQLException("Type for a column '" +
idxField +
"' is not compatible with index definition. Expected
'" +
propType.getSimpleName() + "', actual type '" +
((BinaryObject)propVal).type().typeName() + "'");
}
```
--
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]