ApacheOrcDotNet icon indicating copy to clipboard operation
ApacheOrcDotNet copied to clipboard

Support Enum serialization

Open wertzui opened this issue 3 years ago • 2 comments

Serialization of enums is currently not supported. It should be added and it should be configurable to serialize them either is int or as string.

wertzui avatar Nov 29 '22 11:11 wertzui

Hi @wertzui, thanks for your great ideas.

This version of ApacheOrcDotNet is end-of-life in our internal utilization. A new ORC reader in C# will be getting added to this repository shortly, but the work to create a new writer hasn't been prioritized.

This current implementation spends a significant proportion of its time in garbage collection, leading to pretty poor performance. It needs to be reoriented into a column-first batched-array structure to make sense going forward.

I'd gladly accept pull requests for improvements, but unfortunately I won't be able to commit time to making the changes you've requested.

With regard to this request in particular, I've found that I am nearly never able to serialize an existing POCO directly to one of the big-data storage formats. I'm always creating a pass-through type that gets serialized and converted between the internal representation. I would suggest following the same approach here and in #13, creating types that precisely match your schema and converting data from your internal representation to those dedicated types.

ddrinka avatar Nov 29 '22 19:11 ddrinka

I'll leave this open to represent a beneficial feature request, but just want to be upfront that I won't be able to make the changes requested in the near future.

ddrinka avatar Nov 29 '22 19:11 ddrinka