diff --git a/cpp/src/arrow/array/statistics.h b/cpp/src/arrow/array/statistics.h index ab9069e3a742e..7357e27f41f5b 100644 --- a/cpp/src/arrow/array/statistics.h +++ b/cpp/src/arrow/array/statistics.h @@ -23,6 +23,7 @@ #include #include +#include "arrow/util/float16.h" #include "arrow/util/visibility.h" namespace arrow { @@ -35,7 +36,7 @@ namespace arrow { struct ARROW_EXPORT ArrayStatistics { using ValueType = std::variant; + uint64_t, util::Float16, float, double, std::string, std::string_view>; ArrayStatistics() = default; ~ArrayStatistics() = default; diff --git a/cpp/src/arrow/array/statistics_test.cc b/cpp/src/arrow/array/statistics_test.cc index 33f99266e373b..a465ac0bc2e0d 100644 --- a/cpp/src/arrow/array/statistics_test.cc +++ b/cpp/src/arrow/array/statistics_test.cc @@ -89,9 +89,9 @@ TEST(ArrayStatisticsTest, TestEquality) { statistics2.is_min_exact = false; ASSERT_EQ(statistics1, statistics2); - statistics1.max = static_cast(-255); + statistics1.max = arrow::util::Float16(-29); ASSERT_NE(statistics1, statistics2); - statistics2.max = static_cast(-255); + statistics2.max = arrow::util::Float16(-29); ASSERT_EQ(statistics1, statistics2); statistics1.is_max_exact = true;