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

Function FormatToBuffer

cpp/src/arrow/scalar.cc:1085–1091  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1083// helper for StringFormatter
1084template <typename Formatter, typename ScalarType>
1085std::shared_ptr<Buffer> FormatToBuffer(Formatter&& formatter, const ScalarType& from) {
1086 if (!from.is_valid) {
1087 return Buffer::FromString("null");
1088 }
1089 return formatter(
1090 from.value, [&](std::string_view v) { return Buffer::FromString(std::string(v)); });
1091}
1092
1093// error fallback
1094template <typename To>

Callers 1

CastImplFunction · 0.85

Calls 1

FromStringFunction · 0.85

Tested by

no test coverage detected