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

Function MakeTimestampConverter

cpp/src/arrow/csv/converter.cc:658–676  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656
657template <template <typename, typename> class ConverterType>
658std::shared_ptr<Converter> MakeTimestampConverter(const std::shared_ptr<DataType>& type,
659 const ConvertOptions& options,
660 MemoryPool* pool) {
661 if (options.timestamp_parsers.size() == 0) {
662 // Default to ISO-8601
663 return std::make_shared<ConverterType<TimestampType, InlineISO8601ValueDecoder>>(
664 type, options, pool);
665 } else if (options.timestamp_parsers.size() == 1) {
666 // Single user-supplied converter
667 return std::make_shared<
668 ConverterType<TimestampType, SingleParserTimestampValueDecoder>>(type, options,
669 pool);
670 } else {
671 // Multiple converters, must iterate for each value
672 return std::make_shared<
673 ConverterType<TimestampType, MultipleParsersTimestampValueDecoder>>(type, options,
674 pool);
675 }
676}
677
678//
679// Concrete Converter factory for reals

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected