ygerzhedovich commented on code in PR #4199:
URL: https://github.com/apache/ignite-3/pull/4199#discussion_r1713646863
##########
modules/client-common/src/main/java/org/apache/ignite/internal/client/proto/ClientBinaryTupleUtils.java:
##########
@@ -435,11 +439,20 @@ public static void appendValue(BinaryTupleBuilder
builder, ColumnType type, Stri
throw new IllegalArgumentException("Unsupported type: " +
type);
}
} catch (ClassCastException e) {
+ NativeType nativeType = NativeTypes.fromObject(v);
+ // A null is handled separately, so nativeType should not be null.
+ assert nativeType != null;
+
+ NativeTypeSpec actualType = nativeType.spec();
+ NativeTypeSpec expectedType = NativeTypeSpec.fromColumnType(type);
+
// Exception message is similar to embedded mode - see
o.a.i.i.schema.Column#validate
- throw new IgniteException(PROTOCOL_ERR, "Column's type mismatch ["
- + "column=" + name
- + ", expectedType=" + type
- + ", actualType=" + v.getClass() + ']', e);
+ String error = format(
+ "Value type does not match expected {} but got {} in
column '{}'",
Review Comment:
```suggestion
"Value type does not match. Expected {} but got {} in
column '{}'",
```
--
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]