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

Class ArrayPrinter

cpp/gdb_arrow.py:1834–1858  ·  view source on GitHub ↗

Pretty-printer for arrow::Array and subclasses.

Source from the content-addressed store, hash-verified

1832
1833
1834class ArrayPrinter:
1835 """
1836 Pretty-printer for arrow::Array and subclasses.
1837 """
1838
1839 def __init__(self, val):
1840 data = deref(val['data_'])
1841 self.data_printer = ArrayDataPrinter("arrow::ArrayData", data)
1842 self.name = array_class_from_type(self.data_printer.type_name)
1843
1844 def _format_contents(self):
1845 return self.data_printer._format_contents()
1846
1847 def to_string(self):
1848 if self.data_printer.type_class.is_parametric:
1849 ty = self.data_printer.type
1850 return f"arrow::{self.name} of type {ty}, {self._format_contents()}"
1851 else:
1852 return f"arrow::{self.name} of {self._format_contents()}"
1853
1854 def display_hint(self):
1855 return self.data_printer.display_hint()
1856
1857 def children(self):
1858 return self.data_printer.children()
1859
1860
1861class ChunkedArrayPrinter:

Callers 2

childrenMethod · 0.70
arrow_pretty_printFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected