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

Function TEST

cpp/src/arrow/compute/kernel_test.cc:37–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35// TypeMatcher
36
37TEST(TypeMatcher, SameTypeId) {
38 std::shared_ptr<TypeMatcher> matcher = match::SameTypeId(Type::DECIMAL);
39 ASSERT_TRUE(matcher->Matches(*decimal128(20, 2)));
40 ASSERT_FALSE(matcher->Matches(*int8()));
41
42 ASSERT_EQ("Type::DECIMAL128", matcher->ToString());
43
44 ASSERT_TRUE(matcher->Equals(*matcher));
45 ASSERT_TRUE(matcher->Equals(*match::SameTypeId(Type::DECIMAL)));
46 ASSERT_FALSE(matcher->Equals(*match::SameTypeId(Type::TIMESTAMP)));
47}
48
49TEST(TypeMatcher, TimestampTypeUnit) {
50 auto matcher = match::TimestampTypeUnit(TimeUnit::MILLI);

Callers

nothing calls this directly

Calls 15

SameTypeIdFunction · 0.85
TimestampTypeUnitFunction · 0.85
Time32TypeUnitFunction · 0.85
RunEndIntegerFunction · 0.85
run_end_encodedFunction · 0.85
InputTypeFunction · 0.85
listFunction · 0.85
key_value_metadataFunction · 0.85
MakeArrayOfNullFunction · 0.85
DecimalsHaveSameScaleFunction · 0.85
decimal256Function · 0.85
MatchesInputsMethod · 0.80

Tested by

no test coverage detected