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

Function test_record_batch

python/pyarrow/tests/test_gdb.py:1107–1124  ·  view source on GitHub ↗
(gdb_arrow)

Source from the content-addressed store, hash-verified

1105
1106
1107def test_record_batch(gdb_arrow):
1108 expected_prefix = 'arrow::RecordBatch with 2 columns, 3 rows'
1109 expected_suffix = (
1110 '{["ints"] = arrow::ArrayData of type arrow::int32(), '
1111 'length 3, offset 0, null count 0 = '
1112 '{[0] = 1, [1] = 2, [2] = 3}, '
1113 '["strs"] = arrow::ArrayData of type arrow::utf8(), '
1114 'length 3, offset 0, null count 1 = '
1115 '{[0] = "abc", [1] = null, [2] = "def"}}')
1116
1117 expected = f"{expected_prefix} = {expected_suffix}"
1118 # Representations may differ between those two because of
1119 # RecordBatch (base class) vs. SimpleRecordBatch (concrete class).
1120 check_heap_repr(gdb_arrow, "batch", expected)
1121 check_heap_repr(gdb_arrow, "batch.get()", expected)
1122
1123 expected = f"{expected_prefix}, 3 metadata items = {expected_suffix}"
1124 check_heap_repr(gdb_arrow, "batch_with_metadata", expected)
1125
1126
1127def test_table(gdb_arrow):

Callers

nothing calls this directly

Calls 1

check_heap_reprFunction · 0.85

Tested by

no test coverage detected