ygerzhedovich commented on code in PR #4199:
URL: https://github.com/apache/ignite-3/pull/4199#discussion_r1713664081
##########
modules/schema/src/main/java/org/apache/ignite/internal/schema/Column.java:
##########
@@ -207,11 +208,18 @@ public void validate(@Nullable Object val) {
NativeType objType = NativeTypes.fromObject(val);
if (objType != null && type.mismatch(objType)) {
- throw new InvalidTypeException("Column's type mismatch ["
- + "column=" + this
- + ", expectedType=" + type
- + ", actualType=" + objType
- + ", val=" + val + ']');
+ boolean specMatches = objType.spec() == type.spec();
+
+ if (specMatches && type instanceof VarlenNativeType) {
+ String error = format("Value too long for type {} in column
'{}'", type.displayName(), name);
Review Comment:
please use [ ] for parameters in messages
--
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]