| 1416 | |
| 1417 | template <typename Stats, typename Values> |
| 1418 | void CheckMinMaxZeroesSign(Stats stats, const Values& values) { |
| 1419 | stats->Update(values.data(), values.size(), /*null_count=*/0); |
| 1420 | ASSERT_TRUE(stats->HasMinMax()); |
| 1421 | |
| 1422 | this->CheckEq(stats->min(), positive_zero_); |
| 1423 | ASSERT_TRUE(this->signbit(stats->min())); |
| 1424 | ASSERT_EQ(stats->EncodeMin(), EncodeValue(negative_zero_)); |
| 1425 | |
| 1426 | this->CheckEq(stats->max(), positive_zero_); |
| 1427 | ASSERT_FALSE(this->signbit(stats->max())); |
| 1428 | ASSERT_EQ(stats->EncodeMax(), EncodeValue(positive_zero_)); |
| 1429 | } |
| 1430 | |
| 1431 | // ARROW-5562: Ensure that -0.0f and 0.0f values are properly handled like in |
| 1432 | // parquet-mr |