apache / arrow

Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
https://arrow.apache.org/
Apache License 2.0
14.37k stars 3.49k forks source link

[C++] Use the random array generators from testing/random.h in the concatenation tests #38656

Open felipecrv opened 11 months ago

felipecrv commented 11 months ago

Describe the enhancement requested

Leverage the random generators that explore more of the state space arrays can be in to test concatenation instead of having simpler generators in concatenate_test.cc itself.

The concatenation tests in the Go implementation share random array generation with many other tests and I think the C++ implementation would benefit from doing the same.

Component(s)

C++

felipecrv commented 11 months ago

FYI @bkietz

felipecrv commented 11 months ago

A related issue: there are two algorithms for generating random list and list-like arrays in testing/random.cc. The two algorithms take different parameters and have different uses, but it should be possible to write a very general implementation that can accept the two parameterizations.

Context: https://github.com/apache/arrow/pull/35345/files/1cdefacff508dc48f7ded6e45cc8169d007cb29c#r1388254192

UPDATE: a separate issue for this: https://github.com/apache/arrow/issues/38748