Closed smolesen closed 5 months ago
I appreciate your thorough report, it makes the bug fixing process much easier. I'm working on it right now and I'll keep you updated on the progress.
@smolesen as a workaround you can replace int[]
with List<int>
as arrays are not supported by serializer yet.
Yeah, I tried that, it just gives me a lot of problems in the rest of the code.... of course I could deserialize as List
@smolesen in 3.8.6 it was extremely inefficient and only worked for root-level arrays :(
Aha I see...
I have a lot of data written with 3.8.6, do you think I'll be able to deserialize it, if I use List
Yes, but depending on how it was written you might need to mark arrays as legacy (if they are), see https://aloneguid.github.io/parquet-dotnet/serialisation.html#legacy-repeatable-legacy-arrays
@smolesen the complexity of deserializing into array is we don't know beforehand the size of the array, so deserialize cannot pre-allocate correct size. V3 was only operating on simple properties and was deserializing arrays into list of lists first, and then converting to arrays. So it will be more efficient to use List<T>
in the beginning.
The only workaround in deserializer i'm thinking of is allocating empty array, then resizing it every time a new element comes in, but that might quickly put a lot of pressure on GC.
so it's something like this for each element:
Ok, think I found a workable way to use List<> instead, so I'll stop using array.
Thanks for looking into it though....
Latest version also supports arrays of primitives btw if you still need it.
Great and thanks....
Library Version
4.22.0
OS
Windows
OS Architecture
64 bit
How to reproduce?
Failing test