HyukjinKwon commented on code in PR #48724:
URL: https://github.com/apache/arrow/pull/48724#discussion_r2666775763
##########
cpp/src/arrow/compute/kernels/vector_selection_test.cc:
##########
@@ -513,11 +552,13 @@ TYPED_TEST(TestFilterKernelWithNumeric,
CompareScalarAndFilterRandomNumeric) {
using CType = typename TypeTraits<TypeParam>::CType;
auto rand = random::RandomArrayGenerator(kRandomSeed);
+ std::default_random_engine gen(kRandomSeed);
+ ::arrow::random::uniform_real_distribution<double> null_dist(0.0, 1.0);
for (size_t i = 3; i < 10; i++) {
const int64_t length = static_cast<int64_t>(1ULL << i);
- // TODO(bkietz) rewrite with some nulls
- auto array =
- checked_pointer_cast<ArrayType>(rand.Numeric<TypeParam>(length, 0,
100, 0));
+ double null_probability = null_dist(gen);
Review Comment:
Yeah I think that'd be simpler. Let me follow your suggestion
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]