Hi, Sorry for my late response.
The VisitBuilder/VisitBuidlerInline API is enough for Arrow GLib. If VisitBuilder/VisitBuidlerInline API is provided, Arrow GLib doesn't use ArrayBuilder::type()/type_id() to convert C++ object to GLib object. > Is there any application which uses the adaptive > builders except the dictionary builders? Arrow GLib provides bindings for AdaptiveIntBuilder and AdaptiveUIntBuilder. Ruby uses them to build int/uint family arrays from Ruby's integer array: Arrow::ArrayBuilder.build([1, 2, 3]) -> Arrow::UInt8Array Arrow::ArrayBuilder.build([-1, 2, 128]) -> Arrow::Int16Array Thanks, -- kou In <calpsrs16pa8ncyq2z7oyw0t4unbs9f2s+_j04yw29ch8hco...@mail.gmail.com> "Re: [DISCUSS] ArrayBuilders with mutable type" on Mon, 19 Aug 2019 10:16:15 -0400, Ben Kietzman <ben.kietz...@rstudio.com> wrote: > Thanks for responding. > > I can certainly add VisitBuilder/VisitBuilderInline for ArrayBuilder, but > there's a slight difficulty: some types don't have a single concrete > builder class. For example, the builders of dictionary arrays are templated > on the encoded type and also on an index builder, which is either adaptive > or fixed at int32. I can make this transparent in the definition of > VisitBuilder so that one can add Visit(StringDictionaryBuilder*) and > Visit(DictionaryBuilder<Int64Type>*). Something similar is already required > for IntervalType, which may be MonthIntervalType or DayTimeIntervalType > depending on the value of IntervalType::interval_type(). > > Another difficulty is the adaptive builders. Whatever they return for > ArrayBuilder::type()/type_id()/..., it won't help to discriminate them from > the non adaptive builders. Is there any application which uses the adaptive > builders except the dictionary builders? If possible, I think it would be > simplest to make their inheritance of ArrayBuilder protected. > > Ben