+
    nDj3[                     d   ^ RI Ht ^ RIt^ RIt^ RIt ^ RIt^ RIt	^ RI
Hu Ht ^ RIHt  ^ RItR tR t]P(                  P                   R 4       t]P(                  P                   ]P(                  P,                  R 4       4       tR tR	 tR
 tR tR tR t]P(                  P
                  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! t1]P(                  P                   R" 4       t2R# t3R$ t4R% t5R#   ] d    Rt EL	i ; i  ] d     Li ; i)&    )OrderedDictN)Versionc                      R p \         P                  ! \        V R7      ;_uu_ 4        \        P                  ! 4        RRR4       R#   + '       g   i     R# ; i)zGDo not call Schema's constructor directly, use `pyarrow.schema` instead)matchN)pytestraises	TypeErrorpaSchema)msgs    S/data/cameron/venvs/s3viz/lib/python3.14/site-packages/pyarrow/tests/test_schema.pytest_schema_constructor_errorsr   &   s2    C	y	,	,
		 
-	,	,	,s   AA	c                  r    . ROp V  F,  p\        \        V4      pV! 4       p\        V4      V8X  d   K,  Q h	  R# )int8N)r   int16int32int64uint8uint16uint32uint64)getattrr
   str)dtypesnamefactoryts       r   test_type_integersr   -   s8    5F "d#I1v~~     c                  $   \         P                  ! R 4      p \        \        P                  4      \        R4      8  d   \         P                  ! R4      p \
        P                  ! 4       \         P                  3\
        P                  ! 4       \         P                  3\
        P                  ! 4       \         P                  3\
        P                  ! 4       \         P                  3\
        P                  ! 4       \         P                  3\
        P                  ! 4       \         P                  3\
        P                  ! 4       \         P                  3\
        P                  ! 4       \         P                  3\
        P                  ! 4       \         P                  3\
        P                   ! 4       \         P                   3\
        P"                  ! 4       \         P"                  3\
        P$                  ! 4       \         P$                  3\
        P&                  ! 4       \         P&                  3\
        P(                  ! 4       V 3\
        P*                  ! 4       V 3\
        P,                  ! R4      V 3\
        P.                  ! 4       \         P                  3\
        P0                  ! 4       \         P                  3\
        P2                  ! 4       \         P                  3\
        P.                  ! ^4      \         P                  3\
        P4                  ! 4       \         P                  3\
        P6                  ! 4       \         P                  3\
        P8                  ! 4       \         P                  3\
        P:                  ! \
        P                  ! 4       4      \         P                  3\
        P<                  ! \
        P                  ! 4       \
        P&                  ! 4       4      \         P                  3.pV F  w  r#VP?                  4       V8X  d   K  Q h	  R# )datetime64[ms]z2.0.0datetime64[ns]msN) npdtyper   pd__version__r
   nullobject_bool_r   r   r   r   r   r   r   r   float16float32float64date32date64	timestampbinarylarge_binarybinary_viewstringlarge_stringstring_viewlist_map_to_pandas_dtype)M8cases
arrow_type
numpy_types       r   test_type_to_pandas_dtyper>   7   s<   	"	#Br~~!11XX&'	BJJ	RXX	BGG	RXX	RXX	RXX	RXX	bii 	bii 	bii 	rzz"	rzz"	rzz"	b	b	d	R 	bjj!		BJJ'		2::&	2

#	bjj!		BJJ'		2::&	"'')	bjj)	RZZ\	*BJJ75E8 #(
))+z999 #(r   c                  2    \         P                  ! R 4       R# )zarrow_7980.pyN)	test_utilinvoke_script r   r   &test_type_to_pandas_dtype_check_importrC   \   s     O,r   c                  $   \         P                  ! 4       p \         P                  ! V 4      p\        V4      R 8X  g   Q h\         P                  ! R\         P
                  ! 4       4      p\         P                  ! V4      p\        V4      R8X  g   Q hR# )zlist<item: int32>my_itemzlist<my_item: string>N)r
   r   r7   r   fieldr4   )
value_type	list_typerF   l2s       r   test_type_listrJ   c   sd    J$Iy>0000HHY		,E	%Br7----r   c                      \         P                  ! 4       p V \         P                  ! 4       8X  g   Q hV R 8X  g   Q hV ^8w  g   Q hR# )r   N)r
   r   )vals    r   test_type_comparisonsrM   m   s8    
((*C"((*'>>!8O8r   c                  F   . R \         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P
                  ! 4       3NR	\         P
                  ! 4       3NR
\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! 4       3NR\         P                  ! R4      3NR\         P                  ! R4      3NR\         P                   ! R4      3NR\         P                   ! R 4      3NR!\         P"                  ! R4      3NR"\         P"                  ! R4      3NR#\         P"                  ! R4      3NR$\         P"                  ! R 4      3NR%\         P$                  ! R4      3NR&\         P$                  ! R4      3NR'\         P$                  ! R4      3NR(\         P$                  ! R 4      3NR)\         P&                  ! 4       3Np V  F"  w  r\         P(                  ! V4      V8X  d   K"  Q h	  R*# )+i1r   i2r   i4r   i8r   u1r   u2r   u4r   u8r   f4r,   f8r-   r.   r/   r4   r   r1   	time32[s]sz
time32[ms]r#   z
time64[us]us
time64[ns]nsztimestamp[s]ztimestamp[ms]ztimestamp[us]ztimestamp[ns]zduration[s]zduration[ms]zduration[us]zduration[ns]month_day_nano_intervalN)r
   r   r   r   r   r   r   r   r   r,   r-   r.   r/   r4   r1   time32time64r0   durationr^   type_for_alias)r;   rL   expecteds      r   test_type_for_aliasrd   t   s|   '	rwwy'	' 
rxxz' 
"((*	'
 
rxxz' 
"((*' 
rxxz' 
"((*' 
rxxz' 
"((*' 
ryy{' 
299;' 
ryy{' 
299;' 
ryy{'  
299;!'" 
rzz|#'$ 
BJJL!%'& 
rzz|''( 
BJJL!)'* 
299;+', 
299;-'. 
299;/'0 
		1'2 
299;3'4 
biin%5'6 
ryy'7'8 
ryy'9': 
ryy';'< 
c*+='> 
",,t,-?'@ 
",,t,-A'B 
",,t,-C'D 
C()E'F 
T*+G'H 
T*+I'J 
T*+K'L 
#B$>$>$@AM'ER   %111 r   c                  T    \         P                  ! 4       p \        V 4      R 8X  g   Q hR# )r4   N)r
   r4   r   )r   s    r   test_type_stringrf      s    
		Aq6Xr   c                      R p \         P                  ! RV R7      pVP                  R8X  g   Q hVP                  V 8X  g   Q hR# )zAmerica/Los_Angelesr]   )tzN)r
   r0   unitrh   )rh   r   s     r   test_type_timestamp_with_tzrj      s7    	B
Tb!A66T>>442::r   c                     \         P                  ! R 4      p \         P                  ! R4      p\         P                  ! R4      p\         P                  ! R4      pV P                  R 8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q h\	        V 4      R8X  g   Q h\	        V4      R8X  g   Q h\
        P                  ! \        4      ;_uu_ 4        \         P                  ! R4       RRR4       \
        P                  ! \        4      ;_uu_ 4        \         P                  ! R 4       RRR4       R#   + '       g   i     LS; i  + '       g   i     R# ; i)rZ   r#   r[   r]   rY   r\   N)r
   r_   r`   ri   r   r   r   
ValueError)t1t2t3t4s       r   test_time_typesrq      s    	3B	4B	4B	4B77c>>77d??77d??77d??r7k!!!r7l"""	z	"	"
		$ 
# 
z	"	"
		# 
#	" 
#	" 
#	"	"s   +E,E E	 E1	c                  n
   \         P                  ! R 4      \        P                  ! 4       3\         P                  ! R4      \        P                  ! 4       3\         P                  ! R4      \        P
                  ! 4       3\         P                  ! R4      \        P                  ! 4       3\         P                  ! R4      \        P                  ! 4       3\         P                  ! R4      \        P                  ! 4       3\         P                  ! R4      \        P                  ! 4       3\         P                  ! R4      \        P                  ! 4       3\         P                  ! R4      \        P                  ! 4       3\         P                  ! R	4      \        P                  ! 4       3\         P                  ! R
4      \        P                  ! 4       3\         P                  ! R4      \        P                  ! 4       3\         P                  ! R4      \        P                  ! 4       3\         P                  ! R4      \        P                   ! R4      3\         P                  ! R4      \        P                   ! R4      3\         P                  ! R4      \        P                   ! R4      3\         P                  ! R4      \        P                   ! R4      3\         P                  ! R4      \        P"                  ! R4      3\         P                  ! R4      \        P"                  ! R4      3\         P                  ! R4      \        P"                  ! R4      3\         P                  ! R4      \        P"                  ! R4      3.p V  F#  w  r\        P$                  ! V4      pW28X  d   K#  Q h	  \        P$                  ! R4      \        P                  ! 4       8X  g   Q h\        P$                  ! \         P&                  4      \        P                  ! 4       8X  g   Q h\        P$                  ! R4      \        P                  ! 4       8X  g   Q h\        P$                  ! \(        4      \        P                  ! 4       8X  g   Q h\*        P,                  ! \.        4      ;_uu_ 4        \        P$                  ! \         P                  ! R4      4       RRR4       \*        P,                  ! \0        4      ;_uu_ 4        \        P$                  ! R4       RRR4       R#   + '       g   i     LS; i  + '       g   i     R# ; i)boolr   r   r   r   r   r   r   r+   r,   r-   USzdatetime64[s]rZ   r!   r#   zdatetime64[us]r[   r"   r]   ztimedelta64[s]ztimedelta64[ms]ztimedelta64[us]ztimedelta64[ns]ONnot_convertible_to_dtype)r$   r%   r
   r*   r   r   r   r   r   r   r   r+   r,   r-   r4   r1   r0   ra   from_numpy_dtypestr_rs   r   r   NotImplementedErrorr	   )r;   dtptresults       r   test_from_numpy_dtyper~      s    
&	288:&	&	2779%	'	BHHJ'	'	BHHJ'	'	BHHJ'	'	BHHJ'	(	RYY[)	(	RYY[)	)	bjjl+	)	bjjl+	)	bjjl+	#		$	#		$	/	"BLL$56	"	#R\\$%78	"	#R\\$%78	"	#R\\$%78	"	#R[[%56	#	$bkk$&78	#	$bkk$&78	#	$bkk$&78+E0 $$R(|| 
 s#ryy{222rww'299;666w'288:555t$
222	*	+	+
BHHSM* 
, 
y	!	!
67 
"	! 
,	+ 
"	!	!s   +T/T#T 	#T4	c            	      l   \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! \         P
                  ! 4       4      4      .p \         P                  ! V 4      pVP                  . RO8X  g   Q hVP                  \         P                  ! 4       \         P                  ! 4       \         P                  ! \         P
                  ! 4       4      .8X  g   Q h\        V4      ^8X  g   Q hV^ ,          P                  R 8X  g   Q hV^ ,          P                  V ^ ,          P                  8X  g   Q hVP                  R 4      P                  R 8X  g   Q hVP                  R 4      P                  V ^ ,          P                  8X  g   Q h\        V4      R8X  g   Q h\        P                  ! \        4      ;_uu_ 4        \         P                  ! R.4       RRR4       R#   + '       g   i     R# ; i)foobarbazBfoo: int32
bar: string
baz: list<item: int8>
  child 0, item: int8Nr   r   r   )r
   rF   r   r4   r7   r   schemanamestypeslenr   typereprr   r   r	   fieldsschs     r   test_schemar      st   

#
		$
+,F
 ))F
C99----99RYY["((27792EFFFFs8q==q6;;%q6;;&)..(((99U  E)))99U  F1INN2229     
y	!	!
		4& 
"	!	!	!s    H""H3	c            	         \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! \         P
                  ! 4       4      4      .p \         P                  ! V 4      p\        P                  ! V4      pV! 4       f   Q h?V! 4       e   Q hR# )r   r   r   N)	r
   rF   r   r4   r7   r   r   weakrefref)r   r   wrs      r   test_schema_weakrefr   	  s    

#
		$
+,F
 YYvF	V	B44<<r   c            
         R p \         P                  ! \         P                  ! RRRRR/R7      \         P                  ! RRR	R
R/R7      .RV /R7      pVP                  4       RV R,           R\	        V 4      ^A,
           28X  g   Q h\         P                  ! R.RR/R7      P                  4       pVR8X  g   Q hVP                  RR7      RV R,           R\	        V 4      ^[,
           R28X  g   Q hVP                  RR^2R7      RV R^*  R\	        V 4      ^),
           R28X  g   Q hVP                  RRR7      R8X  g   Q hVP                  RRRR7      R8X  g   Q hR# )a  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla accumsan vel
turpis et mollis. Aliquam tincidunt arcu id tortor blandit blandit. Donec
eget leo quis lectus scelerisque varius. Class aptent taciti sociosqu ad
litora torquent per conubia nostra, per inceptos himenaeos. Praesent
faucibus, diam eu volutpat iaculis, tellus est porta ligula, a efficitur
turpis nulla facilisis quam. Aliquam vitae lorem erat. Proin a dolor ac libero
dignissim mollis vitae eu mauris. Quisque posuere tellus vitae massa
pellentesque sagittis. Aenean feugiat, diam ac dignissim fermentum, lorem
sapien commodo massa, vel volutpat orci nisi eu justo. Nulla non blandit
sapien. Quisque pretium vestibulum urna eu vehicula.r   r   Fkey1value1metadatar   r4   Tkey3value3loremzfoo: int32 not null
  -- field metadata --
  key1: 'value1'
bar: string
  -- field metadata --
  key3: 'value3'
-- schema metadata --
lorem: ':NA   Nz' + keyzjf0: int32
-- schema metadata --
key: 'valuexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')truncate_metadata:N\   Nz (... z chars omitted))r   show_field_metadataelement_size_limitz>foo: int32 not null
bar: string
-- schema metadata --
lorem: 'N)r   show_schema_metadatazofoo: int32 not null
  -- field metadata --
  key1: 'value1'
bar: string
  -- field metadata --
  key3: 'value3')r   r   r   zfoo: int32 not null
bar: string)f0r   Cvaluexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)r
   r   rF   	to_stringr   )r   	my_schemar}   s      r   #test_schema_to_string_with_metadatar     s   
8E 		288E7E.4h-?A88E8T.4h-?AB %,U#3	5I   )	 
sDUb)%- - - - YY(!&(: ;==FY[  & & & & 7 @	 
sF3u:?+?<> > > > 3824  6>	 
ws5zV45_	:HH H H 49  ;?   3849  ;?  r   c                     R \         P                  ! 4       3R\         P                  ! 4       3R\         P                  ! \         P                  ! 4       4      3.p \         P
                  ! V 4      pVP                  . RO8X  g   Q hVP                  \         P                  ! 4       \         P                  ! 4       \         P                  ! \         P                  ! 4       4      .8X  g   Q h\        V4      ^8X  g   Q h\        V4      R8X  g   Q h\        P                  ! \        4      ;_uu_ 4        \         P
                  ! R.4       RRR4       R#   + '       g   i     R# ; ir   r   r   r   Nr   )r   N)r
   r   r4   r7   r   r   r   r   r   r   r   r   r	   r   s     r   test_schema_from_tuplesr   ^  s    	
				#$F
 ))F
C99----99RYY["((27792EFFFFs8q==9     
y	!	!
		=/" 
"	!	!	!s   -EE 	c            	         \        R \        P                  ! 4       3R\        P                  ! 4       3R\        P                  ! \        P
                  ! 4       4      3.4      p \        P                  ! V 4      pVP                  . RO8X  g   Q hVP                  \        P                  ! 4       \        P                  ! 4       \        P                  ! \        P
                  ! 4       4      .8X  g   Q h\        V4      ^8X  g   Q h\        V4      R8X  g   Q h\        R.4      p \        P                  ! \        4      ;_uu_ 4        \        P                  ! V 4       RRR4       R#   + '       g   i     R# ; ir   )r   r
   r   r4   r7   r   r   r   r   r   r   r   r   r	   r   s     r   test_schema_from_mappingr   r  s    	
				#$ F
 ))F
C99----99RYY["((27792EFFFFs8q==9     -)F	y	!	!
		& 
"	!	!	!s   E##E4	c            	         \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R \         P                  ! \         P
                  ! 4       4      4      .p \         P                  ! V 4      pVP                  . RO8X  g   Q hVP                  \         P                  ! 4       \         P                  ! 4       \         P                  ! \         P
                  ! 4       4      .8X  g   Q h\        V4      ^8X  g   Q h\        V4      R8X  g   Q hV^ ,          P                  R 8X  g   Q hV^ ,          P                  V ^ ,          P                  8X  g   Q h\        P                  ! \        4      ;_uu_ 4        VP!                  R4      V ^,          8X  g   Q h RRR4       \        P                  ! \        4      ;_uu_ 4        VP!                  R4      e   Q h RRR4       \        P                  ! \"        \        34      ;_uu_ 4        VP!                  R 4      e   Q h RRR4       VP%                  R 4      R8X  g   Q hVP'                  R 4      ^ ^.8X  g   Q hR#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lj; i)r   r   zBfoo: int32
bar: string
foo: list<item: int8>
  child 0, item: int8Nxxx)r   r   r   )r
   rF   r   r4   r7   r   r   r   r   r   r   r   r   r   warnsFutureWarningfield_by_nameUserWarningget_field_indexget_all_field_indicesr   s     r   test_schema_duplicate_fieldsr     s   

#
		$
+,F
 ))F
C99----99RYY["((27792EFFFFs8q==9     q6;;%q6;;&)..(((	m	$	$  '6!9444 
%	m	$	$  '/// 
%	{M2	3	3  '/// 
4 u%+++ $$U+1v555 
%	$	$	$	3	3s$   + J6J#=J6J 	#J3	6K	c                     \         P                  ! R \         P                  ! 4       4      P                  RR/4      p V P	                  4       V .8X  g   Q h\         P                  ! R\         P
                  ! 4       RR7      p\         P                  ! R\         P                  ! W.4      RR7      pVP	                  4       \         P                  ! R\         P                  ! 4       4      P                  RR/4      \         P                  ! R\         P
                  ! 4       RR7      .8X  g   Q h\         P                  ! R\         P                  ! W.4      4      pVP	                  4       \         P                  ! R\         P                  ! 4       4      P                  RR/4      \         P                  ! R\         P
                  ! 4       4      .8X  g   Q h\         P                  ! R	\         P                  ! V.4      4      pVP	                  4       \         P                  ! R
\         P                  ! W.4      4      .8X  g   Q hR# )r      foo   barr   Fnullableffzff.foozff.barfffzfff.ffN)r
   rF   r   with_metadataflattenr-   struct)r   f1r   r   s       r   test_field_flattenr     s   	%	$	2	2FF3C	DB::<B4	%	6B	$		2(+e	<B::<
288:&44ff5EF
2::<%8: : : :
 
$		2(+	,B::<
288:&44ff5EF
2::<(* * * * ((5"))RD/
*C;;=RXXh		2(0CDEEEEr   c            	      H   \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! \         P
                  ! 4       4      4      .p \         P                  ! V 4      pVP                  e   Q hRRRR/pVP                  V4      pVP                  V8X  g   Q hVP                  4       pVP                  e   Q hVP                  4       pVP                  e   Q hR# )r   r   r   Nr   r      pandas   badger)
r
   rF   r   r4   r7   r   r   r   r   remove_metadata)r   s1r   s2s3s4s         r   test_schema_add_remove_metadatar     s    

#
		$
+,F 
6	B;;	95H			(	#B;;("""				B;; 
			B;;r   c            	         \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! \         P
                  ! 4       4      4      .p \         P                  ! V 4      pVP                  ^ VP                  ^ 4      P                  \         P                  ! 4       4      4      pVP                  ^ 4      P                  \         P                  ! 4       8X  g   Q hVP                  ^ 4      P                  \         P                  ! 4       8X  g   Q hVP                  ^ VP                  ^ 4      P                  R4      4      pVP                  ^ 4      P                  RJ g   Q hVP                  ^ 4      P                  RJ g   Q hR# )r   r   r   FTN)r
   rF   r   r4   r7   r   r   set	with_typer   r   with_nullabler   )r   r   r   r   s       r   test_schema_set_fieldr     s&   

#
		$
+,F
 
6	B	288A;((4	5B88A;rxxz)))88A;rxxz)))	288A;,,U3	4B88A;4'''88A;5(((r   c                     \         P                  ! R \         P                  ! 4       4      .p \         P                  ! V RR/R7      p\         P                  ! V RR/R7      p\         P                  ! V RR/R7      p\         P                  ! V RR/R7      p\	        V4      \	        V4      8X  g   Q h\	        V4      \	        V4      8w  g   Q h\	        V4      \	        V4      8w  g   Q h\	        V4      \	        V4      8w  g   Q h\         P                  ! V / R7      p\         P                  ! V RR7      p\	        V4      \	        V4      8X  g   Q h\	        V4      \	        V4      8w  g   Q hR# )r   r   r   r   s   foo_differents   bar_differentN)r
   rF   r   r   hash)r   schema1schema2schema3schema4schema_empty1schema_empty2s          r   test_schema_hash_metadatar     s   

#F ii&&)9:Gii&&)9:Gii*:F)CDGii&2B)CDG=DM)))=DM)))=DM)))=DM)))IIfr2MIIft4M$}"5555$w-///r   c            	      V   \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! \         P
                  ! 4       4      4      .p RRRR/p\         P                  ! V 4      p\         P                  ! V 4      p\         P                  ! WR7      p\         P                  ! WR7      pVP                  VRR	7      '       g   Q hVP                  VRR	7      '       g   Q hVP                  V4      '       g   Q hVP                  VRR	7      '       d   Q hVP                  VRR	7      '       d   Q hV R \         P                  ! V 4      pVP                  V4      '       d   Q hR
# )r   r   r   r   r   r   r   r   Tcheck_metadataNr   )r
   rF   r   r4   r7   r   r   equalsr   r   sch1sch2sch3sch4s         r   test_schema_equalsr     s<   

#
		$
+,F
 	95H99VD99VD99V/D99V/D;;tD;1111;;tD;1111;;t{{4{5555{{4{5555r
99VD{{4     r   c            	         \         P                  ! \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      .4      p \         P                  ! \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       RR/R7      .4      pV P                  VRR7      '       d   Q hV P                  V4      '       g   Q hR# )r   r   aalphar   Tr   N)r
   r   rF   r   r4   r   )r   r   s     r   ,test_schema_equals_propagates_check_metadatar     s    ii

#
		$ G ii

#
		sGn= G ~~gd~;;;;>>'""""r   c                  h   \         P                  ! \         P                  ! R \         P                  ! 4       4      .4      p RR\         P                  ! ^^.4      3 F?  p\
        P                  ! \        4      ;_uu_ 4        V P                  V4       RRR4       KA  	  R#   + '       g   i     KV  ; i)r   Nr4   )	r
   r   rF   r   arrayr   r   r	   r   )r   rL   s     r   test_schema_equals_invalid_typer   !  so    YYbhhj123Fh!Q 01]]9%%MM# &% 2%%%s    B  B1c            	      \   \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! \         P
                  ! 4       4      4      .p RRRR/p\         P                  ! V 4      p\         P                  ! V 4      p\         P                  ! WR7      p\         P                  ! WR7      pW#8X  g   Q hWE8X  g   Q hW$8X  g   Q hW$8w  d   Q hW58X  g   Q hV. 8w  g   Q hVR 8w  g   Q hR# )	r   r   r   r   r   r   r   r   N)r
   rF   r   r4   r7   r   r   r   s         r   test_schema_equality_operatorsr   *  s    

#
		$
+,F
 	95H99VD99VD99V/D99V/D<<<< <<|<< 2::5==r   c            	         \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! \         P
                  ! 4       4      4      .p \         P                  ! V 4      pVP                  R 4      P                  R 8X  g   Q hVP                  ^ 4      P                  R 8X  g   Q hVP                  R4      P                  R8X  g   Q h\        P                  ! \        4      ;_uu_ 4        VP                  R4       RRR4       \        P                  ! \        4      ;_uu_ 4        VP                  R4       RRR4       \        P                  ! \        4      ;_uu_ 4        VP                  ^4       RRR4       R#   + '       g   i     L; i  + '       g   i     La; i  + '       g   i     R# ; i)r   r   r   otherNg        r   )r
   rF   r   r4   r7   r   r   r   r   r   KeyErrorr	   
IndexErrorr   r   s     r   test_schema_get_fieldsr   E  s0   

#
		$
+,F YYvF<<##u,,,<<?5(((<<  E)))	x	 	 W 
!	y	!	!S 
"	z	"	"Q 
#	"	 
!	 	!	!	"	"	"s$   0G,G(G*G	G'	*G;	c            	      \   \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! \         P
                  ! 4       4      4      .p \         P                  ! V 4      pVR,          P                  V^,          4      '       g   Q hVR,          P                  V^,          4      '       g   Q hVR,          P                  V^ ,          4      '       g   Q h\        P                  ! \        4      ;_uu_ 4        VR,           RRR4       \        P                  ! \        4      ;_uu_ 4        V^,           RRR4       R#   + '       g   i     LF; i  + '       g   i     R# ; i)r   r   r   Nr   )r
   rF   r   r4   r7   r   r   r   r   r   r   r   s     r   test_schema_negative_indexingr   Z  s   

#
		$
+,F YYvF":VAY''''":VAY''''":VAY''''	z	"	"r
 
# 
z	"	"q	 
#	" 
#	" 
#	"	"s   ?
F3
FF	F+	c                  R   \         P                  ! R \         P                  ! \         P                  ! 4       \         P                  ! 4       4      4      \         P                  ! R\         P
                  ! 4       4      .p \         P                  ! V 4      pRp\        V4      V8X  g   Q hR# )onetwozCone: dictionary<values=string, indices=int16, ordered=0>
two: int32N)r
   rF   
dictionaryr   r4   r   r   r   )r   r   rc   s      r   "test_schema_repr_with_dictionariesr   n  sp    
bhhj"))+>?

#F ))F
C	 
 9   r   c                 `	   \         P                  ! 4       \         P                  ! 4       \         P                  ! 4       \         P                  ! ^
4      \         P                  ! \         P                  ! 4       4      \         P
                  ! \         P                  ! 4       \         P                  ! 4       4      \         P                  ! \         P                  ! RR4      \         P                  ! RR4      .4      \         P                  ! \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      .\         P                  P                  4      \         P                  ! \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      .\         P                  P                  4      \         P                  ! R4      \         P                  ! R4      \         P                  ! 4       \         P                   ! 4       \         P"                  ! R4      \         P"                  ! R4      \         P$                  ! ^	^4      \         P&                  ! ^^4      \         P(                  ! ^^4      \         P*                  ! ^L^&4      \         P                  ! RRR	R
/R7      \         P                  ! \         P                  ! R\         P,                  ! 4       4      4      \         P.                  ! \         P                  ! R\         P,                  ! 4       4      4      \         P
                  ! \         P                  ! R\         P                  ! 4       RR7      \         P                  ! R\         P                  ! 4       4      4      .pV F+  pV P1                  V P3                  V4      4      pW#8X  d   K+  Q h	  . p\5        V4       Fa  w  rV\7        V\         P8                  4      '       d   VP;                  V4       K8  VP;                  \         P                  ! RV 2V4      4       Kc  	  \         P<                  ! VR	R
/R7      pV P1                  V P3                  V4      4      pWs8X  g   Q hR# )
   r   r   br4   rZ   r[   r#   r]   r   r   r   elementr   Fr   value_fN)r
   r   r4   r1   r7   r8   r   rF   unionr   libUnionMode_SPARSEUnionMode_DENSEr_   r`   r.   r/   r0   	decimal32	decimal64
decimal128
decimal256r   
large_listloadsdumps	enumerate
isinstanceFieldappendr   )pickle_moduler;   rL   roundtrippedr   ifr   s   &       r   test_type_schema_picklingr  }  s   
	
		
		
		"

		RWWY'
		HHS&!HHS(#
 	 	HHS"'')$HHS"((*%
 66""	$ 	HHS"'')$HHS"((*%
 66!!	# 			#
		$
		
		
T
T
Q
R
b!
b"
h&&)9:
)RXXZ01
bhhy"((*56
		e<"''),	.A"EH $**=+>+>s+CD"""  F% a""MM!MM"((Rs8Q/0	 ! YYv(89F &&}':':6'BCL!!!r   c                  `   \         P                  ! \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! \         P
                  ! 4       \         P                  ! 4       4      4      \         P                  ! R\         P                  ! \         P                  ! \         P                  ! 4       4      4      4      .4      p \         P                  ! \         P                  ! R\         P                  ! 4       RR7      \         P                  ! R\         P                  ! 4       4      .4      pW3 F[  pVP                  4       p\        V\         P                  4      '       g   Q hVP                  ^ 8X  g   Q hVP                  V8X  d   K[  Q h	  R# )r   r   f2r   Fr   r   N)r
   r   rF   r   r   r   r4   r7   empty_tabler  Tablenum_rows)r   r   r   tables       r   test_empty_tabler    s   ii
rxxz"
r}}RXXZ=>
rxx 456 G ii
bhhj51
bhhj! G
 $""$%****~~"""||v%%%	 %r   c            	         ^ RI p \        \        ^
4      4      V P                  ! \        \        ^
4      4      4      . RO\        P
                  ! . RORR7      V P
                  ! . ROV P                  ! 4       R7      .pV Fi  pV P                  ! RV/VR7      p\        P                  P                  V4      p\        P                  P                  V4      P                  pWE8X  d   Ki  Q h	  R# )	r   Nr"   )r%   r   )index)r   r   Nr   qux)z2007-07-13T01:23:34.123456789z2006-01-13T12:34:56.432539784z2010-08-13T05:46:57.437699912)      N)pandaslistrangeCategoricalr$   r   
Int32Dtype	DataFramer
   r   from_pandasr  r   )r&   inputsdatadfr   rc   s         r   test_schema_from_pandasr-    s    U2Y
tE"I'*
 
 "		#
 	R]]_5
F \\3+T2&&r*88''+22!!!	 r   c                  N   \         P                  ! \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      .4      p \
        P                  ! V 4      \
        P                  R8  d   ^M^8  g   Q hV P                  RR/4      p\
        P                  ! V4      \
        P                  ! V 4      8  g   Q hV P                  RR/4      p\
        P                  ! V4      \
        P                  ! V4      8  g   Q hR# )r   r   r   zsome metadatazsome more metadataNl        )	r
   r   rF   r   r4   sys	getsizeofmaxsizer   )r   r   r   s      r   test_schema_sizeofr2    s    YY

#
		$ F == #++*=B2FFF""E?#;<G==!CMM&$9999""E+?#@AG==!CMM'$::::r   c                     \         P                  ! \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P
                  ! \         P                  ! 4       4      4      .4      p \         P                  ! \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      .4      p\         P                  ! \         P                  ! R\         P                  ! \         P                  ! 4       \         P                  ! 4       4      4      .4      p\         P                  ! \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      .4      p\         P                  ! WV.4      p\         P                  ! \         P                  ! R \         P                  ! 4       4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P
                  ! \         P                  ! 4       4      4      \         P                  ! R\         P                  ! 4       4      \         P                  ! R\         P                  ! \         P                  ! 4       \         P                  ! 4       4      4      .4      pVP                  V4      '       g   Q h\        P                  ! \         P                  4      ;_uu_ 4        \         P                  ! W.4       RRR4       \         P                  ! WV34      pVP                  V4      '       g   Q h\         P                  ! W.RR7      pVP                  V4      '       g   Q h\        P                  ! \        4      ;_uu_ 4        \         P                  ! V ^.4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r   r   r   r   quuxN
permissive)promote_options)r
   r   rF   r   r4   r7   r   r*   r   r   unify_schemasr   r   r   ArrowTypeErrorr	   )r   r   cdr}   rc   s         r   test_schema_merger;    s   
		

#
		$
+, 	A
 			

#

# 	A 			
rxxz299;?@ 	A 			

#

# 	A
 qQi(Fyy

#
		$
+,

#
rxxz299;?@ H ==""""	r((	)	)
!  
* qQi(F==""""qflCF== 
y	!	!
!Q  
"	! 
*	) 
"	!	!s   P!>P4!P1	4Q	c                      R p Rp\         P                  ! \         P                  ! R\         P                  ! 4       RV /R7      .RV/R7      pR\	        V4      9   g   Q hR\	        V4      9   g   Q hR# )s   abcdef s   ghijkl intsr   r   abcdefghijklN)r
   r   rF   r   r   )data1data2r   s      r   test_undecodable_metadatarB    sd    EEYY	&"((*u~	>?!F s6{"""s6{"""r   )6collectionsr   r/  r   r   numpyr$   ImportErrorpyarrowr
   pyarrow.tests.utiltestsutilr@   pyarrow.vendored.versionr   r#  r&   r   r   markr>   	processesrC   rJ   rM   rd   rf   rj   rq   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r-  r2  r;  rB  rB   r   r   <module>rM     s  $ $ 
    & & ,	
 !: !:H -  -
.+2\
* '8 '8T6
EP#(*6@F(0)$0,!0#6*(!2"j&& " "(;(!V#w  	B  		s"   D D% 	D"!D"%D/.D/