Skip to content

Commit

Permalink
Add float family types to ValueTYpe
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 2, 2024
1 parent e935d66 commit 2c60782
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cpp/src/arrow/array/statistics.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <string_view>
#include <variant>

#include "arrow/util/float16.h"
#include "arrow/util/visibility.h"

namespace arrow {
Expand All @@ -35,7 +36,7 @@ namespace arrow {
struct ARROW_EXPORT ArrayStatistics {
using ValueType =
std::variant<bool, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t,
uint64_t, std::string, std::string_view>;
uint64_t, util::Float16, float, double, std::string, std::string_view>;

ArrayStatistics() = default;
~ArrayStatistics() = default;
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/array/statistics_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ TEST(ArrayStatisticsTest, TestEquality) {
statistics2.is_min_exact = false;
ASSERT_EQ(statistics1, statistics2);

statistics1.max = static_cast<int64_t>(-255);
statistics1.max = arrow::util::Float16(-29);
ASSERT_NE(statistics1, statistics2);
statistics2.max = static_cast<int64_t>(-255);
statistics2.max = arrow::util::Float16(-29);
ASSERT_EQ(statistics1, statistics2);

statistics1.is_max_exact = true;
Expand Down

0 comments on commit 2c60782

Please sign in to comment.