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

Class MetadataPtr

cpp/gdb_arrow.py:842–858  ·  view source on GitHub ↗

A shared_ptr value, possibly null.

Source from the content-addressed store, hash-verified

840
841
842class MetadataPtr(Sequence):
843 """
844 A shared_ptr<arrow::KeyValueMetadata> value, possibly null.
845 """
846
847 def __init__(self, val):
848 self.ptr = SharedPtr(val).get()
849 self.is_null = int(self.ptr) == 0
850 self.md = None if self.is_null else Metadata(self.ptr.dereference())
851
852 def __len__(self):
853 return 0 if self.is_null else len(self.md)
854
855 def __getitem__(self, i):
856 if self.is_null:
857 raise IndexError
858 return self.md[i]
859
860
861DecimalTraits = namedtuple(

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected