Skip to content

Commit 0d01bb3

Browse files
committed
Fix unit test on MSVC for small integer types
1 parent d57f7aa commit 0d01bb3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cpp/src/arrow/compute/kernels/aggregate-test.cc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,9 @@ TYPED_TEST(TestSumKernelNumeric, SimpleSum) {
133133
ValidateSum<TypeParam>(&this->ctx_, "[0, 1, 2, 3, 4, 5]",
134134
Datum(std::make_shared<ScalarType>(static_cast<T>(5 * 6 / 2))));
135135

136-
// Avoid this tests for (U)Int8Type
137-
if (sizeof(T) > 1) {
138-
ValidateSum<TypeParam>(&this->ctx_, "[1000, null, 300, null, 30, null, 7]",
139-
Datum(std::make_shared<ScalarType>(static_cast<T>(1337))));
140-
}
136+
const T expected_result = static_cast<T>(14);
137+
ValidateSum<TypeParam>(&this->ctx_, "[1, null, 3, null, 3, null, 7]",
138+
Datum(std::make_shared<ScalarType>(expected_result)));
141139
}
142140

143141
template <typename ArrowType>

0 commit comments

Comments
 (0)