+
    nDj                        ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt	]P                  P                  t]P                  P                  ]P                  P                  ]4      4      t]P$                  P'                  R4      ;'       g    ]P                  P)                  ]R4      tRR.tR t]! 4       R 4       t]! 4       R	 4       tR
 tR t ! R R4      t]P:                  ! RR7      R 4       t]P:                  ! RR7      R 4       tR tR t R t!R t"R t#R t$R t%R t&R t'R t(R t)R t*R t+R t,R  t-R! t.R" t/R# t0R$ t1R% t2R& t3R' t4R( t5R# ))    )	lru_cacheNARROW_GDB_SCRIPTz../../../cpp/gdb_arrow.pygdbz--nxc                  t    / p R F  p \         P                  V,          W&   K  	  V #   \         d     K1  i ; i)PATH)r   LD_LIBRARY_PATH)osenvironKeyError)envvars     P/data/cameron/venvs/s3viz/lib/python3.14/site-packages/pyarrow/tests/test_gdb.pyenvironment_for_gdbr   *   s@    
C*	zz#CH +
 J  		s   (77c            	           \         P                  ! \        R .,           \        4       ^ \         P                  \         P                  \         P
                  R7      p T P                  ^ 8H  #   \         d     R# i ; i)z	--version)r   bufsizestdinstdoutstderrF)
subprocessrungdb_commandr   PIPESTDOUTFileNotFoundError
returncode)procs    r   is_gdb_availabler   4   sd    	 ~~k[M9"5"7$.OO%/__%/%6%6	8 ??a  s   AA+ +A:9A:c                  H    \         P                  ! R 4      p V f   Q R4       hV # )python3z Couldn't find python3 executable)shutilwhich)paths    r   python_executabler#   C   s'    <<	"D???K    c                  V    \        4       '       g   \        P                  ! R 4       R# R# )zgdb command unavailableN)r   pytestskip r$   r   skip_if_gdb_unavailabler)   J   s    -. r$   c                      \         P                  P                  \        4      '       g   \        P
                  ! R 4       R# R# )zgdb script not foundN)r	   r"   exists
gdb_scriptr&   r'   r(   r$   r   skip_if_gdb_script_unavailabler-   O   s'    77>>*%%*+ &r$   c                   X   a  ] tR t^Tt o RtRtR tR tR tR t	R t
R tR	 tR
 tRtV tR# )
GdbSessionNTc                    \        4       pVP                  V4       \        P                  ! \        \        V4      ,           V^ \        P                  \        P                  R7      V n        . V n        RV n	        R# )r   )r   r   r   r   r$   N)
r   updater   Popenr   listr   r   last_stdoutlast_stdout_line)selfargsr   gdb_envs   &*, r   __init__GdbSession.__init__X   sX    %'s$$[4:%=)0!+5??,6OO=	  #r$   c                r   V P                   P                  R4      '       Eg6   V P                  P                  4       Ef   V P                  P                  P                  R4      pV P                  '       dR   \        P                  P                  P                  V4       \        P                  P                  P                  4        VP                  R4      w  rpV'       dP   V P                  P                  V P                   4       V P                  P                  W,           4       W0n         EK2  VR8X  g   Q hV ;P                   V,          un         EKW  V P                  P                  4       e   \        R4      hRP                  V P                  4      P!                  R4      p. V n        RV n         V# )zG
Record output until the gdb prompt displays.  Return recorded output.
s   (gdb) i      
r$   z#gdb session terminated unexpectedlyutf-8)r5   
startswithr   pollr   readverbosesysbufferwriteflush
rpartitionr4   appendIOErrorjoindecode)r6   blocksep	last_lineouts   &    r   wait_until_readyGdbSession.wait_until_readyc   s<   
 ((33I>>yy~~'II$$))$/E|||

!!''.

!!'')$)$4$4U$;!E	  ''(=(=>  ''4(1%|#|%%2%%99>>'?@@hht''(//8 #
r$   c                   VP                  R 4      R,           pV P                  '       dR   \        P                  P                  P                  V4       \        P                  P                  P                  4        V P                  P                  P                  V4       V P                  P                  P                  4        R# )r=   r<   N)	encoderA   rB   r   rC   rD   rE   r   r   r6   lines   &&r   issue_commandGdbSession.issue_command   sv    {{7#e+<<<JJ##D)JJ##%		d#		r$   c                D    V P                  V4       V P                  4       # N)rU   rO   rS   s   &&r   run_commandGdbSession.run_command   s    4 $$&&r$   c                    V P                  RV 24      p\        P                  ! RRV4      w  r#V^8X  g   Q V4       hVP                  4       # )zD
Ask gdb to print the value of an expression and return the result.
zp z	^\$\d+ =  )rY   resubnstrip)r6   exprrN   ns   &&  r   print_valueGdbSession.print_value   sK     D6{+r3/Avsvyy{r$   c                :   V P                  R4      pR\        P                  ! V4      ,           R,           p\        P                  ! W24      pVf   \        P
                  ! RV 24       \        V^,          4      pV P                  RV 24      pRV 2V9   g   Q hR# )z:
Select the innermost frame with the given function name.
z
info stackz(?mi)^#(\d+)\s+.* in z\bNz$Could not select frame for function zframe zin )rY   r]   escapesearchr&   failint)r6   	func_namerN   patm	frame_nums   &&    r   select_frameGdbSession.select_frame   s     |,&9)==EIIc9KK>ykJK!I		{34YK C'''r$   c                ,   V P                   e   V P                   P                  P                  4        V P                   P                  P                  4        V P                   P	                  4        V P                   P                  4        R V n         R # R # rX   )r   r   closer   killwaitr6   s   &r   rI   GdbSession.join   s^    99 IIOO!!#II""$IINNIINNDI !r$   c                &    V P                  4        R # rX   )rI   rs   s   &r   __del__GdbSession.__del__   s    		r$   )r4   r5   r   )__name__
__module____qualname____firstlineno__r   rA   r9   rO   rU   rY   rb   rm   rI   rv   __static_attributes____classdictcell__)__classdict__s   @r   r/   r/   T   s<     DG	$8 '(" r$   r/   session)scopec               #   F  "   \        4        \        R \        4       4      p  V P                  4        V P	                  R4       V P	                  R4       V P	                  R4       V P	                  R4       V x  V P                  4        R#   T P                  4        i ; i5i)z-qzset confirm offzset print array-indexes onzset width unlimitedzset charset UTF-8N)r)   r/   r#   rO   rY   rI   )r   s    r   r   r      sw     
T,.
/C	)*45-.+,	

s   B!AB :B!BB!c                 Z   R \         P                  P                  P                  9  d   \        P
                  ! R4       \         P                  P                  R8w  d   \        P
                  ! R4       \        4        V P                  R\         24       \        P                  R8X  d   RMRp\        P                  P                  V4      pV'       d   V P                  RV R	V 24       R
pV P                  RV R24      pRV9   g   RV9   g   Q V4       hV P                  R4       V # )debz%Arrow C++ debug symbols not availabledebugz#PyArrow C++ not built in debug modezsource win32r   r   zset env  z>from pyarrow.lib import _gdb_test_session; _gdb_test_session()zrun -c ''zTrace/breakpoint trapzreceived signalzarrow::gdb::TestSession)pa
build_infocpp_build_info
build_typer&   r'   r-   rY   r,   rB   platformr	   r
   getrm   )r   lib_path_varlib_pathcoderN   s   &    r   	gdb_arrowr      s    BMM00;;;;<	}}7*9:"$OOgj\*+ \\W46:KLzz~~l+H 	(<.(<=KD
//HTF!,
-C#s*$+'*+ %./Jr$   c                 d    V P                  R 4      pVP                  R4      '       g   Q V4       hR# )zshow versionz	GNU gdb (N)rY   r>   )r   rN   s   & r   test_gdb_sessionr      s*    
//.
)C>>+&&++&r$   c                 :    V P                  R 4      pVR8X  g   Q hR# )z42 + 143N)rb   )r   ss   & r   test_gdb_arrowr      s    h'A99r$   c                    V P                  V4      p\        V\        P                  4      '       d!   VP	                  V4      '       g   Q V4       hR# W28X  g   Q hR# )z'
Check printing a stack-located value.
N)rb   
isinstancer]   Patternmatchr   r`   expectedr   s   &&& r   check_stack_reprr      sG     	A(BJJ''~~a  #!# }}r$   c                v    V P                  RV 24      pW28w  d   VP                  RV 24      '       g   Q hR# R# )z9
Check printing a heap-located value, given its address.
*r   N)rb   endswithr   s   &&& r   check_heap_reprr      s=     	!D6
#A}zzAhZ.)))) r$   c                     \        V R R4       \        V RR4       \        V RR4       \        V RR4       \        V RR	4       \        V R
R4       R# )	ok_statuszarrow::Status::OK()error_statusz*arrow::Status::IOError("This is an error")error_detail_statuszXarrow::Status::IOError("This is an error", detail=[custom-detail-id] "This is a detail")	ok_resultzarrow::Result<int>(42)error_resultz>arrow::Result<int>(arrow::Status::IOError("This is an error"))error_detail_resultzlarrow::Result<int>(arrow::Status::IOError("This is an error", detail=[custom-detail-id] "This is a detail"))Nr   r   s   &r   test_statusr      sg    Y-BCYAC(	89
 Y-EF>HJ (	9:r$   c                 n    \        V R R4       \        V RR4       \        V RR4       \        V RR4       R# )	buffer_nullz"arrow::Buffer of size 0, read-only
buffer_abc)arrow::Buffer of size 3, read-only, "abc"buffer_special_charsz=arrow::Buffer of size 12, read-only, "foo\"bar\000\r\n\t\037"buffer_mutablez.arrow::MutableBuffer of size 3, mutable, "abc"Nr   r   s   &r   test_buffer_stackr     sF    Y9;Y@B)HJ Y 0EGr$   c                 :    \        V R R4       \        V RR4       R# )heap_bufferr   zheap_buffer_mutable.get()z'arrow::Buffer of size 3, mutable, "abc"Nr   r   s   &r   test_buffer_heapr     s"    I}?AI:=?r$   c                    R p\        V RR4       \        V RRV R24       \        V RRV R24       \        V RR	4       \        V R
RV R24       \        V RRV R24       Rp\        V RR4       \        V RRV R24       \        V RRV R24       \        V RR4       \        V RRV R24       \        V RRV R24       R# )&98765432109876543210987654321098765432decimal128_zerozarrow::Decimal128(0)decimal128_poszarrow::Decimal128()decimal128_negzarrow::Decimal128(-basic_decimal128_zerozarrow::BasicDecimal128(0)basic_decimal128_poszarrow::BasicDecimal128(basic_decimal128_negzarrow::BasicDecimal128(-L9876543210987654321098765432109876543210987654321098765432109876543210987654decimal256_zerozarrow::Decimal256(0)decimal256_poszarrow::Decimal256(decimal256_negzarrow::Decimal256(-basic_decimal256_zerozarrow::BasicDecimal256(0)basic_decimal256_poszarrow::BasicDecimal256(basic_decimal256_negzarrow::BasicDecimal256(-Nr   )r   v128v256s   &  r   test_decimalsr      s   3DY 13IJY 0)$q13Y 0*4&24Y 702Y 6.tfA68Y 6/vQ793DY 13IJY 0)$q13Y 0*4&24Y 702Y 6.tfA68Y 6/vQ79r$   c                 :    \        V R R4       \        V RR4       R# )zempty_metadata.get()z!arrow::KeyValueMetadata of size 0zmetadata.get()zcarrow::KeyValueMetadata of size 2 = {["key_text"] = "some value", ["key_binary"] = "z\000\037\377"}Nr   r   s   &r   test_metadatar   =  s'    I579#
MOr$   c                    \        V R R4       \        V RR4       \        V RR4       \        V RR4       \        V RR	4       \        V R
R4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V R R!4       \        V R"R#4       \        V R$R%4       \        V R&R'4       \        V R(R)4       \        V R*R+4       \        V R,R-4       \        V R.R/4       \        V R0R14       \        V R2R34       \        V R4R54       \        V R6R74       \        V R8R94       \        V R:R;4       \        V R<R=4       \        V R>R?4       \        V R@RA4       \        V RBRC4       \        V RDRE4       \        V RFRG4       RH# )I	null_typearrow::null()	bool_typearrow::boolean()date32_typezarrow::date32()date64_typezarrow::date64()time_type_sz&arrow::time32(arrow::TimeUnit::SECOND)time_type_msz%arrow::time32(arrow::TimeUnit::MILLI)time_type_usz%arrow::time64(arrow::TimeUnit::MICRO)time_type_ns$arrow::time64(arrow::TimeUnit::NANO)timestamp_type_sz)arrow::timestamp(arrow::TimeUnit::SECOND)timestamp_type_ms_timezonez8arrow::timestamp(arrow::TimeUnit::MILLI, "Europe/Paris")timestamp_type_usz(arrow::timestamp(arrow::TimeUnit::MICRO)timestamp_type_ns_timezone7arrow::timestamp(arrow::TimeUnit::NANO, "Europe/Paris")day_time_interval_typezarrow::day_time_interval()month_interval_typezarrow::month_interval()month_day_nano_interval_typez arrow::month_day_nano_interval()duration_type_sz(arrow::duration(arrow::TimeUnit::SECOND)duration_type_nsz&arrow::duration(arrow::TimeUnit::NANO)decimal128_typearrow::decimal128(16, 5)decimal256_typezarrow::decimal256(42, 12)binary_typezarrow::binary()string_typezarrow::utf8()large_binary_typezarrow::large_binary()large_string_typezarrow::large_utf8()fixed_size_binary_typezarrow::fixed_size_binary(10)	list_typearrow::list(arrow::uint8())large_list_type&arrow::large_list(arrow::large_utf8())fixed_size_list_type+arrow::fixed_size_list(arrow::float64(), 3)map_type_unsorted=arrow::map(arrow::utf8(), arrow::binary(), keys_sorted=false)map_type_sortedz<arrow::map(arrow::utf8(), arrow::binary(), keys_sorted=true)struct_type_emptyzarrow::struct_({})struct_typejarrow::struct_({arrow::field("ints", arrow::int8()), arrow::field("strs", arrow::utf8(), nullable=false)})sparse_union_typezarrow::sparse_union(fields={arrow::field("ints", arrow::int8()), arrow::field("strs", arrow::utf8(), nullable=false)}, type_codes={7, 42})dense_union_typezarrow::dense_union(fields={arrow::field("ints", arrow::int8()), arrow::field("strs", arrow::utf8(), nullable=false)}, type_codes={7, 42})dict_type_unordered?arrow::dictionary(arrow::int16(), arrow::utf8(), ordered=false)dict_type_orderedz>arrow::dictionary(arrow::int16(), arrow::utf8(), ordered=true)	uuid_type[arrow::ExtensionType "extension<arrow.uuid>" with storage type arrow::fixed_size_binary(16)Nr   r   s   &r   test_types_stackr   F  sY   Y_=Y-?@Y/@AY/@AY=?Y<>Y<>Y;=Y 2@B/BD Y 3?A/AC Y 813Y 5.0Y >79Y 1?AY 2=? Y 1/1Y 102 Y/@AY?Y 35LMY 35JKY 835 Y24Y 1=?Y 6BD&GI $FH Y 3)+=
AC
 &
!
 %
! (IK &HJ ;
:<r$   c                 >   \        V R R4       \        V RR4       \        V RR4       \        V RR4       \        V RR	4       \        V R
R4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       R# )heap_null_typer   heap_bool_typer   heap_time_type_nsr   heap_timestamp_type_ns_timezoner   heap_decimal128_typer   heap_list_typer   heap_large_list_typer   heap_fixed_size_list_typer   heap_map_typer   heap_struct_typer   heap_dict_typer   heap_uuid_typer   Nr   r   s   &r   test_types_heapr    s    I/AI/1CDI2:<4AC I5.0 I/13I5<>I:AC?GI %
AC
 #IK #
:<r$   c                 :    \        V R R4       \        V RR4       R# )	int_field$arrow::field("ints", arrow::int64())float_fieldz8arrow::field("floats", arrow::float32(), nullable=false)Nr   r   s   &r   test_fields_stackr    s"    Y;==BDr$   c                      \        V R R4       R# )heap_int_fieldr  Nr   r   s   &r   test_fields_heapr    s    I/:<r$   c                    \        V R R4       \        V RR4       \        V RR4       \        V RR4       \        V RR	4       \        V R
R4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V R R!4       \        V R"R#4       \        V R$R%4       \        V R&R'4       \        V R(R)4       \        V R*R+4       \        V R,R-4       \        V R.R/4       \        V R0R14       \        V R2R34       \        V R4R54       \        V R6R74       \        V R8R94       \        V R:R;4       \        V R<R=4       \        V R>R?4       \        V R@RA4       \        V RBRC4       \        V RDRE4       \        V RFRG4       \        V RHRI4       \        V RJRK4       \        V RLRM4       \        V RNRO4       \        V RPRQ4       \        V RRRS4       \        V RTRU4       \        V RVRW4       \        V RXRY4       \        V RZR[4       \        V R\R]4       \        V R^R_4       \        V R`Ra4       \        V RbRc4       \        V RdRe4       \        V RfRg4       \        V RhRi4       \        V RjRk4       \        V RlRm4       \        V RnRo4       \        V RpRq4       \        V RrRs4       \        V RtRu4       \        V RvRw4       \        V RxRy4       \        V RzR{4       \        V R|R}4       \        V R~R4       \        V R\        P                  ! R4      4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V R\        P                  ! R4      4       \        V RR4       \        V R\        P                  ! R4      4       \        V RR4       \        V RR4       R# )null_scalararrow::NullScalarbool_scalar"arrow::BooleanScalar of value truebool_scalar_nullz"arrow::BooleanScalar of null valueint8_scalarzarrow::Int8Scalar of value -42uint8_scalarzarrow::UInt8Scalar of value 234int64_scalarz0arrow::Int64Scalar of value -9223372036854775808uint64_scalarz1arrow::UInt64Scalar of value 18446744073709551615half_float_scalarz,arrow::HalfFloatScalar of value -1.5 [48640]float_scalarz arrow::FloatScalar of value 1.25double_scalarz arrow::DoubleScalar of value 2.5time_scalar_sz!arrow::Time32Scalar of value 100stime_scalar_msz#arrow::Time32Scalar of value 1000mstime_scalar_usz$arrow::Time64Scalar of value 10000ustime_scalar_nsz%arrow::Time64Scalar of value 100000nstime_scalar_nullz&arrow::Time64Scalar of null value [ns]duration_scalar_sz$arrow::DurationScalar of value -100sduration_scalar_msz&arrow::DurationScalar of value -1000msduration_scalar_usz'arrow::DurationScalar of value -10000usduration_scalar_nsz(arrow::DurationScalar of value -100000nsduration_scalar_nullz(arrow::DurationScalar of null value [ns]timestamp_scalar_sz4arrow::TimestampScalar of value 12345s [no timezone]timestamp_scalar_msz7arrow::TimestampScalar of value -123456ms [no timezone]timestamp_scalar_usz7arrow::TimestampScalar of value 1234567us [no timezone]timestamp_scalar_nsz9arrow::TimestampScalar of value -12345678ns [no timezone]timestamp_scalar_nullz6arrow::TimestampScalar of null value [ns, no timezone]timestamp_scalar_s_tzz7arrow::TimestampScalar of value 12345s ["Europe/Paris"]timestamp_scalar_ms_tzz:arrow::TimestampScalar of value -123456ms ["Europe/Paris"]timestamp_scalar_us_tzz:arrow::TimestampScalar of value 1234567us ["Europe/Paris"]timestamp_scalar_ns_tzz<arrow::TimestampScalar of value -12345678ns ["Europe/Paris"]timestamp_scalar_null_tzz9arrow::TimestampScalar of null value [ns, "Europe/Paris"]month_interval_scalarz'arrow::MonthIntervalScalar of value 23Mmonth_interval_scalar_nullz(arrow::MonthIntervalScalar of null valueday_time_interval_scalarz/arrow::DayTimeIntervalScalar of value 23d-456msday_time_interval_scalar_nullz*arrow::DayTimeIntervalScalar of null valuemonth_day_nano_interval_scalarz6arrow::MonthDayNanoIntervalScalar of value 1M23d-456ns#month_day_nano_interval_scalar_nullz/arrow::MonthDayNanoIntervalScalar of null valuedate32_scalarz-arrow::Date32Scalar of value 23d [1970-01-24]date32_scalar_nullz!arrow::Date32Scalar of null valuedate64_scalarz6arrow::Date64Scalar of value 3888000000ms [1970-02-15]date64_scalar_nullz!arrow::Date64Scalar of null valuedecimal128_scalar_nullz=arrow::Decimal128Scalar of null value [precision=10, scale=4]decimal128_scalar_pos_scale_posAarrow::Decimal128Scalar of value 123.4567 [precision=10, scale=4]decimal128_scalar_pos_scale_negzBarrow::Decimal128Scalar of value -123.4567 [precision=10, scale=4]decimal128_scalar_neg_scale_poszFarrow::Decimal128Scalar of value 1.234567e+10 [precision=10, scale=-4]decimal128_scalar_neg_scale_negzGarrow::Decimal128Scalar of value -1.234567e+10 [precision=10, scale=-4]decimal256_scalar_nullz=arrow::Decimal256Scalar of null value [precision=50, scale=4]decimal256_scalar_pos_scale_posharrow::Decimal256Scalar of value 123456789012345678901234567890123456789012.3456 [precision=50, scale=4]decimal256_scalar_pos_scale_negziarrow::Decimal256Scalar of value -123456789012345678901234567890123456789012.3456 [precision=50, scale=4]decimal256_scalar_neg_scale_poszmarrow::Decimal256Scalar of value 1.234567890123456789012345678901234567890123456e+49 [precision=50, scale=-4]decimal256_scalar_neg_scale_negznarrow::Decimal256Scalar of value -1.234567890123456789012345678901234567890123456e+49 [precision=50, scale=-4]binary_scalar_nullz!arrow::BinaryScalar of null valuebinary_scalar_unallocatedz*arrow::BinaryScalar of value <unallocated>binary_scalar_emptyz'arrow::BinaryScalar of size 0, value ""binary_scalar_abcz*arrow::BinaryScalar of size 3, value "abc"binary_scalar_bytesz3arrow::BinaryScalar of size 3, value "\000\037\377"large_binary_scalar_abcz/arrow::LargeBinaryScalar of size 3, value "abc"string_scalar_nullz!arrow::StringScalar of null valuestring_scalar_unallocatedz*arrow::StringScalar of value <unallocated>string_scalar_emptyz'arrow::StringScalar of size 0, value ""string_scalar_heheu-   arrow::StringScalar of size 6, value "héhé"string_scalar_invalid_charsz:arrow::StringScalar of size 11, value "abc\x00def\\xffghi"large_string_scalar_heheu2   arrow::LargeStringScalar of size 6, value "héhé"fixed_size_binary_scalarz3arrow::FixedSizeBinaryScalar of size 3, value "abc"fixed_size_binary_scalar_nullz=arrow::FixedSizeBinaryScalar of size 3, null with value "   "dict_scalarz_^arrow::DictionaryScalar of index arrow::Int8Scalar of value 42, dictionary arrow::StringArray dict_scalar_nullzjarrow::DictionaryScalar of type arrow::dictionary(arrow::int8(), arrow::utf8(), ordered=false), null valuelist_scalarznarrow::ListScalar of value arrow::Int32Array of length 3, offset 0, null count 0 = {[0] = 4, [1] = 5, [2] = 6}list_scalar_nullzAarrow::ListScalar of type arrow::list(arrow::int32()), null valuelarge_list_scalarzsarrow::LargeListScalar of value arrow::Int32Array of length 3, offset 0, null count 0 = {[0] = 4, [1] = 5, [2] = 6}large_list_scalar_nullzLarrow::LargeListScalar of type arrow::large_list(arrow::int32()), null valuefixed_size_list_scalarzwarrow::FixedSizeListScalar of value arrow::Int32Array of length 3, offset 0, null count 0 = {[0] = 4, [1] = 5, [2] = 6}fixed_size_list_scalar_nullzXarrow::FixedSizeListScalar of type arrow::fixed_size_list(arrow::int32(), 3), null valuestruct_scalarz~arrow::StructScalar = {["ints"] = arrow::Int32Scalar of value 42, ["strs"] = arrow::StringScalar of size 9, value "some text"}struct_scalar_nullzarrow::StructScalar of type arrow::struct_({arrow::field("ints", arrow::int32()), arrow::field("strs", arrow::utf8())}), null valuesparse_union_scalarzMarrow::SparseUnionScalar of type code 7, value arrow::Int32Scalar of value 43sparse_union_scalar_nullzU^arrow::SparseUnionScalar of type arrow::sparse_union\(.*\), type code 7, null value$dense_union_scalarzLarrow::DenseUnionScalar of type code 7, value arrow::Int32Scalar of value 43dense_union_scalar_nullzS^arrow::DenseUnionScalar of type arrow::dense_union\(.*\), type code 7, null value$extension_scalarzarrow::ExtensionScalar of type "extension<arrow.uuid>", value arrow::FixedSizeBinaryScalar of size 16, value "0123456789abcdef"extension_scalar_nullzBarrow::ExtensionScalar of type "extension<arrow.uuid>", null valueNr   r]   compiler   s   &r   test_scalars_stackrl    s   Y/BCY9;Y 29;Y57Y68YGIYHJY 3CEY79Y79 Y8:Y 0:<Y 0;=Y 0<>Y 2=? Y 3;=Y 4=?Y 4>@Y 4?AY 6?A '>@ (AC (AC (CE *@B *AC +DF +DF +FH -CE Y 7>@Y <?AY :FHY ?AC3@B 89; YDFY 48:YMOY 48: +GI 4KM 4LN 4
$& 4
$&
 +GI 4
#%
 4
#%
 4
$&
 4
$& '+- .46 (13 &46 (>@ ,9; '+- .46 (13 '79 0EG -<> -=? 2GI =


/	12 %
 =
JL %KM &
JL +
 +
JL 0
AC
 ?
HJ '
=? (
02 -rzz(0)* '
02 ,bjj(/)*
 %
$&
 *LNr$   c                     \        V R R4       \        V RR4       \        V RR4       \        V RR4       \        V RR	4       \        V R
R4       R# )heap_null_scalarr  heap_bool_scalarr  heap_decimal128_scalarrB  heap_decimal256_scalarrH  heap_map_scalarz}arrow::MapScalar of type arrow::map(arrow::utf8(), arrow::int32(), keys_sorted=false), value length 2, offset 0, null count 0heap_map_scalar_nullzaarrow::MapScalar of type arrow::map(arrow::utf8(), arrow::int32(), keys_sorted=false), null valueNr   r   s   &r   test_scalars_heaprt    ss    I13FGI18:+KM +
#% $
FH )
*,r$   c                      \        V R R4       R# )int32_array_datazuarrow::ArrayData of type arrow::int32(), length 4, offset 0, null count 1 = {[0] = -5, [1] = 6, [2] = null, [3] = 42}Nr   r   s   &r   test_array_datarw    s    %
DFr$   c                 :    \        V R R4       \        V RR4       R# )int32_arrayaarrow::Int32Array of length 4, offset 0, null count 1 = {[0] = -5, [1] = 6, [2] = null, [3] = 42}
list_arrayVarrow::ListArray of type arrow::list(arrow::int64()), length 3, offset 0, null count 1Nr   r   s   &r   test_arrays_stackr}    s(    =
57 <
,.r$   c                    \        V R R4       \        V RR4       \        V RR4       \        V RR4       \        V RR	4       \        V R
R4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V RR4       \        V R R!4       \        V R"R#4       \        V R$R%4       \        V R&R'4       \        V R(R)4       \        V R*R+4       \        V R,R-4       \        V R.R/4       \        P                  RU8  d6   \        V R0R14       \        V R2R34       \        V R4R54       \        V R6R74       M4\        V R0R84       \        V R2R94       \        V R4R:4       \        V R6R;4       \        V R<R=4       \        V R>R?4       \        V R@RA4       \        V RBRC4       \        V RDRE4       \        V RFRG4       \        V RHRI4       \        V RJRK4       \        V RLRM4       \        V RNRO4       \        V RPRQ4       \        V RRRS4       RT# )Vheap_null_arrayz4arrow::NullArray of length 2, offset 0, null count 2heap_int32_arrayrz  heap_int32_array_no_nullsz^arrow::Int32Array of length 4, offset 0, null count 0 = {[0] = -5, [1] = 6, [2] = 3, [3] = 42}heap_int32_array_sliced_1_9zarrow::Int32Array of length 9, offset 1, unknown null count = {[0] = 2, [1] = -3, [2] = 4, [3] = null, [4] = -5, [5] = 6, [6] = -7, [7] = 8, [8] = null}heap_int32_array_sliced_2_6zzarrow::Int32Array of length 6, offset 2, unknown null count = {[0] = -3, [1] = 4, [2] = null, [3] = -5, [4] = 6, [5] = -7}heap_int32_array_sliced_8_4zharrow::Int32Array of length 4, offset 8, unknown null count = {[0] = 8, [1] = null, [2] = -9, [3] = -10}heap_int32_array_sliced_emptyz;arrow::Int32Array of length 0, offset 6, unknown null countheap_double_arrayzQarrow::DoubleArray of length 2, offset 0, null count 1 = {[0] = -1.5, [1] = null}heap_float16_arrayzSarrow::HalfFloatArray of length 2, offset 0, null count 0 = {[0] = 0.0, [1] = -1.5}heap_bool_arraya!  arrow::BooleanArray of length 18, offset 0, null count 6 = {[0] = false, [1] = false, [2] = true, [3] = true, [4] = null, [5] = null, [6] = false, [7] = false, [8] = true, [9] = true, [10] = null, [11] = null, [12] = false, [13] = false, [14] = true, [15] = true, [16] = null, [17] = null}heap_bool_array_sliced_1_9zarrow::BooleanArray of length 9, offset 1, unknown null count = {[0] = false, [1] = true, [2] = true, [3] = null, [4] = null, [5] = false, [6] = false, [7] = true, [8] = true}heap_bool_array_sliced_2_6zarrow::BooleanArray of length 6, offset 2, unknown null count = {[0] = true, [1] = true, [2] = null, [3] = null, [4] = false, [5] = false}heap_bool_array_sliced_emptyz=arrow::BooleanArray of length 0, offset 6, unknown null countheap_date32_arrayzarrow::Date32Array of length 6, offset 0, null count 1 = {[0] = 0d [1970-01-01], [1] = null, [2] = 18336d [2020-03-15], [3] = -9004d [1945-05-08], [4] = -719162d [0001-01-01], [5] = -719163d [year <= 0]}heap_date64_arrayzarrow::Date64Array of length 5, offset 0, null count 0 = {[0] = 1584230400000ms [2020-03-15], [1] = -777945600000ms [1945-05-08], [2] = -62135596800000ms [0001-01-01], [3] = -62135683200000ms [year <= 0], [4] = 123ms [non-multiple of 86400000]}heap_time32_array_szarrow::Time32Array of type arrow::time32(arrow::TimeUnit::SECOND), length 3, offset 0, null count 1 = {[0] = null, [1] = -123s, [2] = 456s}heap_time32_array_mszarrow::Time32Array of type arrow::time32(arrow::TimeUnit::MILLI), length 3, offset 0, null count 1 = {[0] = null, [1] = -123ms, [2] = 456ms}heap_time64_array_uszarrow::Time64Array of type arrow::time64(arrow::TimeUnit::MICRO), length 3, offset 0, null count 1 = {[0] = null, [1] = -123us, [2] = 456us}heap_time64_array_nszarrow::Time64Array of type arrow::time64(arrow::TimeUnit::NANO), length 3, offset 0, null count 1 = {[0] = null, [1] = -123ns, [2] = 456ns}heap_month_interval_arrayzearrow::MonthIntervalArray of length 3, offset 0, null count 1 = {[0] = 123M, [1] = -456M, [2] = null}heap_day_time_interval_arrayz^arrow::DayTimeIntervalArray of length 2, offset 0, null count 1 = {[0] = 1d-600ms, [1] = null}"heap_month_day_nano_interval_arrayzharrow::MonthDayNanoIntervalArray of length 2, offset 0, null count 1 = {[0] = 1M-600d5000ns, [1] = null}heap_duration_array_szarrow::DurationArray of type arrow::duration(arrow::TimeUnit::SECOND), length 2, offset 0, null count 1 = {[0] = null, [1] = -1234567890123456789s}heap_duration_array_nszarrow::DurationArray of type arrow::duration(arrow::TimeUnit::NANO), length 2, offset 0, null count 1 = {[0] = null, [1] = -1234567890123456789ns}heap_timestamp_array_szarrow::TimestampArray of type arrow::timestamp(arrow::TimeUnit::SECOND), length 4, offset 0, null count 1 = {[0] = null, [1] = 0s [1970-01-01 00:00:00], [2] = -2203932304s [1900-02-28 12:34:56], [3] = 63730281600s [3989-07-14 00:00:00]}heap_timestamp_array_mszarrow::TimestampArray of type arrow::timestamp(arrow::TimeUnit::MILLI), length 3, offset 0, null count 1 = {[0] = null, [1] = -2203932303877ms [1900-02-28 12:34:56.123], [2] = 63730281600789ms [3989-07-14 00:00:00.789]}heap_timestamp_array_uszarrow::TimestampArray of type arrow::timestamp(arrow::TimeUnit::MICRO), length 3, offset 0, null count 1 = {[0] = null, [1] = -2203932303345679us [1900-02-28 12:34:56.654321], [2] = 63730281600456789us [3989-07-14 00:00:00.456789]}heap_timestamp_array_nszarrow::TimestampArray of type arrow::timestamp(arrow::TimeUnit::NANO), length 2, offset 0, null count 1 = {[0] = null, [1] = -2203932303012345679ns [1900-02-28 12:34:56.987654321]}zarrow::TimestampArray of type arrow::timestamp(arrow::TimeUnit::SECOND), length 4, offset 0, null count 1 = {[0] = null, [1] = 0s [1970-01-01 00:00:00], [2] = -2203932304s [too large to represent], [3] = 63730281600s [too large to represent]}zarrow::TimestampArray of type arrow::timestamp(arrow::TimeUnit::MILLI), length 3, offset 0, null count 1 = {[0] = null, [1] = -2203932303877ms [too large to represent], [2] = 63730281600789ms [too large to represent]}zarrow::TimestampArray of type arrow::timestamp(arrow::TimeUnit::MICRO), length 3, offset 0, null count 1 = {[0] = null, [1] = -2203932303345679us [too large to represent], [2] = 63730281600456789us [too large to represent]}zarrow::TimestampArray of type arrow::timestamp(arrow::TimeUnit::NANO), length 2, offset 0, null count 1 = {[0] = null, [1] = -2203932303012345679ns [too large to represent]}heap_decimal128_arrayzarrow::Decimal128Array of type arrow::decimal128(30, 6), length 3, offset 0, null count 1 = {[0] = null, [1] = -1234567890123456789.012345, [2] = 1234567890123456789.012345}heap_decimal256_arrayzarrow::Decimal256Array of type arrow::decimal256(50, 6), length 2, offset 0, null count 1 = {[0] = null, [1] = -123456789012345678901234567890123456789.012345}heap_decimal128_array_slicedzarrow::Decimal128Array of type arrow::decimal128(30, 6), length 1, offset 1, unknown null count = {[0] = -1234567890123456789.012345}heap_fixed_size_binary_arrayzarrow::FixedSizeBinaryArray of type arrow::fixed_size_binary(3), length 3, offset 0, null count 1 = {[0] = null, [1] = "abc", [2] = "\000\037\377"}'heap_fixed_size_binary_array_zero_widthzzarrow::FixedSizeBinaryArray of type arrow::fixed_size_binary(0), length 2, offset 0, null count 1 = {[0] = null, [1] = ""}#heap_fixed_size_binary_array_slicedzwarrow::FixedSizeBinaryArray of type arrow::fixed_size_binary(3), length 1, offset 1, unknown null count = {[0] = "abc"}heap_binary_arrayziarrow::BinaryArray of length 3, offset 0, null count 1 = {[0] = null, [1] = "abcd", [2] = "\000\037\377"}heap_large_binary_arrayznarrow::LargeBinaryArray of length 3, offset 0, null count 1 = {[0] = null, [1] = "abcd", [2] = "\000\037\377"}heap_string_arrayuq   arrow::StringArray of length 3, offset 0, null count 1 = {[0] = null, [1] = "héhé", [2] = "invalid \\xff char"}heap_large_string_arrayuv   arrow::LargeStringArray of length 3, offset 0, null count 1 = {[0] = null, [1] = "héhé", [2] = "invalid \\xff char"}heap_binary_array_slicedzMarrow::BinaryArray of length 1, offset 1, unknown null count = {[0] = "abcd"}heap_list_arrayr|  Nl        )r   rB   maxsizer   s   &r   test_arrays_heapr    s   $>@
 %
46 .
13 0
*,
 0
GI 0
57 2EG &
#% '
"$ $
?A /
=?
 /

 1GI
 &
') &
35 (
02
 )
24
 )
24
 )
24
 .
02 1
') 7
<> *
46
 +
57
 {{U/9	; 	0A	C 	0G	I 	0M	O 	/<	> 	0@	B 	0C	E 	0F	H *
-/ *
BD 1
.0 1
;=
 <
FH 8
CE &
<> ,
<> &
DF ,
DF -
 $
,.r$   c                 T    \        V R R4       \        V RR4       \        V RR4       R# )schema_emptyzarrow::Schema with 0 fieldsschema_non_emptyzRarrow::Schema with 2 fields = {["ints"] = arrow::int8(), ["strs"] = arrow::utf8()}schema_with_metadatazgarrow::Schema with 2 fields and 2 metadata items = {["ints"] = arrow::int8(), ["strs"] = arrow::utf8()}Nr   r   s   &r   test_schemar    s;    I~13%
%' )
@Br$   c                      \        V R R4       R# )chunked_arrayzarrow::ChunkedArray of type arrow::int32(), length 5, null count 1 with 2 chunks = {[0] = length 2, offset 0, null count 0, [1] = length 3, offset 0, null count 1}Nr   r   s   &r   test_chunked_arrayr    s    ?
35r$   c                 x    R pRpV RV 2p\        V RV4       \        V RV4       V RV 2p\        V RV4       R# )z)arrow::RecordBatch with 2 columns, 3 rowsz{["ints"] = arrow::ArrayData of type arrow::int32(), length 3, offset 0, null count 0 = {[0] = 1, [1] = 2, [2] = 3}, ["strs"] = arrow::ArrayData of type arrow::utf8(), length 3, offset 0, null count 1 = {[0] = "abc", [1] = null, [2] = "def"}}z = batchzbatch.get()z, 3 metadata items = batch_with_metadataNr   )r   expected_prefixexpected_suffixr   s   &   r   test_record_batchr    s_    AO	2  ""#o%67H Iw1I}h7!""77HIHI4h?r$   c                 >    R p\        V RV4       \        V RV4       R# )a  arrow::Table with 2 columns, 5 rows = {["ints"] = arrow::ChunkedArray of type arrow::int32(), length 5, null count 0 with 2 chunks = {[0] = length 3, offset 0, null count 0, [1] = length 2, offset 0, null count 0}, ["strs"] = arrow::ChunkedArray of type arrow::utf8(), length 5, null count 1 with 3 chunks = {[0] = length 2, offset 0, null count 1, [1] = length 1, offset 0, null count 0, [2] = length 2, offset 0, null count 0}}tableztable.get()Nr   )r   expected_tables   & r   
test_tabler    s&    		3  Iw7I}n=r$   c                 B   \        V R R4       \        V RR4       \        V R\        P                  ! R4      4       \        V R\        P                  ! R4      4       \        V R\        P                  ! R	4      4       \        V R
\        P                  ! R4      4       R# )empty_datumzarrow::Datum (empty)scalar_datumz8arrow::Datum of value arrow::BooleanScalar of null valuearray_datumz0^arrow::Datum of value arrow::ArrayData of type chunked_array_datumz3^arrow::Datum of value arrow::ChunkedArray of type batch_datumzA^arrow::Datum of value arrow::RecordBatch with 2 columns, 3 rows table_datumz;^arrow::Datum of value arrow::Table with 2 columns, 5 rows Nrj  r   s   &r   
test_datumr  *  s    Y/EF>BD =


FGI (


IJL =


 . 	/0 =


 . 	/0r$   )6	functoolsr   r	   r]   r    r   rB   r&   pyarrowr   markr   
pytestmarkr"   dirnameabspath__file__herer
   r   rI   r,   r   r   r   r#   r)   r-   r/   fixturer   r   r   r   r   r   r   r   r   r   r   r  r  r  rl  rt  rw  r}  r  r  r  r  r  r  r(   r$   r   <module>r     s  $   	 	   
   [[__
	wwrwwx01 jjnn/0 > >ggll4!<=  fo      /
,
[ [| i  ! i  !0,

*:&	G?9:OY<x#<LD<
ANH,.F.j.Z
B5@(>$0r$   