Berkof commented on a change in pull request #455:
URL: https://github.com/apache/ignite-3/pull/455#discussion_r753982627
##########
File path:
modules/schema/src/main/java/org/apache/ignite/internal/schema/marshaller/MarshallerUtil.java
##########
@@ -45,32 +46,31 @@
public static int getValueSize(Object val, NativeType type) throws
InvalidTypeException {
switch (type.spec()) {
case BYTES:
- return ((byte[]) val).length;
-
+ // Return zero for pojo as they are not serialized yet.
+ return (val instanceof byte[]) ? ((byte[]) val).length : 0;
Review comment:
Is it worth setting some small value to guess object size? With zero
we'll underestimate it in 100% cases, but with 100 bytes (some constant) we
have a chance to guess.
--
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]