[DISCUSSION] Array to BinaryObject serialization

2021-04-30 Thread Nikolay Izhikov
Hello, Igniters. Currently, binary marshaller works as follows(Say, we have a class `User` then): IgniteBinary#toBinary(User)` -> BinaryObject IgniteBinary#toBinary(User[])` -> Object[] IgniteBinary#toBinary(Object[])` -> Object[] This means, that we lose array component type information during

Re: [DISCUSSION] Array to BinaryObject serialization

2021-04-30 Thread Nikolay Izhikov
Igniters, Want to clarify my proposal about new array store format. I think we should store array in special binary wrapper that will keep original component type ``` public class BinaryArrayWrapper implements BinaryObjectEx, Externalizable { /** Type ID. */ private int compTypeId;

Re: [DISCUSSION] Array to BinaryObject serialization

2021-04-30 Thread Ilya Kasnacheev
Hello! For me it sounds like something we would like to do in 3.0 (if indeed it will have arrays as possible value (or key) type), but doing it in 2.x raises concerns whether it has enough time left to stabilize. Also, I think making it default "true" is a breaking change and is not possible in a

Re: [DISCUSSION] Array to BinaryObject serialization

2021-04-30 Thread Nikolay Izhikov
Hello, Ilya. Thanks for the feedback! > For me it sounds like something we would like to do in 3.0 Ignite 3 is a very long way to go, so I prefer to target this fix in Ignite 2.x. > I think making it default "true" is a breaking change and is not possible in > a minor release Yes, you are cor

Re: [DISCUSSION] Array to BinaryObject serialization

2021-04-30 Thread Valentin Kulichenko
Hi Nikolay, Is there a specific motivation behind your proposal? I do acknowledge that the semantics of the toBinary method is a little weird, but my concern is that the way it works with arrays is just an example. Are you suggesting changing collections, primitives, and other "first citizen" data