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

Class ArrayPrinter

cpp/gdb_arrow.py:1817–1841  ·  view source on GitHub ↗

Pretty-printer for arrow::Array and subclasses.

Source from the content-addressed store, hash-verified

1815
1816
1817class ArrayPrinter:
1818 """
1819 Pretty-printer for arrow::Array and subclasses.
1820 """
1821
1822 def __init__(self, val):
1823 data = deref(val['data_'])
1824 self.data_printer = ArrayDataPrinter("arrow::ArrayData", data)
1825 self.name = array_class_from_type(self.data_printer.type_name)
1826
1827 def _format_contents(self):
1828 return self.data_printer._format_contents()
1829
1830 def to_string(self):
1831 if self.data_printer.type_class.is_parametric:
1832 ty = self.data_printer.type
1833 return f"arrow::{self.name} of type {ty}, {self._format_contents()}"
1834 else:
1835 return f"arrow::{self.name} of {self._format_contents()}"
1836
1837 def display_hint(self):
1838 return self.data_printer.display_hint()
1839
1840 def children(self):
1841 return self.data_printer.children()
1842
1843
1844class ChunkedArrayPrinter:

Callers 2

childrenMethod · 0.70
arrow_pretty_printFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected