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

Function test_record_batch

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

Source from the content-addressed store, hash-verified

1026
1027
1028def test_record_batch(gdb_arrow):
1029 expected_prefix = 'arrow::RecordBatch with 2 columns, 3 rows'
1030 expected_suffix = (
1031 '{["ints"] = arrow::ArrayData of type arrow::int32(), '
1032 'length 3, offset 0, null count 0 = '
1033 '{[0] = 1, [1] = 2, [2] = 3}, '
1034 '["strs"] = arrow::ArrayData of type arrow::utf8(), '
1035 'length 3, offset 0, null count 1 = '
1036 '{[0] = "abc", [1] = null, [2] = "def"}}')
1037
1038 expected = f"{expected_prefix} = {expected_suffix}"
1039 # Representations may differ between those two because of
1040 # RecordBatch (base class) vs. SimpleRecordBatch (concrete class).
1041 check_heap_repr(gdb_arrow, "batch", expected)
1042 check_heap_repr(gdb_arrow, "batch.get()", expected)
1043
1044 expected = f"{expected_prefix}, 3 metadata items = {expected_suffix}"
1045 check_heap_repr(gdb_arrow, "batch_with_metadata", expected)
1046
1047
1048def test_table(gdb_arrow):

Callers

nothing calls this directly

Calls 1

check_heap_reprFunction · 0.85

Tested by

no test coverage detected