MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / setVectorNull

Function setVectorNull

src/function/cast_from_string_functions.cpp:861–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

859}
860
861static void setVectorNull(ValueVector* vector, uint64_t vectorPos, std::string_view strVal,
862 const CSVOption* option) {
863 auto& type = vector->dataType;
864 switch (type.getLogicalTypeID()) {
865 case LogicalTypeID::STRING: {
866 if (std::any_of(option->nullStrings.begin(), option->nullStrings.end(),
867 [&](const std::string& nullStr) { return nullStr == strVal; })) {
868 vector->setNull(vectorPos, true /* isNull */);
869 return;
870 }
871 } break;
872 default: {
873 if (isNull(strVal)) {
874 vector->setNull(vectorPos, true /* isNull */);
875 return;
876 }
877 } break;
878 }
879 vector->setNull(vectorPos, false /* isNull */);
880}
881
882void CastString::copyStringToVector(ValueVector* vector, uint64_t vectorPos,
883 std::string_view strVal, const CSVOption* option) {

Callers 1

copyStringToVectorMethod · 0.85

Calls 5

getLogicalTypeIDMethod · 0.80
isNullFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
setNullMethod · 0.45

Tested by

no test coverage detected