Re: [C++] Generating random Date64 & Timestamp arrays

2021-03-04 Thread Wes McKinney
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 wrote: > > > Hi Ying, > >

Re: [C++] Generating random Date64 & Timestamp arrays

2021-03-04 Thread Antoine Pitrou
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

[C++] Generating random Date64 & Timestamp arrays

2021-03-03 Thread Ying Zhou
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 d