adamreeve commented on issue #32240:
URL: https://github.com/apache/arrow/issues/32240#issuecomment-1378180004

   I went ahead and tidied up my code and used the reflection approach 
suggested by @westonpace to implement a default compression provider. I've 
created a PR for this at #33603
   
   I'm still not sure the reflection approach is the best way to go, it's 
pretty verbose and not very discoverable by users. I've included some comments 
in that PR about alternative approaches but maybe it's better to discuss them 
here rather than on the PR, so I'll copy them below:
   
   > An alternative approach that could be considered instead of reflection is 
to use these extra dependencies as build time dependencies but not make them 
dependencies of the NuGet package. I tested this out in 
https://github.com/adamreeve/arrow/commit/4544afde6fef12337c7b188cc497da0bc1bf829d
 and it seems to work reasonably well too but required bumping the version of 
`System.Runtime.CompilerServices.Unsafe` under the `netstandard2.0` and 
`netcoreapp3.1` targets. This reduces all the reflection boilerplate but seems 
pretty hacky as now Apache.Arrow.dll depends on these extra dlls and we rely on 
the dotnet runtime behaviour of not trying to load them until they're used. So 
I think the reflection approach is better.
   > 
   > Another alternative would be to move decompression support into a separate 
NuGet package (eg.  `Apache.Arrow.Compression`) that depends on `Apache.Arrow` 
and has an implementation of `ICompressionProvider` that users can pass in to 
the `ArrowFileReader` constructor, or maybe has a way to register itself with 
the `Apache.Arrow` package so it only needs to be configured once. That would 
seem cleaner to me but I'm not sure how much work it would be to set up a whole 
new package.
   
   PS. It wasn't very obvious that this issue had been migrated to GitHub, 
maybe comments should be added to open Jira issues to explain that comments are 
disabled and point to the migrated issue on GitHub?


-- 
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]

Reply via email to