Skip to content

Commit

Permalink
ARROW-7992: [C++] Fix MSVC warning (#6525)
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Mar 3, 2020
1 parent b4acb0b commit de786b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/src/arrow/compute/kernels/sort_to_indices.cc
Expand Up @@ -210,9 +210,9 @@ class CountOrCompareSorter {
c_type max{std::numeric_limits<c_type>::min()};
};

ArrayDataVisitor<ArrowType> visitor;
MinMaxScanner minmax_scanner;
ARROW_CHECK_OK(visitor.Visit(*values.data(), &minmax_scanner));
ARROW_CHECK_OK(
ArrayDataVisitor<ArrowType>().Visit(*values.data(), &minmax_scanner));

// For signed int32/64, (max - min) may overflow and trigger UBSAN.
// Cast to largest unsigned type(uint64_t) before substraction.
Expand Down

0 comments on commit de786b7

Please sign in to comment.