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

Function DowncastMetadataSize

cpp/src/arrow/c/bridge.cc:138–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136
137template <typename SizeType>
138Result<int32_t> DowncastMetadataSize(SizeType size) {
139 auto res = static_cast<int32_t>(size);
140 if (res < 0 || static_cast<SizeType>(res) != size) {
141 return Status::Invalid("Metadata too large (more than 2**31 items or bytes)");
142 }
143 return res;
144}
145
146Result<std::string> EncodeMetadata(const KeyValueMetadata& metadata) {
147 ARROW_ASSIGN_OR_RAISE(auto npairs, DowncastMetadataSize(metadata.size()));

Callers

nothing calls this directly

Calls 1

InvalidFunction · 0.50

Tested by

no test coverage detected