| 859 | } |
| 860 | |
| 861 | static 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 | |
| 882 | void CastString::copyStringToVector(ValueVector* vector, uint64_t vectorPos, |
| 883 | std::string_view strVal, const CSVOption* option) { |
no test coverage detected