
    gS&                        d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
Z
g dZi ddd	dd
 ej                  d
      d ej                  d      ddddddddddddddd ej                  d      ddddddd ej                  d      ddi ddddddddddddd dd!dd"dd#dd$dd% ej                  d%      d&dd'dd( e       d)dd* ej                  d*      Ze
j                  d+k(  rded<   ded!<   ded&<   e
j                  d,k(  r e	       ed)<   n-e
j                  d+k(  rej                  j!                  d-      ed)<   	 d dlZded<   	 d dlZded<   	 d dlZded<   	 d dlZded<   	 d dlZded<   	 d dlZe
j                  d,k(  rded<   ned)   ed<   	 d dlZded<   	 d dlZded<   	 d dlZded<   	 d dlZded <   	 d dlZded<   	 d d.lmZ ded	<   	 d d/lmZ ded<   	 d d0lm Z  ded#<   	 d d1lm!Z! ded<   	 d dl"Zded'<   d2 Z# e jH                  d3      d4        Z% e jH                  d3      d5        Z& e jH                  d67      d8        Z' e jH                  d67      d9        Z( e jH                  d67      d:        Z)y# e$ r Y ?w xY w# e$ r Y Aw xY w# e$ r Y Cw xY w# e$ r Y Ew xY w# e$ r Y Gw xY w# e$ r Y 1w xY w# e$ r	 ded<   Y 8w xY w# e$ r	 ded<   Y ?w xY w# e$ r Y Aw xY w# e$ r Y Cw xY w# e$ r Y Ew xY w# e$ r Y Ew xY w# e$ r Y Ew xY w# e$ r Y Ew xY w# e$ r Y Ew xY w# e$ r Y Gw xY w);    N)Codec)fs)is_threading_enabled)windows_has_tzdata)"aceroazurebrotlibz2cythondataset
hypothesisfastparquetflightgandivagcsgdbgziphdfslarge_memorylz4memory_leaknopandasnonumpynumpyorcpandasparquetparquet_encryption	processesrequires_testing_datas3slowsnappysockets	substrait	threadingtimezone_datazstdr   Fr   r	   r
   r   r   r   r   r   r   r   Tr   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   
emscriptenwin32z/usr/share/zoneinfo)AzureFileSystem)GcsFileSystemS3FileSystem)HadoopFileSystemc                    |j                   j                  rdt        |       v ryg d}|D ]*  }dj                  |      t        |       v s t        |   r* y dt        |       v r
t        d   sydt        |       v r	 dd l}y	d
t        |       v r	 ddlm} y	t        |j                   dd	      rdt        |       v rydt        |       v ryy	# t        $ r Y yw xY w# t        $ r Y yw xY w)Nz/pyarrow/tests/T)r   r   r   r   r%   z
pyarrow/{}zpyarrow/parquet/encryptionr   zpyarrow/cudar   Fz
pyarrow/fsr-   doctest_cythonz/pyarrow/_parquet_encryption)
optiondoctestmodulesstrformatdefaultspyarrow.cudaImportError
pyarrow.fsr.   getattr)pathconfigdoctest_groupsgrouppyarrowr.   s         E/var/www/openai/venv/lib/python3.12/site-packages/pyarrow/conftest.pypytest_ignore_collectrA      s    }}##D	)
 $E""5)SY6 $
 (3t9401SY&# 3t9$3 v}}.6D	))SY6!    s$   =C C 	CC	C&%C&)autousec              #     K   | j                   j                  j                  }t        | j                   j                  dd      }|s|r/| j	                  d      }|j                         5  d  d d d        y d  y # 1 sw Y   y xY ww)Nr1   Ftmpdir)r<   r2   r3   r:   getfixturevalueas_cwd)request	doctest_m	doctest_crD   s       r@   _docdirrJ     sn      %%44I--/?GII ((2 ]]_ _ 		 _s   A'B)A<.B<BBc              #     K   |j                   j                  j                  }t        |j                   j                  dd      }|s|rwt        | d<   t	        j
                         }|dz  }|j                  t        |            5 }|j                  d       d d d        || d<   t        |      | d<   t        |      | d<   d  y # 1 sw Y   /xY ww)	Nr1   Fr   zpyarrow-fs-example.dats   datalocal
local_pathr;   )	r<   r2   r3   r:   r   LocalFileSystemopen_output_streamr4   write)doctest_namespacerG   tmp_pathrH   rI   rL   r;   streams           r@   add_fsrT   !  s      %%44I--/?GII"$$ ""$22%%c$i0FLL! 1%*'"*-h-,'$'I&!	 10s   BCC.CC	Csession)scopec                      ddl m fd} d}ddd}j                  | ||dt        j                         it        j                                | |fS )	z+
    Register a unary scalar function.
    r   computec                 D    j                  d|dg| j                        S )Nadd   )memory_pool)call_functionr]   )ctxxpcs     r@   unary_functionz*unary_func_fixture.<locals>.unary_function?  s*    1v,/OO   = 	=    zy=x+1zadd functionztest add functionsummarydescriptionarray)r?   rY   register_scalar_functionpaint64)rb   	func_name	unary_docra   s      @r@   unary_func_fixturerm   8  s[    
 &= I* 35I ) )!("((* 5 "
	,
 9$$rc   c                      ddl m}  ddlfd}d}ddd}| j                  |||d	t	        j
                         it	        j
                                ||fS )
z4
    Register a unary aggregate function (mean)
    r   rX   Nc                 L    t        j                  j                  |            S )N)ri   scalarnanmean)r_   r`   nps     r@   funcz$unary_agg_func_fixture.<locals>.funcU  s    yyA''rc   mean_udfzy=avg(x)zfind mean of xrd   r`   )r?   rY   r   register_aggregate_functionri   float64ra   rs   rk   func_docrr   s       @r@   unary_agg_func_fixturery   M  sc    
 &( I%/1H ""4#,#+'*BJJL$% $&::<% ?rc   c                      ddl m}  ddlfd}d}ddd}| j                  |||t	        j
                         t	        j                         dt	        j                                ||fS )	z-
    Register a unary aggregate function
    r   rX   Nc                 h    d}|D ]  }|j                  |      z  } t        j                  |      S )Ng        )rq   ri   rp   )r_   argssumargrr   s       r@   rs   z&varargs_agg_func_fixture.<locals>.funco  s2    C2::c?"C yy~rc   sum_meanzVarargs aggregaterd   )r`   y)r?   rY   r   ru   ri   rj   rv   rw   s       @r@   varargs_agg_func_fixturer   g  sj    
 & I.24H ""4#,#+,.HHJ,.JJL$% $&::<% ?rc   )*pytestosr?   ri   r   r   pyarrow.libr   pyarrow.tests.utilr   sysgroupsis_availabler6   platformr;   existsr   r8   r   pyarrow.gandivapyarrow.aceropyarrow.datasetpyarrow.orcr   r   pyarrow.parquetpyarrow.parquet.encryptionpyarrow.flightr9   r+   r,   r.   r/   pyarrow.substraitrA   fixturerJ   rT   rm   ry   r    rc   r@   <module>r      s  $  	    , 1 
#
J#U#U#  e  *# 
5e$	#
 e# u# 5# e# u# 
5# 
4# Ev&# E# %# E#  
5e$!#" 5##$ %#& u'#( U)#* 
5+#, e-#. u/#0 %1#2 3#4 T5#6 	%7#8 E9#:  e  *;#< t=#> ?#@ %'A#B TC#D Ev&E#J <<< HUO!H[HY<<7 2 4H_\\\! "/D EH_	HX	"H]	HY	HW	HY
	
||w
 #?3 HXHW	HY	%%)H!"	HX	*HW	(HUO	'HTN	+HV	 H[,`  ( 
 
, i % !%( i  !2 i  !c  		  		  		  		  		  		   HZ   HY  		  		  		  		  		  		  		  		s   "	J" ,	J. 6	J:  	K 
	K !K 6	K*  	K; 
	L 	L 	L$ (L0 4L<  M M 	M  "J+*J+.J76J7:KKKKKKK'&K'*
K87K8;
L	L	LLL! L!$L-,L-0L98L9<MMMMMM M)(M)