Note you can create a Cython alias for any C++ type

https://github.com/apache/arrow/blob/master/python/pyarrow/includes/libarrow.pxd#L138

so you can create an OrcCompressionKind alias for the fully scoped C++
type, no need for any C++ changes

On Mon, Mar 15, 2021 at 4:00 AM Antoine Pitrou <[email protected]> wrote:
>
>
> Hi,
>
> Le 15/03/2021 à 00:31, Ying Zhou a écrit :
> >
> > I have a question about https://github.com/apache/arrow/pull/9702 
> > <https://github.com/apache/arrow/pull/9702> (and another future PR) over 
> > WriterOptions and ReaderOptions that are basically code copied from the ORC 
> > project which then got Arrowized so that the names are acceptable.
> >
> > After going over Cython code for Parquet I began to wonder whether I have 
> > to make the following changes:
> > 1. Add ‘Orc’ to the beginning of all the enums and classes I adapted from 
> > the ORC project e.g. arrow::adapters::orc::OrcCompressionKind instead of 
> > arrow::adapters::orc::CompressionKind.
>
> I'd say no.
> By the way, there's already a compression enum in arrow/util/type_fwd.h,
> perhaps it's enough to reuse it:
> https://github.com/apache/arrow/blob/master/cpp/src/arrow/util/type_fwd.h#L42
>
> > 2. Make arrow::adapters::orc::(Orc)ReaderOptions and 
> > arrow::adapters::orc::(Orc)WriterOptions immutable and instead perform all 
> > the mutations in their respective builder types.
>
> Neither.  Plain structs should be ok.
> Take a look at CSV:
> https://github.com/apache/arrow/blob/master/cpp/src/arrow/csv/options.h
>
> Regards
>
> Antoine.

Reply via email to