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

Function startListCast

src/function/cast_from_string_functions.cpp:365–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363
364template<typename T>
365static inline void startListCast(const char* input, uint64_t len, T split, const CSVOption* option,
366 ValueVector* vector) {
367 auto validList = option->allowUnbracedList ?
368 splitPossibleUnbracedList(std::string_view(input, len), split, option) :
369 splitCStringList(input, len, split, option);
370 if (!validList) {
371 throw ConversionException("Cast failed. " + std::string{input, (size_t)len} +
372 " is not in " + vector->dataType.toString() + " range.");
373 }
374}
375
376// ---------------------- cast String to Array Helper ------------------------------ //
377static void validateNumElementsInArray(uint64_t numElementsRead, const LogicalType& type) {

Callers 1

castMethod · 0.85

Calls 3

splitCStringListFunction · 0.85
toStringMethod · 0.45

Tested by

no test coverage detected