
    <>i                        S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKrS SKr	\R                  R                  r\R                  R                  \R                  R                  \5      5      r\R$                  R'                  S5      =(       d    \R                  R)                  \S5      rSS/rS r\" 5       S 5       r\" 5       S	 5       rS
 rS r " S S5      r\R:                  " SS9S 5       r\R:                  " SS9S 5       rS rS r S r!S r"S r#S r$S r%S r&S r'S r(S r)S r*S r+S r,S  r-S! r.S" r/S# r0S$ r1S% r2S& r3S' r4S( r5g))    )	lru_cacheNARROW_GDB_SCRIPTz../../../cpp/gdb_arrow.pygdbz--nxc                  j    0 n S H  n [         R                  U   X'   M     U $ ! [         a     M,  f = f)N)PATHLD_LIBRARY_PATH)osenvironKeyError)envvars     U/var/www/html/land-tabula/venv/lib/python3.13/site-packages/pyarrow/tests/test_gdb.pyenvironment_for_gdbr   *   s@    
C*	zz#CH +
 J  		s   $
22c            	           [         R                  " [        S/-   [        5       S[         R                  [         R                  [         R
                  S9n U R                  S:H  $ ! [         a     gf = f)Nz	--versionr   )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$ $
A10A1c                  F    [         R                  " S5      n U c   S5       eU $ )Npython3z Couldn't find python3 executable)shutilwhich)paths    r   python_executabler#   C   s'    <<	"D???K    c                  P    [        5       (       d  [        R                  " S5        g g )Nzgdb command unavailable)r   pytestskip r$   r   skip_if_gdb_unavailabler)   J   s    -. r$   c                      [         R                  R                  [        5      (       d  [        R
                  " S5        g g )Nzgdb script not found)r	   r"   exists
gdb_scriptr&   r'   r(   r$   r   skip_if_gdb_script_unavailabler-   O   s'    77>>*%%*+ &r$   c                   L    \ rS rSrSrSrS rS rS rS r	S r
S	 rS
 rS rSrg)
GdbSessionT   NTc                     [        5       nUR                  U5        [        R                  " [        [        U5      -   US[        R                  [        R                  S9U l        / U l        SU l	        g )Nr   )r   r   r   r   r$   )
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                    U R                   R                  S5      (       Gdb  U R                  R                  5       GcF  U R                  R                  R                  S5      nU R                  (       aQ  [        R                  R                  R                  U5        [        R                  R                  R                  5         UR                  S5      u  pnU(       aI  U R                  R                  U R                   5        U R                  R                  X-   5        X0l         OUS:X  d   eU =R                   U-  sl         U R                   R                  S5      (       d  U R                  R                  5       c  GMF  U R                  R                  5       b  [        S5      eSR                  U R                  5      R!                  S5      n/ U l        SU l         U$ )zG
Record output until the gdb prompt displays.  Return recorded output.
s   (gdb) i      
r$   z#gdb session terminated unexpectedlyutf-8)r6   
startswithr   pollr   readverbosesysbufferwriteflush
rpartitionr5   appendIOErrorjoindecode)r7   blocksep	last_lineouts        r   wait_until_readyGdbSession.wait_until_readyc   sc   
 ((33I>>yy~~'II$$))$/E||

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

!!'')$)$4$4U$;!E	  ''(=(=>  ''4(1%|#|%%2% ((33I>>yy~~' 99>>'?@@hht''(//8 #
r$   c                    UR                  S5      S-   nU R                  (       aQ  [        R                  R                  R                  U5        [        R                  R                  R                  5         U R                  R                  R                  U5        U R                  R                  R                  5         g )Nr>   r=   )	encoderB   rC   r   rD   rE   rF   r   r   r7   lines     r   issue_commandGdbSession.issue_command   st    {{7#e+<<JJ##D)JJ##%		d#		r$   c                 D    U R                  U5        U R                  5       $ N)rV   rP   rT   s     r   run_commandGdbSession.run_command   s    4 $$&&r$   c                     U R                  SU 35      n[        R                  " SSU5      u  p#US:X  d   U5       eUR                  5       $ )zD
Ask gdb to print the value of an expression and return the result.
zp z	^\$\d+ =     )rZ   resubnstrip)r7   exprrO   ns       r   print_valueGdbSession.print_value   sK     D6{+r3/Avsvyy{r$   c                    U R                  S5      nS[        R                  " U5      -   S-   n[        R                  " X25      nUc  [        R
                  " SU 35        [        US   5      nU R                  SU 35      nSU 3U;   d   eg)	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 r^   zframe zin )rZ   r_   escapesearchr&   failint)r7   	func_namerO   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                 &   U R                   b  U R                   R                  R                  5         U R                   R                  R                  5         U R                   R	                  5         U R                   R                  5         S U l         g g rY   )r   r   closer   killwaitr7   s    r   rJ   GdbSession.join   s^    99 IIOO!!#II""$IINNIINNDI !r$   c                 $    U R                  5         g rY   )rJ   ru   s    r   __del__GdbSession.__del__   s    		r$   )r5   r6   r   )__name__
__module____qualname____firstlineno__r   rB   r:   rP   rV   rZ   rd   ro   rJ   rx   __static_attributes__r(   r$   r   r/   r/   T   s4    DG	$8 '("r$   r/   session)scopec               #   D  #    [        5         [        S[        5       5      n  U R                  5         U R	                  S5        U R	                  S5        U R	                  S5        U R	                  S5        U v   U R                  5         g ! U R                  5         f = f7f)Nz-qzset confirm offzset print array-indexes onzset width unlimitedzset charset UTF-8)r)   r/   r#   rP   rZ   rJ   )r   s    r   r   r      sw     
T,.
/C	)*45-.+,	

s   B AB :B BB c                 N   S[         R                  R                  R                  ;  a  [        R
                  " S5        [         R                  R                  S:w  a  [        R
                  " S5        [        5         U R                  S[         35        [        R                  S:X  a  SOSn[        R                  R                  U5      nU(       a  U R                  S	U S
U 35        SnU R                  SU S35      nSU;   d  SU;   d   U5       eU R                  S5        U $ )N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-   rZ   r,   rC   platformr	   r
   getro   )r   lib_path_varlib_pathcoderO   s        r   	gdb_arrowr      s    BMM00;;;;<	}}7*9:"$OOgj\*+ \\W46:KLzz~~l+H 	(<.(<=KD
//HTF!,
-C#s*$+'*+ %./Jr$   c                 `    U R                  S5      nUR                  S5      (       d   U5       eg )Nzshow versionz	GNU gdb ()rZ   r?   )r   rO   s     r   test_gdb_sessionr      s*    
//.
)C>>+&&++&r$   c                 6    U R                  S5      nUS:X  d   eg )Nz42 + 143)rd   )r   ss     r   test_gdb_arrowr      s    h'A99r$   c                     U R                  U5      n[        U[        R                  5      (       a  UR	                  U5      (       d   U5       egX2:X  d   eg)z'
Check printing a stack-located value.
N)rd   
isinstancer_   Patternmatchr   rb   expectedr   s       r   check_stack_reprr      sG     	A(BJJ''~~a  #!# }}r$   c                 n    U R                  SU 35      nX2:w  a  UR                  SU 35      (       d   egg)z9
Check printing a heap-located value, given its address.
*r   N)rd   endswithr   s       r   check_heap_reprr      s=     	!D6
#A}zzAhZ.)))) r$   c                     [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U S	S
5        [        U SS5        g )N	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"))r   r   s    r   test_statusr      sg    Y-BCYAC(	89
 Y-EF>HJ (	9:r$   c                 l    [        U SS5        [        U SS5        [        U SS5        [        U SS5        g )	N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"r   r   s    r   test_buffer_stackr     sF    Y9;Y@B)HJ Y 0EGr$   c                 8    [        U SS5        [        U SS5        g )Nheap_bufferr   zheap_buffer_mutable.get()z'arrow::Buffer of size 3, mutable, "abc"r   r   s    r   test_buffer_heapr     s"    I}?AI:=?r$   c                    Sn[        U SS5        [        U SSU S35        [        U SSU S35        [        U S	S
5        [        U SSU S35        [        U SSU S35        Sn[        U SS5        [        U SSU S35        [        U SSU S35        [        U SS5        [        U SSU S35        [        U SSU S35        g )N&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(-r   )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                 8    [        U SS5        [        U SS5        g )Nz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"}r   r   s    r   test_metadatar   =  s'    I579#
MOr$   c                    [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U S	S
5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS 5        [        U S!S"5        [        U S#S$5        [        U S%S&5        [        U S'S(5        [        U S)S*5        [        U S+S,5        [        U S-S.5        [        U S/S05        [        U S1S25        [        U S3S45        [        U S5S65        [        U S7S85        [        U S9S:5        [        U S;S<5        [        U S=S>5        [        U S?S@5        [        U SASB5        [        U SCSD5        [        U SESF5        [        U SGSH5        g )IN	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)r   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                 <   [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U S	S
5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        g )N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   r   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                 8    [        U SS5        [        U SS5        g )N	int_field$arrow::field("ints", arrow::int64())float_fieldz8arrow::field("floats", arrow::float32(), nullable=false)r   r   s    r   test_fields_stackr    s"    Y;==BDr$   c                     [        U SS5        g )Nheap_int_fieldr  r   r   s    r   test_fields_heapr    s    I/:<r$   c                    [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U S	S
5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS 5        [        U S!S"5        [        U S#S$5        [        U S%S&5        [        U S'S(5        [        U S)S*5        [        U S+S,5        [        U S-S.5        [        U S/S05        [        U S1S25        [        U S3S45        [        U S5S65        [        U S7S85        [        U S9S:5        [        U S;S<5        [        U S=S>5        [        U S?S@5        [        U SASB5        [        U SCSD5        [        U SESF5        [        U SGSH5        [        U SISJ5        [        U SKSL5        [        U SMSN5        [        U SOSP5        [        U SQSR5        [        U SSST5        [        U SUSV5        [        U SWSX5        [        U SYSZ5        [        U S[S\5        [        U S]S^5        [        U S_S`5        [        U SaSb5        [        U ScSd5        [        U SeSf5        [        U SgSh5        [        U SiSj5        [        U SkSl5        [        U SmSn5        [        U SoSp5        [        U SqSr5        [        U SsSt5        [        U SuSv5        [        U SwSx5        [        U SySz5        [        U S{S|5        [        U S}S~5        [        U SS5        [        U S[        R                  " S5      5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U S[        R                  " S5      5        [        U SS5        [        U S[        R                  " S5      5        [        U SS5        [        U SS5        g )N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 value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                     [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U S	S
5        [        U SS5        g )N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 valuer   r   s    r   test_scalars_heaprt    ss    I13FGI18:+KM +
#% $
FH )
*,r$   c                     [        U SS5        g )Nint32_array_datazuarrow::ArrayData of type arrow::int32(), length 4, offset 0, null count 1 = {[0] = -5, [1] = 6, [2] = null, [3] = 42}r   r   s    r   test_array_datarw    s    %
DFr$   c                 8    [        U SS5        [        U SS5        g )N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 1r   r   s    r   test_arrays_stackr}    s(    =
57 <
,.r$   c                    [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U S	S
5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS5        [        U SS 5        [        U S!S"5        [        U S#S$5        [        U S%S&5        [        U S'S(5        [        U S)S*5        [        U S+S,5        [        U S-S.5        [        U S/S05        [        R                  S1:  a5  [        U S2S35        [        U S4S55        [        U S6S75        [        U S8S95        O4[        U S2S:5        [        U S4S;5        [        U S6S<5        [        U S8S=5        [        U S>S?5        [        U S@SA5        [        U SBSC5        [        U SDSE5        [        U SFSG5        [        U SHSI5        [        U SJSK5        [        U SLSM5        [        U SNSO5        [        U SPSQ5        [        U SRSS5        [        U STSU5        g )VN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}l        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|  )r   rC   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                 R    [        U SS5        [        U SS5        [        U SS5        g )N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()}r   r   s    r   test_schemar    s;    I~13%
%' )
@Br$   c                     [        U SS5        g )N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}r   r   s    r   test_chunked_arrayr    s    ?
35r$   c                 v    SnSnU SU 3n[        U SU5        [        U SU5        U SU 3n[        U SU5        g )Nz)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_metadatar   )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                 <    Sn[        U SU5        [        U SU5        g )Na  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()r   )r   expected_tables     r   
test_tabler    s&    		3  Iw7I}n=r$   c                 @   [        U SS5        [        U SS5        [        U S[        R                  " S5      5        [        U S[        R                  " S5      5        [        U S	[        R                  " S
5      5        [        U S[        R                  " S5      5        g )N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 rj  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   rC   r&   pyarrowr   markr   
pytestmarkr"   dirnameabspath__file__herer
   r   rJ   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$   