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

Function test_arrays_heap

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

Source from the content-addressed store, hash-verified

831
832
833def test_arrays_heap(gdb_arrow):
834 # Null
835 check_heap_repr(
836 gdb_arrow, "heap_null_array",
837 "arrow::NullArray of length 2, offset 0, null count 2")
838
839 # Primitive
840 check_heap_repr(
841 gdb_arrow, "heap_int32_array",
842 ("arrow::Int32Array of length 4, offset 0, null count 1 = {"
843 "[0] = -5, [1] = 6, [2] = null, [3] = 42}"))
844 check_heap_repr(
845 gdb_arrow, "heap_int32_array_no_nulls",
846 ("arrow::Int32Array of length 4, offset 0, null count 0 = {"
847 "[0] = -5, [1] = 6, [2] = 3, [3] = 42}"))
848 check_heap_repr(
849 gdb_arrow, "heap_int32_array_sliced_1_9",
850 ("arrow::Int32Array of length 9, offset 1, unknown null count = {"
851 "[0] = 2, [1] = -3, [2] = 4, [3] = null, [4] = -5, [5] = 6, "
852 "[6] = -7, [7] = 8, [8] = null}"))
853 check_heap_repr(
854 gdb_arrow, "heap_int32_array_sliced_2_6",
855 ("arrow::Int32Array of length 6, offset 2, unknown null count = {"
856 "[0] = -3, [1] = 4, [2] = null, [3] = -5, [4] = 6, [5] = -7}"))
857 check_heap_repr(
858 gdb_arrow, "heap_int32_array_sliced_8_4",
859 ("arrow::Int32Array of length 4, offset 8, unknown null count = {"
860 "[0] = 8, [1] = null, [2] = -9, [3] = -10}"))
861 check_heap_repr(
862 gdb_arrow, "heap_int32_array_sliced_empty",
863 "arrow::Int32Array of length 0, offset 6, unknown null count")
864
865 check_heap_repr(
866 gdb_arrow, "heap_double_array",
867 ("arrow::DoubleArray of length 2, offset 0, null count 1 = {"
868 "[0] = -1.5, [1] = null}"))
869 check_heap_repr(
870 gdb_arrow, "heap_float16_array",
871 ("arrow::HalfFloatArray of length 2, offset 0, null count 0 = {"
872 "[0] = 0.0, [1] = -1.5}"))
873
874 # Boolean
875 check_heap_repr(
876 gdb_arrow, "heap_bool_array",
877 ("arrow::BooleanArray of length 18, offset 0, null count 6 = {"
878 "[0] = false, [1] = false, [2] = true, [3] = true, [4] = null, "
879 "[5] = null, [6] = false, [7] = false, [8] = true, [9] = true, "
880 "[10] = null, [11] = null, [12] = false, [13] = false, "
881 "[14] = true, [15] = true, [16] = null, [17] = null}"))
882 check_heap_repr(
883 gdb_arrow, "heap_bool_array_sliced_1_9",
884 ("arrow::BooleanArray of length 9, offset 1, unknown null count = {"
885 "[0] = false, [1] = true, [2] = true, [3] = null, [4] = null, "
886 "[5] = false, [6] = false, [7] = true, [8] = true}"))
887 check_heap_repr(
888 gdb_arrow, "heap_bool_array_sliced_2_6",
889 ("arrow::BooleanArray of length 6, offset 2, unknown null count = {"
890 "[0] = true, [1] = true, [2] = null, [3] = null, [4] = false, "

Callers

nothing calls this directly

Calls 1

check_heap_reprFunction · 0.85

Tested by

no test coverage detected