Agreed, though keep in mind that rather than "some form of
reinterpretation at ArrayData level", you can use the Array::View
function, so it would look something like

auto ty = date64();
auto arr = *rag.Int64(...)->View(ty);

On Thu, Mar 4, 2021 at 3:47 AM Antoine Pitrou <anto...@python.org> wrote:
>
>
> Hi Ying,
>
> Yes, this approach sounds reasonable.  It would be useful at some point
> to add random date/timestamp generation to RandomArrayGenerator, though.
>
> Regards
>
> Antoine.
>
>
> Le 04/03/2021 à 04:36, Ying Zhou a écrit :
> > Hi,
> >
> > I’d like to generate random Date64 & Timestamp arrays with artificial max 
> > and mins. RandomArrayGenerator::ArrayOf in arrow/testing/random.h does not 
> > help. Currently the approach I’d like to take is using 
> > RandomArrayGenerator::Int64 to generate a random int64 array and then 
> > convert it to a date64/timestamp array through some form of 
> > reinterpretation at ArrayData level. Does that work? If so is it the best 
> > approach? Thanks!
> >
> > Ying
> >

Reply via email to