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

Function IsUuidExtension

python/pyarrow/src/arrow/python/arrow_to_pandas.cc:119–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117using internal::npy_traits;
118
119bool IsUuidExtension(const DataType& type) {
120 if (type.id() != Type::EXTENSION) {
121 return false;
122 }
123 const auto& extension_type = checked_cast<const ExtensionType&>(type);
124 const auto& storage_type = *extension_type.storage_type();
125 return extension_type.extension_name() == "arrow.uuid" &&
126 storage_type.id() == Type::FIXED_SIZE_BINARY &&
127 checked_cast<const FixedSizeBinaryType&>(storage_type).byte_width() == 16;
128}
129
130template <typename T>
131struct WrapBytes {};

Callers 4

VisitMethod · 0.85
GetPandasWriterTypeFunction · 0.85
GetBlockTypeMethod · 0.85

Calls 4

storage_typeMethod · 0.80
idMethod · 0.45
extension_nameMethod · 0.45
byte_widthMethod · 0.45

Tested by

no test coverage detected