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

Class MetadataPtr

cpp/gdb_arrow.py:840–856  ·  view source on GitHub ↗

A shared_ptr value, possibly null.

Source from the content-addressed store, hash-verified

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

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected