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

Method to_string

cpp/gdb_arrow.py:1393–1402  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1391 return decimal_type_to_class[self.type_name]
1392
1393 def to_string(self):
1394 ty = self.type
1395 precision = int(ty['precision_'])
1396 scale = int(ty['scale_'])
1397 suffix = f"[precision={precision}, scale={scale}]"
1398 if not self.is_valid:
1399 return f"{self._format_type()} of null value {suffix}"
1400 value = self.decimal_class.from_value(self.val['value']
1401 ).format(precision, scale)
1402 return f"{self._format_type()} of value {value} {suffix}"
1403
1404
1405class BaseBinaryScalarPrinter(ScalarPrinter):

Callers

nothing calls this directly

Calls 3

from_valueMethod · 0.80
_format_typeMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected