MCPcopy Create free account
hub / github.com/apache/arrow / TEST

Function TEST

cpp/src/arrow/compute/kernels/scalar_validity_test.cc:152–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152TEST(TestValidityKernels, IsFinite) {
153 for (const auto& ty : IntTypes()) {
154 CheckScalar("is_finite", {ArrayFromJSON(ty, "[0, 1, 42, null]")},
155 ArrayFromJSON(boolean(), "[true, true, true, null]"));
156 }
157 for (const auto& ty : {decimal128(4, 2), decimal256(4, 2)}) {
158 CheckScalar("is_finite", {ArrayFromJSON(ty, R"(["0.00", "1.01", "-42.00", null])")},
159 ArrayFromJSON(boolean(), "[true, true, true, null]"));
160 }
161 CheckScalar("is_finite", {std::make_shared<NullArray>(4)},
162 ArrayFromJSON(boolean(), "[null, null, null, null]"));
163 CheckScalar("is_finite",
164 {ArrayFromJSON(duration(TimeUnit::SECOND), "[0, 1, 42, null]")},
165 ArrayFromJSON(boolean(), "[true, true, true, null]"));
166}
167
168TEST(TestValidityKernels, IsInf) {
169 for (const auto& ty : IntTypes()) {

Callers

nothing calls this directly

Calls 10

CheckScalarFunction · 0.85
ArrayFromJSONFunction · 0.85
decimal256Function · 0.85
CheckScalarUnaryFunction · 0.85
DictArrayFromJSONFunction · 0.85
decimal128Function · 0.50
durationFunction · 0.50
dictionaryFunction · 0.50
arrayMethod · 0.45
ToStringMethod · 0.45

Tested by

no test coverage detected