MCPcopy Create free account
hub / github.com/bytedance/bolt / checkVectorFlagsClearedTyped

Function checkVectorFlagsClearedTyped

bolt/vector/tests/VectorTestUtils.cpp:61–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60template <TypeKind kind>
61void checkVectorFlagsClearedTyped(
62 const BaseVector& vector,
63 const SelectivityVector& asciiClearedRows,
64 const SelectivityVector& asciiRemainRows) {
65 using T = typename TypeTraits<kind>::NativeType;
66 auto* simpleVector = vector.as<SimpleVector<T>>();
67
68 checkBaseVectorFlagsCleared(vector);
69 EXPECT_FALSE(simpleVector->getStats().min.has_value());
70 EXPECT_FALSE(simpleVector->getStats().max.has_value());
71 EXPECT_FALSE(simpleVector->isSorted().has_value());
72 if constexpr (std::is_same_v<T, StringView>) {
73 asciiClearedRows.applyToSelected([&](auto row) {
74 EXPECT_FALSE(simpleVector->isAscii(row).has_value());
75 });
76 asciiRemainRows.applyToSelected([&](auto row) {
77 EXPECT_TRUE(
78 simpleVector->isNullAt(row) ||
79 simpleVector->isAscii(row).has_value());
80 });
81 }
82}
83
84template <>
85void checkVectorFlagsClearedTyped<TypeKind::MAP>(

Callers

nothing calls this directly

Calls 7

has_valueMethod · 0.80
applyToSelectedMethod · 0.80
isAsciiMethod · 0.80
getStatsMethod · 0.45
isSortedMethod · 0.45
isNullAtMethod · 0.45

Tested by

no test coverage detected