
    <c                       d dl mZ d dlmZ d dlZd dlZd dlZd dlmZm	Z	 d dl
Z
d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ ej        d          dk    s
J d            g dZ ej        d	ed 
          Z ej        dg dd 
          Zi ej        dej        dej        dej        dej        dej        dej        dej        dej         dej!        dej"        dej#        dej$        dej%        dej&        dej'        dej(        dej)        dej*        dej+        diZ, edd          Z-ej.         e-dd           ej/         e-dd          ej0         e-dd          ej1         e-d d!          iZ2d" Z3d# Z4 e            d$             Z5dd%Z6d& Z7d' Z8 e9d(          d) e9d*          d+ e9d,          d- e9d.          d/ e9d0          d1iZ: e;d d2          D ]Z<e<e:vr	d3e<d4e:e<<   d5 Z=dd6Z>dd7Z?d8 Z@d9 ZAd: ZBd; ZCd< ZDd= ZEd> ZFd? ZG ejH        d@dd          I                                ZJdA ZKdB ZLdC ZMdD ZNdE ZOdF ZP G dG dH          ZQ G dI dJ          ZR G dK dL          ZS G dM dN          ZT G dO dP          ZU G dQ dRe          ZV G dS dTeV          ZW G dU dVeV          ZX G dW dX          ZY G dY dZeY          ZZ G d[ d\          Z[ G d] d^          Z\ G d_ d`e[          Z] G da dbe          Z^ G dc dde          Z_ G de dfe          Z` G dg dhe          Za G di dje_          Zb edkdl          Zc G dm dne          Zd G do dpe          Ze edqdr          Zf efdsdt           efdudv          dwZg G dx dy          Zh G dz d{eh          Zi G d| d}eh          ZjeiejdwZkd~ ekl                                D             Zm G d d          Zn G d d          Zo G d d          Zp G d d          Zqi ddddddddddddddddddddddddddddddddddi ddddddddddddddddddddddddddddēddƓddȓddʓddddΜZr G dτ dЦ          Zs G dф des          Zt G dӄ des          Zu G dՄ deu          Zv G dׄ des          Zw G dل des          Zx G dۄ des          Zy G d݄ dey          Zz G d߄ dey          Z{ G d des          Z| G d des          Z} G d des          Z~ G d des          Z G d d          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d d e          Z G d de          Z G d de          Z G d de          Z G d de          Z G d	 d
e          Z G d de          Z G d d          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d d e          Z G d! d"e          Z G d# d$e          Z G d% d&e          Z G d' d(          Z G d) d*          Z G d+ d,          Z G d- d.e          Z G d/ d0e          Z G d1 d2e          Z G d3 d4e          Z G d5 d6e          Z G d7 d8e          Z G d9 d:e          Z G d; d<e          Z G d= d>e          Z G d? d@e          Z G dA dBe          Z G dC dDe          Z G dE dFe          Z G dG dHe          Z G dI dJe          Z G dK dLe          Z G dM dNe          Z G dO dPe          Z G dQ dRe          Z G dS dTe          Z G dU dVe          Z G dW dXe          Z edYdZ          Zi ej         eed          ej         eed          ej         eed          ej         eed          ej         eed          ej         eed          ej         eed          ej         eed          ej         eed          ej         eed          ej          eed          ej!         eed          ej"         eed          ej         eed          ej         eed          ej         eed          ej         eed          i ej         eed          ej#         eed          ej$         eed          ej+         eed          ej%         eed          ej&         eed          ej*         eed          ej(         eed          ej'         eed          ej)         eed          ej         eed          ej         eed          ej         eed          ej         eedæ          ej         eedŦ          ej         eedǦ          ej         eedɦ          ej         eed[          ej         eed\          ej         eed]          ej         eed          iZ ee˦          dz
  Z͐d^ Z G d_ d`          Z G da dbeϦ          Z G dc dd          Z G de df          Z G dg dh          Z G di dj          Z G dk dleԦ          Z G dm dneԦ          Z G do dp          Z G dq dr          Z G ds dt          Z G du dv          Z G dw dx          Zi dyedz e	eds          d{ e	edu          d|ed}eדd~eٓd e	eds          d e	edu          deړdeѓdeғdeՓdeГdeӓdeՓde֓deϓdeiZܐd Zݐd Zeߐdk    r eަ             dS dS (      )
namedtuple)SequenceN)	lru_cachepartial)get_basic_type   z#Arrow GDB extension needs Python 3+)&NABOOLUINT8INT8UINT16INT16UINT32INT32UINT64INT64
HALF_FLOATFLOATDOUBLESTRINGBINARYFIXED_SIZE_BINARYDATE32DATE64	TIMESTAMPTIME32TIME64INTERVAL_MONTHSINTERVAL_DAY_TIME
DECIMAL128
DECIMAL256LISTSTRUCTSPARSE_UNIONDENSE_UNION
DICTIONARYMAP	EXTENSIONFIXED_SIZE_LISTDURATIONLARGE_STRINGLARGE_BINARY
LARGE_LISTINTERVAL_MONTH_DAY_NANOType)startTimeUnit)SECONDMILLIMICRONANObhiqBHIQefdiiiiqTimeUnitTraits)
multiplierfractional_digits   i  i@B    i ʚ;	   c                     | S N )vs    share/arrow/gdb/gdb_arrow.pyidentityrN   [   s    H    c                 L    | t           j        t           j        t           j        fvS rJ   )r/   r	   r$   r%   )type_ids    rM   has_null_bitmaprR   _   s    47D$5t7GHHHrO   c                      t          j        dd                                          } d| v rdS d| v rdS t          j        d|  d           t
          j        S )zA
    Get the target program (not the GDB host's) endianness.
    zshow endianT)	to_stringbiglittlez>Could not determine target endianness from GDB's response:
"""z""")gdbexecutestripwarningswarnsys	byteorder)ss    rM   
byte_orderr_   c   su    
 	MT22288::Azzu	QxM 6/06 6 6 7 7 7 =rO   c                    |t          | j                  }t          |          }d|v r|                    d          sd| }|j        t
          j        k    r	d| d|  dS | j        t          d|            d| d| j         dS )	zS
    Return a parsable form of gdb.Value `val`, optionally with gdb.Type `ty`.
    Nz::z((z) (z))z Cannot further evaluate rvalue: z(* (z*) ()	r   typestr
startswithcoderW   TYPE_CODE_PTRaddress
ValueError)valtytypenames      rM   for_evaluationrk   s   s     
zCH%%2wwHx 3 3D 9 9 #??	w####(H((((((
{ACAABBB/(//////rO   c                     t          |           } | j        t          j        k    o=t          |                                           j        t          j        t          j        fv S rJ   )r   rd   rW   re   targetTYPE_CODE_CHARTYPE_CODE_INT)ri   s    rM   is_char_starrp      sO    			BGs(( ;299;;'',&(9:;<rO   c                 T   t          | j                  }|j        t          j        k    r|                                 S |j                            d          r:d|j        v rt          |           j	        S d|j        v rt          |           j	        S t          d|j         d          )z-
    Dereference a raw or smart pointer.
    zstd::shareduniquez"Cannot dereference value of type '')r   ra   rd   rW   re   dereferencenamerc   	SharedPtrvalue	UniquePtr	TypeErrorrh   ri   s     rM   derefr|      s     
	!	!B	w####   	w'"" (rwS>>''rwS>>''
CCCC
D
DDrO   \z\\
z\nz\r	z\t"z\"    z\x02xc                    d}t          | t          j                  r|                                 } t	          |           |k    r*| d|         } d|                     t                    z   dz   S d|                     t                    z   dz   S )zG
    Format a Python string or gdb.Value for display as a literal.
    2   Nr   z" [continued])
isinstancerW   Valuestringlen	translate_string_literal_mapping)r^   max_lens     rM   string_literalr      s     G!SY HHJJ
1vvhwhKQ[[!8999OKKQ[[!8999C??rO   c                 R    |                      |                                          S )ze
    Format a gdb.Value for display as a literal containing possibly
    unprintable characters.
    length)lazy_stringrx   )rh   sizes     rM   bytes_literalr      s$    
 ??$?''--///rO   c                     ||                      dd          }n!|dk    r|                      dd|          }nd}t          |          S )z<
    Format a gdb.Value for display as a utf-8 literal.
    Nutf8backslashreplace)encodingerrorsr   )r   r   r    )r   r   )rh   r   r^   s      rM   utf8_literalr      sW     |JJ/AJBB	JJ/A$JOO!rO   c                     t          j                                        | j        d          }t	          j        d|          d         S )zb
    Return a Python float of the given half-float (represented as a uint64_t
    gdb.Value).
       r>   r   )rW   selected_inferiorread_memoryrf   structunpack)rh   bufs     rM   half_float_valuer      s;    
 

!
!
-
-ck1
=
=C=c""1%%rO   c                     | j                             d          }| j                            |                                                                          S )z(
    Load a std::atomic<T>'s value.
    r   )ra   template_argumentrf   reinterpret_castpointerru   )rh   valtys     rM   load_atomicr      sC     H&&q))E;''88DDFFFrO   c                 r    t          | j                  j        t          j        k    rt          |           } | S )zR
    Load a null count from a gdb.Value of an integer (either atomic or not).
    )r   ra   rd   rW   ro   r   rh   s    rM   load_null_countr      s1     ch$(999#JrO   c                 ~    t          | t                    st          t          |                     }|dk    rd| ndS )z$
    Format a null count value.
    znull count zunknown null count)r   intr   )rh   
null_counts     rM   format_null_countr      sL     c3 /--..
*4*:*:&*&&&%'rO   c                 0    g dt          |                    S )N)r^   msusnsr   r   s    rM   short_time_unitr      s    """3s88,,rO   c                 &    t          |            dS )z'
    Format a MonthInterval value.
    Mr   r   s    rM   format_month_intervalr      s     #hh>>>rO   c                     |  d| dS )Nr@   r   rK   )daysmillisecondss     rM   format_days_millisecondsr      s    %%\%%%%rO   c                     |  d| d| dS )Nr   r@   r   rK   )monthsr   nanoss      rM   format_months_days_nanosr     s!    ''t''e''''rO   i  c                     t          |           } 	 t          j                            | t          z             }|  d| dS # t
          $ r |  dcY S w xY w)z 
    Format a date32 value.
    zd []zd [year <= 0])r   datetimedatefromordinal
_date_baserg   )rh   decodeds     rM   format_date32r     sy     c((C%-++C*,<== $$'$$$$  % % %$$$$$$%s   'A   AAc                     t          |           } t          | d          \  }}|r|  dS 	 t          j                            |t
          z             }|  d| dS # t          $ r |  dcY S w xY w)z 
    Format a date64 value.
    i \&zms [non-multiple of 86400000]zms [r   zms [year <= 0])r   divmodr   r   r   r   rg   )rh   r   	remainderr   s       rM   format_date64r     s     c((CS,//OD) 54444&-++D:,=>> %%7%%%%  & & &%%%%%%&s   'A A,+A,c                    t          |           } t          |          }t          |          }t          |         }t          | |j                  \  }}	 t
          j                            |          }|                                                    dd          }|j	        dk    r|d|d|j	         dz  }n# t          t          f$ r d}Y nw xY w|  | d| d	S )
z#
    Format a timestamp value.
    T r   .0r@   ztoo large to represent [r   )r   r   time_unit_traitsr   rD   r   utcfromtimestamp	isoformatreplacerE   rg   OSError)rh   unit
short_unittraitsseconds
subsecondsdtprettys           rM   format_timestampr   (  s     c((Ct99D &&Jd#F f&788GZD//88 ''S11#a''C*Cv'?CCCCCCF   * * *)* *:******s   B9 9CCc                     |                                                      |                                                                          S rJ   )reference_valuer   	referencereferenced_valuer{   s     rM   cast_to_concreter   <  s8    !!222<<>>BB!rO   c                 J    |                      d          sJ | dd         dz   S )zs
    Given a DataTypeClass class name (such as "BooleanType"), return the
    corresponding Scalar class name.
    r/   NScalarendswithrv   s    rM   scalar_class_from_typer   A  s/    
 ==     9xrO   c                 J    |                      d          sJ | dd         dz   S )zr
    Given a DataTypeClass class name (such as "BooleanType"), return the
    corresponding Array class name.
    r/   Nr   Arrayr   r   s    rM   array_class_from_typer   J  s/    
 ==     9wrO   c                   L    e Zd ZdZd Zd Zed             Zd Zd Z	d Z
d Zd	S )
CStringz+
    A `const char*` or similar value.
    c                     || _         d S rJ   r   selfrh   s     rM   __init__zCString.__init__X      rO   c                 n    t          t                    dk    ot          t          d                   dk    S Nr   )r   datar   s    rM   __bool__zCString.__bool__[  s&    4yyA~3#d1g,,!"33rO   c                     | j         S rJ   r   r   s    rM   r   zCString.data^  s	    xrO   c                 X    | j                                                                         S rJ   )rh   r   rx   r   s    rM   r   zCString.bytes_literalb  s"    x##%%++---rO   c                 *    t          | j                  S rJ   )r   rh   r   s    rM   r   zCString.string_literale  s    dh'''rO   c                 4    | j                                         S rJ   )rh   r   r   s    rM   r   zCString.stringi  s    x   rO   c                 D    t          |                                           S rJ   rb   r   r   fmts     rM   
__format__zCString.__format__l      4%%''(((rO   N)__name__
__module____qualname____doc__r   r   propertyr   r   r   r   r  rK   rO   rM   r   r   S  s           4 4 4   X. . .( ( (! ! !) ) ) ) )rO   r   c                   4    e Zd ZdZd Zd Zed             ZdS )rw   z'
    A `std::shared_ptr<T>` value.
    c                     || _         	 |d         | _        d S # t          j        $ r- t          j        t          |           d          | _        Y d S w xY w)N_M_ptrz.get())rh   _ptrrW   errorparse_and_evalrk   r   s     rM   r   zSharedPtr.__init__z  sh    	KHDIIIy 	K 	K 	K*nS.A.A+I+I+IJJDIIII	Ks    8AAc                     | j         S z7
        Return the underlying pointer (a T*).
        r  r   s    rM   getzSharedPtr.get       yrO   c                 4    | j                                         S z-
        The underlying value (a T).
        r  ru   r   s    rM   rx   zSharedPtr.value      
 y$$&&&rO   Nr  r  r  r	  r   r  r
  rx   rK   rO   rM   rw   rw   u  sZ         K K K   ' ' X' ' 'rO   rw   c                   4    e Zd ZdZd Zd Zed             ZdS )ry   z'
    A `std::unique_ptr<T>` value.
    c                     || _         | j         j                            d          }| j         j                            |                                                                          | _        d S r   )rh   ra   r   rf   r   r   r  )r   rh   ri   s      rM   r   zUniquePtr.__init__  sT    X],,Q// H$55bjjll6J6J6L6LMM			rO   c                     | j         S r  r  r   s    rM   r  zUniquePtr.get  r  rO   c                 4    | j                                         S r  r  r   s    rM   rx   zUniquePtr.value  r  rO   Nr  rK   rO   rM   ry   ry     sZ         N N N   ' ' X' ' 'rO   ry   c                   .    e Zd ZdZd Zed             ZdS )Variantz 
    A `std::variant<...>`.
    c                 2   || _         	 |d         | _        n># t          j        $ r, t          j        t          |           d          | _        Y nw xY w	 | j         j                            | j                  | _        d S # t          $ r d | _        Y d S w xY w)N_M_indexz.index())
rh   indexrW   r  r  rk   ra   r   
value_typeRuntimeErrorr   s     rM   r   zVariant.__init__  s    	NZDJJy 	N 	N 	N+~c/B/B,L,L,LMMDJJJ	N	#"hm==djIIDOOO 	# 	# 	#"DOOOO	#s!    8AA)B BBc                     | j         d S | j        j        }|>|                    | j                                                                                   S d S rJ   )r$  rh   rf   r   r   ru   )r   ptrs     rM   rx   zVariant.value  sT    ?"4h?''(?(?(A(A * **5+--8trO   N)r  r  r  r	  r   r
  rx   rK   rO   rM   r   r     sH         # # #   X  rO   r   c                   b    e Zd ZdZd Zd Zed             Zed             Zd Z	d Z
d Zd	 Zd
S )	StdStringzA
    A `std::string` (or possibly `std::string_view`) value.
    c                 &   || _         	 |d         d         | _        |d         | _        d S # t          j        $ rV t          j        t          |           d          | _        t          j        t          |           d          | _        Y d S w xY w)N_M_dataplus_M_p_M_string_lengthz.c_str().size())rh   _data_sizerW   r  r  rk   r   s     rM   r   zStdString.__init__  s    	M]+F3DJ/0DJJJy 	M 	M 	M+~c/B/B,L,L,LMMDJ+~c/B/B,K,K,KLLDJJJJ	Ms    + A!BBc                     | j         dk    S r   r0  r   s    rM   r   zStdString.__bool__  s    zQrO   c                     | j         S rJ   )r/  r   s    rM   r   zStdString.data  
    zrO   c                     | j         S rJ   r2  r   s    rM   r   zStdString.size  r4  rO   c                 f    | j                             | j                                                  S )Nr   )r/  r   r0  rx   r   s    rM   r   zStdString.bytes_literal  s)    z%%TZ%88>>@@@rO   c                 *    t          | j                  S rJ   )r   r/  r   s    rM   r   zStdString.string_literal  s    dj)))rO   c                 4    | j                                         S rJ   )r/  r   r   s    rM   r   zStdString.string  s    z  """rO   c                 D    t          |                                           S rJ   r  r  s     rM   r  zStdString.__format__  r  rO   N)r  r  r  r	  r   r   r
  r   r   r   r   r   r  rK   rO   rM   r)  r)    s         	M 	M 	M     X   XA A A* * *# # #) ) ) ) )rO   r)  c                   L    e Zd ZdZd Zd Zd Zd Zd Zd Z	e
d             Zd	S )
	StdVectorz#
    A `std::vector<T>` value.
    c                    || _         	 | j         d         }|d         | _        t          |d         | j        z
            | _        d S # t          j        $ rz t          t	          j        t          | j                    d                    | _        t          t	          j        t          | j                    d                    | _        Y d S w xY w)N_M_impl_M_start	_M_finishz.data()r.  )rh   r/  r   r0  rW   r  r  rk   r   rh   impls      rM   r   zStdVector.__init__  s    
	78I&Dj)DJT+.;<<DJJJy 	7 	7 	7S/!$(++4446 6 7 7DJS/!$(++4446 6 7 7DJJJJ		7s   <A BCCc                 d    |dk     s|| j         k    rt          d| d| j         dz
   d          d S )Nr   zIndex z! out of bounds (should be in [0, rF   z]))r0  
IndexErrorr   r#  s     rM   _check_indexzStdVector._check_index  sP    199++SSSaSSSU U U ,+rO   c                     | j         S rJ   r2  r   s    rM   __len__zStdVector.__len__
  s
    zrO   c                 F    |                      |           | j        |         S rJ   )rE  r/  rD  s     rM   __getitem__zStdVector.__getitem__  s#    %   z%  rO   c                     |                      |           t          j        |                    t	          | j        |                                       S )z
        Run `eval_format` with the value at `index`.

        For example, if `eval_format` is "{}.get()", this will evaluate
        "{self[index]}.get()".
        )rE  rW   r  formatrk   r/  )r   r#  eval_formats      rM   eval_atzStdVector.eval_at  sP     	%   !~dj.?@@AAC C 	CrO   c           	   #      K   t          | j                  }t          | j                  D ]1}t	          j        |                    | d| d                    V  2d S )N[r   )rk   r/  ranger0  rW   r  rK  )r   rL  	data_evalr8   s       rM   	iter_evalzStdVector.iter_eval  s~      "4:..	tz"" 	9 	9A$""i#6#6!#6#6#6779 9 9 9 9 9	9 	9rO   c                     | j         S rJ   r2  r   s    rM   r   zStdVector.size"  r4  rO   N)r  r  r  r	  r   rE  rG  rI  rM  rR  r
  r   rK   rO   rM   r;  r;    s         7 7 7U U U
  ! ! !	C 	C 	C9 9 9   X  rO   r;  c                        e Zd Z fdZ xZS )StdPtrVectorc                 `    t          t                                          |                    S rJ   )r|   superrI  r   r#  	__class__s     rM   rI  zStdPtrVector.__getitem__)  s#    UWW((//000rO   )r  r  r  rI  __classcell__rY  s   @rM   rU  rU  '  s8        1 1 1 1 1 1 1 1 1rO   rU  c                   $     e Zd Z fdZd Z xZS )FieldVectorc                 z    t          t          t                                          |                              S )z=
        Dereference the Field object at this index.
        )Fieldr|   rW  rI  rX  s     rM   rI  zFieldVector.__getitem__/  s-     U577..u5566777rO   c                       fdt          t                               D             }dd                    |          z   dz   S )Nc                 :    g | ]}t          |                   S rK   rb   ).0r8   r   s     rM   
<listcomp>z'FieldVector.__str__.<locals>.<listcomp>6  s#    444aSa\\444rO   {, })rP  r   join)r   ls   ` rM   __str__zFieldVector.__str__5  sD    44445T#3#3444TYYq\\!C''rO   )r  r  r  rI  rj  rZ  r[  s   @rM   r]  r]  -  sG        8 8 8 8 8( ( ( ( ( ( (rO   r]  c                   `    e Zd ZdZd Zed             Zed             Zed             Zd Z	dS )r_  z
    A arrow::Field value.
    c                     || _         d S rJ   r   r   s     rM   r   zField.__init__?  r   rO   c                 6    t          | j        d                   S )Nname_)r)  rh   r   s    rM   rv   z
Field.nameB  s    '*+++rO   c                 6    t          | j        d                   S )Ntype_r|   rh   r   s    rM   ra   z
Field.typeF  s    TXg&'''rO   c                 6    t          | j        d                   S )N	nullable_)boolrh   r   s    rM   nullablezField.nullableJ  s    DH[)***rO   c                 *    t          | j                  S rJ   )rb   rh   r   s    rM   rj  zField.__str__N  s    48}}rO   N)
r  r  r  r	  r   r
  rv   ra   ru  rj  rK   rO   rM   r_  r_  :  s            , , X, ( ( X( + + X+    rO   r_  c                   "     e Zd ZdZ fdZ xZS )FieldPtrz0
    A std::shared_ptr<arrow::Field> value.
    c                 d    t                                          t          |                     d S rJ   )rW  r   r|   )r   rh   rY  s     rM   r   zFieldPtr.__init__W  s'    s$$$$$rO   )r  r  r  r	  r   rZ  r[  s   @rM   rx  rx  R  sB         % % % % % % % % %rO   rx  c                   @    e Zd ZdZd Zed             Zd ZddZeZ	dS )	Bufferz 
    A arrow::Buffer value.
    c                 H    || _         t          |d                   | _        d S )Nsize_)rh   r   r   r   s     rM   r   zBuffer.__init__`  s     G%%			rO   c                     | j         d         S )Ndata_r   r   s    rM   r   zBuffer.datad  s    x  rO   c                     | j         dk    r8| j        d                             | j                                                   S dS )Nr   r  r   "")r   rh   r   rx   r   s    rM   r   zBuffer.bytes_literalh  s>    9q==8G$00	0BBHHJJJ4rO   r   Nc                     | j         dk    rD|| j         }t          j                                        | j        d         |z   | j                   }nt          d          }|                    d          S )z>
        Return a view over the bytes of this buffer.
        r   Nr  rO   r:   )r   rW   r   r   rh   
memoryviewcast)r   offsetr   mems       rM   
bytes_viewzBuffer.bytes_viewn  sm     9q==~'))55!F*DI7 7CC S//C xx}}rO   r   N)
r  r  r  r	  r   r
  r   r   r  viewrK   rO   rM   r{  r{  [  sl         & & & ! ! X!      DDDrO   r{  c                   J    e Zd ZdZd Zed             Zed             Zd ZdS )	BufferPtrz1
    A arrow::Buffer* value (possibly null).
    c                     || _         t          | j                   }|dk    r!t          |                                          nd | _        d S r   )rh   r   r{  ru   r   )r   rh   r'  s      rM   r   zBufferPtr.__init__  s@    $(mm03q6#//++,,,drO   c                 ,    | j         d S | j         j        S rJ   )r   r   r   s    rM   r   zBufferPtr.data      84x}rO   c                 ,    | j         d S | j         j        S rJ   )r   r   r   s    rM   r   zBufferPtr.size  r  rO   c                 F    | j         d S | j                                         S rJ   )r   r   r   s    rM   r   zBufferPtr.bytes_literal  s#    84x%%'''rO   N)	r  r  r  r	  r   r
  r   r   r   rK   rO   rM   r  r    su         C C C
   X
   X
( ( ( ( (rO   r  c                   j     e Zd ZdZ e            Z fdZed             ZddZ	e
d             Z xZS )	TypedBufferzE
    A buffer containing values of a given a struct format code.
    c                     t                                          |           || _        | j        s#t	          j        d| j        z             | _        d S d S N=)rW  r   
mem_format
is_booleanr   calcsize
byte_width)r   rh   r  rY  s      rM   r   zTypedBuffer.__init__  sU    $ 	E$ocDO.CDDDOOO	E 	ErO   c                     t          |t                    sJ |t          j        k    r| j        }nt
          |         } | ||          S rJ   )r   r   r/   r
   _boolean_formattype_id_to_struct_code)clsrh   rQ   r  s       rM   from_type_idzTypedBuffer.from_type_id  sK    '3'''''di,JJ/8Js3
###rO   r   Nc                     | j         rt                              | ||          S || j        z  }||                     ||| j        z            }n|                     |          }t          || j                  S )z
        Return a view over the primitive values in this buffer.

        The optional `offset` and `length` are expressed in primitive values,
        not bytes.
        )r  Bitmapfrom_bufferr  r  	TypedViewr  )r   r  r   byte_offsetr  s        rM   r  zTypedBuffer.view  sw     ? 	<%%dFF;;;t.//+v/GHHCC//+..Cdo...rO   c                     | j         | j        u S rJ   )r  r  r   s    rM   r  zTypedBuffer.is_boolean  s    $"666rO   r  )r  r  r  r	  objectr  r   classmethodr  r  r
  r  rZ  r[  s   @rM   r  r    s          fhhOE E E E E $ $ [$/ / / /" 7 7 X7 7 7 7 7rO   r  c                   *    e Zd ZdZd Zd Zd Zd ZdS )r  zh
    View a bytes-compatible object as a sequence of objects described
    by a struct format code.
    c                     t          |t                    sJ || _        || _        t	          j        d|z             | _        |j        | j        z  | _        d S r  )	r   r  r  r  r   r  r  nbytesr   )r   r  r  s      rM   r   zTypedView.__init__  sP    #z*****$ /#
*:;;jDO3rO   c                 L    d|cxk    r| j         k     sn t          d          d S Nr   zWrong index for bitmapr   rC  rD  s     rM   rE  zTypedView._check_index  :    E''''DK''''5666 ('rO   c                     | j         S rJ   r   r   s    rM   rG  zTypedView.__len__  
    {rO   c                     |                      |           | j        }| j        ||z  |dz   |z           }t          j        d| j        z   |          S )NrF   r  )rE  r  r  r   r   r  )r   r#  wr  s       rM   rI  zTypedView.__getitem__  sU    %   O huqy%!)q01}S4?2C888rO   N)r  r  r  r	  r   rE  rG  rI  rK   rO   rM   r  r    sZ         
4 4 47 7 7  9 9 9 9 9rO   r  c                   H    e Zd ZdZg dZd Zd Zd Zd Ze	d             Z
dS )	r  z@
    View a bytes-compatible object as a sequence of bools.
    )rF   r            r   @      c                 0    || _         || _        || _        d S rJ   )r  r  r   )r   r  r  r   s       rM   r   zBitmap.__init__  s    	rO   c                 L    d|cxk    r| j         k     sn t          d          d S r  r  rD  s     rM   rE  zBitmap._check_index  r  rO   c                     | j         S rJ   r   r   s    rM   rG  zBitmap.__len__  r  rO   c                     |                      |           || j        z  }t          |d          \  }}| j        |         }|| j        |         z  dk    S )Nr  r   )rE  r  r   r  _masks)r   r#  
byte_index	bit_indexbytes        rM   rI  zBitmap.__getitem__  sY    %    &ua 0 0
Iy$dk),,11rO   c                     t          |t                    sJ t          |d          \  }}t          j        ||dz  z             |z
  } | |                    ||          ||          S )Nr  )r   r{  r   mathceilr  )r  r   r  r   r  
bit_offsetbyte_lengths          rM   r  zBitmap.from_buffer  sr    #v&&&&&"("3"3Zi! 344{Bs3>>+{;;v' ' 	'rO   N)r  r  r  r	  r  r   rE  rG  rI  r  r  rK   rO   rM   r  r    s          :99F  
7 7 7  2 2 2 ' ' [' ' 'rO   r  c                        e Zd Zd Zd Zd ZdS )
MappedViewc                 "    || _         || _        d S rJ   r  funcr   r  r  s      rM   r   zMappedView.__init__      				rO   c                 *    t          | j                  S rJ   r   r  r   s    rM   rG  zMappedView.__len__      49~~rO   c                 B    |                      | j        |                   S rJ   r  r  rD  s     rM   rI  zMappedView.__getitem__  s    yy5)***rO   Nr  r  r  r   rG  rI  rK   rO   rM   r  r    sA            + + + + +rO   r  c                        e Zd Zd Zd Zd ZdS )StarMappedViewc                 "    || _         || _        d S rJ   r  r  s      rM   r   zStarMappedView.__init__  r  rO   c                 *    t          | j                  S rJ   r  r   s    rM   rG  zStarMappedView.__len__  r  rO   c                 ,     | j         | j        |          S rJ   r  rD  s     rM   rI  zStarMappedView.__getitem__  s    ty$)E*++rO   Nr  rK   rO   rM   r  r    sA            , , , , ,rO   r  c                   8     e Zd Z fdZe fd            Z xZS )
NullBitmapc                     |                      |           | j        dS t                                          |          S )NT)rE  r  rW  rI  rX  s     rM   rI  zNullBitmap.__getitem__"  s<    %   94ww""5)))rO   c                 h    | | |||          S t                                          |||          S )zu
        Create a null bitmap from a Buffer (or None if missing,
        in which case all values are True).
        )rW  r  )r  r   r  r   rY  s       rM   r  zNullBitmap.from_buffer(  s:     ;3sFF+++ww""3777rO   )r  r  r  rI  r  r  rZ  r[  s   @rM   r  r     s]        * * * * * 8 8 8 8 [8 8 8 8 8rO   r  KeyValue)keyrx   c                   $    e Zd ZdZd Zd Zd ZdS )Metadataz*
    A arrow::KeyValueMetadata value.
    c                     || _         t          | j         d                   | _        t          | j         d                   | _        d S )Nkeys_values_)rh   r;  keysvaluesr   s     rM   r   zMetadata.__init__;  s9    dhw/00	 344rO   c                 *    t          | j                  S rJ   )r   r  r   s    rM   rG  zMetadata.__len__@  r  rO   c                     t          t          | j        |                   t          | j        |                             S rJ   )r  r)  r  r  r   r8   s     rM   rI  zMetadata.__getitem__C  s.    	$)A,//4;q>1J1JKKKrO   Nr  r  r  r	  r   rG  rI  rK   rO   rM   r  r  6  sP         5 5 5
  L L L L LrO   r  c                   $    e Zd ZdZd Zd Zd ZdS )MetadataPtrzE
    A shared_ptr<arrow::KeyValueMetadata> value, possibly null.
    c                     t          |                                          | _        t          | j                  dk    | _        | j        rd n%t          | j                                                  | _        d S r   )rw   r  r'  r   is_nullr  ru   mdr   s     rM   r   zMetadataPtr.__init__L  s[    S>>%%''48}}),L$$HTX5I5I5K5K,L,LrO   c                 <    | j         rdnt          | j                  S r   )r  r   r  r   s    rM   rG  zMetadataPtr.__len__Q  s    L2qqc$'ll2rO   c                 8    | j         rt          | j        |         S rJ   )r  rC  r  r  s     rM   rI  zMetadataPtr.__getitem__T  s    < 	wqzrO   Nr  rK   rO   rM   r  r  G  sN         M M M
3 3 3    rO   r  DecimalTraits)	bit_widthstruct_format_ler  Qq   QQQq)r  r  c                   f    e Zd ZdZd Zed             Zed             Zed             Z	d Z
d ZdS )	BaseDecimalz@
    Base class for arrow::BasicDecimal{128,256...} values.
    c                     || _         d S rJ   rf   )r   rf   s     rM   r   zBaseDecimal.__init__f  s    rO   c                 .     | |d         j                   S )z{
        Create a decimal from a gdb.Value representing the corresponding
        arrow::BasicDecimal{128,256...}.
        array_r  )r  rh   s     rM   
from_valuezBaseDecimal.from_valuei  s     s3x=()))rO   c                      | |          S )zp
        Create a decimal from a gdb.Value representing the address of the
        raw decimal storage.
        rK   )r  rf   s     rM   from_addresszBaseDecimal.from_addressq  s     s7||rO   c                 4   t          j                                        | j        | j        j        dz            }| j        j        }t                      dk    r|ddd         }t          j	        d| |          }t                      dk    r|ddd         }|S )zD
        The decimal words, from least to most significant.
        r  rU   Nr   r  )
rW   r   r   rf   r   r  r  r_   r   r   )r   r  r  wordss       rM   r  zBaseDecimal.wordsy  s    
 #%%11$,26+2G12LN Nk*<<5  ddd)Ci#ii--<<5  $$B$KErO   c                     d}| j         }| j        j        t          |          z  }t	          |          D ]
}||z  |z   }|S )z.
        The underlying bigint value.
        r   )r  r   r  r   reversed)r   rL   r  bits_per_wordr  s        rM   __int__zBaseDecimal.__int__  sP     
-U;% 	) 	)Am#q(AArO   c                     t          |           }t          j                    5 }||_        d|_        t          t          j        |                              |                     cddd           S # 1 swxY w Y   dS )zP
        Format as a decimal number with the given precision and scale.
        FN)r   decimallocalcontextpreccapitalsrb   Decimalscaleb)r   	precisionscalerL   ctxs        rM   rK  zBaseDecimal.format  s     II!## 	:s CH CLwq))00%8899	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	: 	:s   AA33A7:A7N)r  r  r  r	  r   r  r  r  r
  r  r  rK  rK   rO   rM   r  r  a  s            * * [*   [   X	 	 	: : : : :rO   r  c                       e Zd Zed         ZdS )
Decimal128r  Nr  r  r  decimal_traitsr   rK   rO   rM   r  r            C FFFrO   r  c                       e Zd Zed         ZdS )
Decimal256r  Nr  rK   rO   rM   r  r    r  rO   r  c                 "    i | ]\  }}d | d|S )r	  r/   rK   )rc  bitsr  s      rM   
<dictcomp>r    s9       s d#  rO   c                   4    e Zd ZdZd Zed             Zd ZdS )ExtensionTypez!
    A arrow::ExtensionType.
    c                     || _         d S rJ   r   r   s     rM   r   zExtensionType.__init__  r   rO   c                 6    t          | j        d                   S )Nstorage_type_rq  r   s    rM   storage_typezExtensionType.storage_type  s    TXo.///rO   c                 n    t          t          j        t          | j                   d                    S )z3
        The result of calling ToString().
        z.ToString())r)  rW   r  rk   rh   r   s    rM   rT   zExtensionType.to_string  s;     +dh''4446 6 7 7 	7rO   N)r  r  r  r	  r   r
  r  rT   rK   rO   rM   r  r    sW            0 0 X07 7 7 7 7rO   r  c                       e Zd ZdZd ZdS )Schemaz
    A arrow::Schema.
    c                     || _         t          | j         d                   }t          |d                   | _        t	          |d                   | _        d S )Nimpl_fields_	metadata_)rh   r|   r]  fieldsr  metadatar@  s      rM   r   zSchema.__init__  sH    TXg&''!$y/22#D$566rO   Nr  r  r  r	  r   rK   rO   rM   r   r     s-         7 7 7 7 7rO   r   c                   .    e Zd ZdZd Zed             ZdS )RecordBatchz
    A arrow::RecordBatch.
    c                     t          |t          j        d                    | _        t	          t          | j        d                             | _        t          | j        d                   | _        d S )Narrow::SimpleRecordBatchschema_columns_	r   rW   lookup_typerh   r   r|   schemarU  columnsr   s     rM   r   zRecordBatch.__init__  s_     $C$'O4N$O$OQ QU48I#67788#DHZ$899rO   c                     | j         d         S N	num_rows_r   r   s    rM   num_rowszRecordBatch.num_rows      x$$rO   Nr  r  r  r	  r   r
  r5  rK   rO   rM   r)  r)    sH         : : : % % X% % %rO   r)  c                   .    e Zd ZdZd Zed             ZdS )Tablez
    A arrow::Table.
    c                     t          |t          j        d                    | _        t	          t          | j        d                             | _        t          | j        d                   | _        d S )Narrow::SimpleTabler,  r-  r.  r   s     rM   r   zTable.__init__  s_     $C$'O4H$I$IK KU48I#67788#DHZ$899rO   c                     | j         d         S r3  r   r   s    rM   r5  zTable.num_rows  r6  rO   Nr7  rK   rO   rM   r9  r9    sH         : : : % % X% % %rO   r9  NullTypenullBooleanTypeboolean	UInt8Typeuint8Int8Typeint8
UInt16Typeuint16	Int16Typeint16
UInt32Typeuint32	Int32Typeint32
UInt64Typeuint64	Int64Typeint64HalfFloatTypefloat16	FloatTypefloat32
DoubleTypefloat64
Date32Typedate32
Date64Typedate64
Time32Typetime32
Time64Typetime64TimestampType	timestampMonthIntervalTypemonth_intervalDayTimeIntervalTypeday_time_intervalMonthDayNanoIntervalTypemonth_day_nano_intervalDurationTypedurationDecimal128Type
decimal128Decimal256Type
decimal256
StringTyper   LargeStringType
large_utf8
BinaryTypebinaryLargeBinaryTypelarge_binaryFixedSizeBinaryTypefixed_size_binaryListTypelistLargeListType
large_listFixedSizeListTypefixed_size_listMapTypemap
StructTypestruct_sparse_uniondense_union
dictionary)SparseUnionTypeDenseUnionTypeDictionaryTypec                   :    e Zd ZdZd Zed             Zd Zd ZdS )TypePrinterzA
    Pretty-printer for arrow::DataTypeClass and subclasses.
    c                     || _         t          j        d|           | _        t	          || j                  | _        d S Narrow::)rv   rW   r/  ra   r   rh   r   rv   rh   s      rM   r   zTypePrinter.__init__$  s<    	 O$4d$4$455	#C33rO   c                 6    t          | j        d                   S )N	children_)r]  rh   r   s    rM   r%  zTypePrinter.fields+  s    48K0111rO   c                 V    t                               | j        | j                  }d| S r  )
type_reprsr  rv   )r   rs     rM   _format_typezTypePrinter._format_type/  s%    NN49di00}}rO   c                 6    t          | j        | j                  S rJ   )rk   rh   ra   r   s    rM   _for_evaluationzTypePrinter._for_evaluation3  s    dh	222rO   N)	r  r  r  r	  r   r
  r%  r  r  rK   rO   rM   r  r    sf         4 4 4 2 2 X2  3 3 3 3 3rO   r  c                       e Zd ZdZd ZdS )PrimitiveTypePrinterz2
    Pretty-printer for non-parametric types.
    c                 0    |                                   dS )Nz()r  r   s    rM   rT   zPrimitiveTypePrinter.to_string<  s    ##%%))))rO   Nr  r  r  r	  rT   rK   rO   rM   r  r  7  s-         * * * * *rO   r  c                       e Zd ZdZd Zd ZdS )TimeTypePrinterz5
    Pretty-printer for time and duration types.
    c                     | j         d         S Nunit_r   r   s    rM   	_get_unitzTimeTypePrinter._get_unitE  s    x  rO   c                 Z    |                                   d|                                  dS N())r  r  r   s    rM   rT   zTimeTypePrinter.to_stringH  s/    ##%%;;(8(8;;;;rO   N)r  r  r  r	  r  rT   rK   rO   rM   r  r  @  s<         ! ! !< < < < <rO   r  c                       e Zd ZdZd ZdS )TimestampTypePrinterz-
    Pretty-printer for timestamp types.
    c                     t          | j        d                   }|r/|                                  d|                                  d| dS |                                  d|                                  dS )N	timezone_r  rf  r  )r)  rh   r  r  )r   tzs     rM   rT   zTimestampTypePrinter.to_stringQ  s    tx,-- 	@''))EEDNN,<,<EEEEEE''))??DNN,<,<????rO   Nr  rK   rO   rM   r  r  L  s2         @ @ @ @ @rO   r  c                       e Zd ZdZd ZdS )FixedSizeBinaryTypePrinterz5
    Pretty-printer for fixed-size binary types.
    c                 j    t          | j        d                   }|                                  d| dS )Nbyte_width_r  r  r   rh   r  )r   widths     rM   rT   z$FixedSizeBinaryTypePrinter.to_string^  s9    DH]+,,##%%000000rO   Nr  rK   rO   rM   r  r  Y  s-         1 1 1 1 1rO   r  c                       e Zd ZdZd ZdS )DecimalTypePrinterz+
    Pretty-printer for decimal types.
    c                     t          | j        d                   }t          | j        d                   }|                                  d| d| dS )N
precision_scale_r  rf  r  r  )r   r  r  s      rM   rT   zDecimalTypePrinter.to_stringh  sU    .//	DHX&''##%%==	==U====rO   Nr  rK   rO   rM   r  r  c  -         > > > > >rO   r  c                       e Zd ZdZd Zd ZdS )ListTypePrinterz(
    Pretty-printer for list types.
    c                 T    | j         }t          |          dk    rd S |d         j        S )NrF   r   )r%  r   ra   )r   r%  s     rM   _get_value_typezListTypePrinter._get_value_types  s+    v;;!4ay~rO   c                     |                                  }||                                  dS |                                  d| dS )N<uninitialized or corrupt>r  r  )r  r  )r   childs     rM   rT   zListTypePrinter.to_stringy  sV    $$&&=''))EEEE''))44E4444rO   N)r  r  r  r	  r  rT   rK   rO   rM   r  r  n  s<           5 5 5 5 5rO   r  c                       e Zd ZdZd ZdS )FixedSizeListTypePrinterz2
    Pretty-printer for fixed-size list type.
    c                     |                                  }||                                  dS t          | j        d                   }|                                  d| d| dS )Nr  
list_size_r  rf  r  )r  r  r   rh   )r   r  	list_sizes      rM   rT   z"FixedSizeListTypePrinter.to_string  sr    $$&&=''))EEEE.//	##%%========rO   Nr  rK   rO   rM   r  r    s-         > > > > >rO   r  c                       e Zd ZdZd ZdS )MapTypePrinterz'
    Pretty-printer for map types.
    c                 d   |                                  }||                                  dS t          |d                   }t          |          dk    r|                                  dS |d         j        }|d         j        }|                                  d| d| d| j        d	          d
S )Nr  r  r   r   rF   r  rf  z, keys_sorted=keys_sorted_r  )r  r  r]  r   ra   rh   )r   struct_typestruct_childrenkey_type	item_types        rM   rT   zMapTypePrinter.to_string  s    **,,''))EEEE%k+&>??1$$''))EEEE"1%*#A&+	$$&& ; ; ; ;Y ; ;#x7; ; ; 	<rO   Nr  rK   rO   rM   r  r    s-         
< 
< 
< 
< 
<rO   r  c                       e Zd ZdZd ZdS )DictionaryTypePrinterz.
    Pretty-printer for dictionary types.
    c                     t          | j        d                   }t          | j        d                   }| j        d         }|                                  d| d| d| dS )Nindex_type_value_type_ordered_r  rf  z
, ordered=r  )r|   rh   r  )r   
index_typer$  ordereds       rM   rT   zDictionaryTypePrinter.to_string  s~    48M233
48M233
(:&$$&& & & & &z & &"& & & 	'rO   Nr  rK   rO   rM   r  r    s-         ' ' ' ' 'rO   r  c                       e Zd ZdZd ZdS )StructTypePrinterz*
    Pretty-printer for struct types.
    c                 @    |                                   d| j         dS r  )r  r%  r   s    rM   rT   zStructTypePrinter.to_string  s'    ##%%666666rO   Nr  rK   rO   rM   r  r    s-         7 7 7 7 7rO   r  c                       e Zd ZdZd ZdS )UnionTypePrinterz)
    Pretty-printer for union types.
    c                     t          | j        d                   }dd                    d |D                       z   dz   }|                                  d| j         d| dS )	Ntype_codes_re  rf  c              3   ~   K   | ]8}t          |                    t          j        d                               V  9dS )r   N)rb   r  rW   r/  )rc  xs     rM   	<genexpr>z-UnionTypePrinter.to_string.<locals>.<genexpr>  sT       %: %:)* &)0F0F)G)G%H%H %: %: %: %: %: %:rO   rg  z(fields=z, type_codes=r  )r;  rh   rh  r  r%  )r   
type_codess     rM   rT   zUnionTypePrinter.to_string  s    tx677
499 %: %:.8%: %: %: : : :<?@
##%%VVt{VVVVVVrO   Nr  rK   rO   rM   r  r    s2         W W W W WrO   r  c                       e Zd ZdZd ZdS )ExtensionTypePrinterz-
    Pretty-printer for extension types.
    c                     t          | j                  }|                                  d|                                                                 d|j         S )Nr   z with storage type )r  rh   r  rT   r   r  )r   ext_types     rM   rT   zExtensionTypePrinter.to_string  sc     **$$&& = =););)=)=)L)L)N)N = =%-%:= = 	>rO   Nr  rK   rO   rM   r  r    r  rO   r  c                   @    e Zd ZdZd Zed             Zd Zd Zd Z	dS )ScalarPrinterz:
    Pretty-printer for arrow::Scalar and subclasses.
    c                    t          t          |d                   d                   }t          |          }||j        } t	          | t
                    sJ t                              |           }||_        |j	        |_
        t          |j
                  |_	        ||_        t          j        d|j	                   }t          ||          |_        t#          |j        d                   |_        |S )Nra   id_r  is_valid)r   r|   lookup_type_classscalar_printer
issubclassr  r  __new__
type_classrv   	type_namer   rQ   rW   r/  r   rh   rt  r  )r  rh   rQ   r  r   concrete_types         rM   r  zScalarPrinter.__new__  s    eCK((/00&w//
!+Cc=11111~~c""$#*4>::	(=$)(=(=>>#C77TXj122rO   c                     t          j        d| j                   }t          t	          | j        d                   |          S z6
        The concrete DataTypeClass instance.
        r  ra   rW   r/  r  r   r|   rh   r   r  s     rM   ra   zScalarPrinter.type  sD    
 (B$.(B(BCCdhv&6 7 7 -/ / 	/rO   c                     d| j          S r  r   r   s    rM   r  zScalarPrinter._format_type  s    $$$$rO   c                     | j         j        r|                                  d| j         dS |                                  dS )N	 of type , null valuez of null value)r  is_parametricr  ra   r   s    rM   _format_nullzScalarPrinter._format_null  sO    ?( 	:''))KKDIKKKK''))9999rO   c                 *    t          | j                  S rJ   )rk   rh   r   s    rM   r  zScalarPrinter._for_evaluation  s    dh'''rO   N)
r  r  r  r	  r  r
  ra   r  r  r  rK   rO   rM   r  r    su           $ / / X/% % %: : :( ( ( ( (rO   r  c                       e Zd ZdZd ZdS )NullScalarPrinterz/
    Pretty-printer for arrow::NullScalar.
    c                 *    |                                  S rJ   r  r   s    rM   rT   zNullScalarPrinter.to_string  s      """rO   Nr  rK   rO   rM   r  r    s-         # # # # #rO   r  c                       e Zd ZdZd ZdS )NumericScalarPrinterz3
    Pretty-printer for numeric Arrow scalars.
    c                 N   | j         s|                                 S | j        d         }| j        dk    r*|                                  dt          |           d| dS | j        dv r'|                    t          j        d                    }|                                  d| S )Nrx   rQ  
 of value r   r   )rA  rC  r   )	r  r  rh   r  r  r   r  rW   r/  r   rx   s     rM   rT   zNumericScalarPrinter.to_string  s    } 	'$$&&&!>_,,((** D D 0 7 7D D;@D D D E>666JJsu5566E##%%88888rO   Nr  rK   rO   rM   r  r    s-         	9 	9 	9 	9 	9rO   r  c                       e Zd ZdZd ZdS )TimeScalarPrinterz5
    Pretty-printer for Arrow time-like scalars.
    c                     t          | j        d                   }| j        s|                                  d| dS | j        d         }|                                  d| | S )Nr   of null value [r   rx   r  )r   ra   r  r  rh   )r   r   rx   s      rM   rT   zTimeScalarPrinter.to_string  su    ty122} 	C''))BB4BBBB!##%%>>>>>>rO   Nr  rK   rO   rM   r  r    s-         ? ? ? ? ?rO   r  c                       e Zd ZdZd ZdS )Date32ScalarPrinterz1
    Pretty-printer for arrow::Date32Scalar.
    c                     | j         s|                                 S | j        d         }|                                  dt	          |           S Nrx   r  )r  r  rh   r  r   r  s     rM   rT   zDate32ScalarPrinter.to_string&  R    } 	'$$&&&!##%%GGu1E1EGGGrO   Nr  rK   rO   rM   r  r  !  2         H H H H HrO   r  c                       e Zd ZdZd ZdS )Date64ScalarPrinterz1
    Pretty-printer for arrow::Date64Scalar.
    c                     | j         s|                                 S | j        d         }|                                  dt	          |           S r  )r  r  rh   r  r   r  s     rM   rT   zDate64ScalarPrinter.to_string2  r  rO   Nr  rK   rO   rM   r	  r	  -  r  rO   r	  c                       e Zd ZdZd ZdS )TimestampScalarPrinterz4
    Pretty-printer for arrow::TimestampScalar.
    c                 L   t          | j        d                   }t          | j        d                   }|j        dk    r|                                nd}| j        s|                                  d| d| dS | j        d         }|                                  d	| | d
| dS )Nr  r  r   zno timezoner  rf  r   rx   r  r   )r   ra   r)  r   r   r  r  rh   )r   r   r  rx   s       rM   rT   z TimestampScalarPrinter.to_string>  s    ty122ty-..$&GqLLR   m} 	I''))HH4HH2HHHH!##%%EEEEEEEEErO   Nr  rK   rO   rM   r  r  9  s2         F F F F FrO   r  c                       e Zd ZdZd ZdS )MonthIntervalScalarPrinterz?
    Pretty-printer for arrow::MonthIntervalScalarPrinter.
    c                     | j         s|                                 S | j        d         }|                                  dt	          |           S r  )r  r  rh   r  r   r  s     rM   rT   z$MonthIntervalScalarPrinter.to_stringM  sS    } 	'$$&&&!##%%OO1Fu1M1MOOOrO   Nr  rK   rO   rM   r  r  H  s2         P P P P PrO   r  c                   .    e Zd ZdZed             Zd ZdS )DecimalScalarPrinterzA
    Pretty-printer for arrow::DecimalScalar and subclasses.
    c                 &    t           | j                 S rJ   )decimal_type_to_classr  r   s    rM   decimal_classz"DecimalScalarPrinter.decimal_classY  s    $T^44rO   c                 `   | j         }t          |d                   }t          |d                   }d| d| d}| j        s|                                  d| S | j                            | j        d                                       ||          }|                                  d| d	| S )
Nr  r  z[precision=z, scale=r   z of null value rx   r  r   )ra   r   r  r  r  r  rh   rK  )r   ri   r  r  suffixrx   s         rM   rT   zDecimalScalarPrinter.to_string]  s    Y<())	BxL!!:y::%:::} 	C''))BB&BBB"--dhw.? 0 006y%0H0H 	##%%AAAAAAArO   N)r  r  r  r	  r
  r  rT   rK   rO   rM   r  r  T  sM          5 5 X5	B 	B 	B 	B 	BrO   r  c                       e Zd ZdZd Zd ZdS )BaseBinaryScalarPrinterzD
    Pretty-printer for arrow::BaseBinaryScalar and subclasses.
    c                 p    d| j         v rt          |j        |j                  S |                                S )NString)r  r   r   r   r   )r   bufptrs     rM   _format_bufz#BaseBinaryScalarPrinter._format_bufn  s5    t~%%V[999'')))rO   c                 H   | j         s|                                 S t          t          | j        d                                                             }|j        }||                                  dS |                                  d| d|                     |           S )Nrx   z of value <unallocated>	 of size , value )	r  r  r  rw   rh   r  r   r  r  )r   r  r   s      rM   rT   z!BaseBinaryScalarPrinter.to_stringt  s    } 	'$$&&&9TXg%677;;==>>{<''))BBBB$$&& 4 4 4 4))&114 4 	5rO   N)r  r  r  r	  r  rT   rK   rO   rM   r  r  i  s<         * * *5 5 5 5 5rO   r  c                       e Zd ZdZd ZdS )FixedSizeBinaryScalarPrinterz:
    Pretty-printer for arrow::FixedSizeBinaryScalar.
    c           	      J   | j         d         }t          t          | j        d                                                             }|j        |                                  d| dS | j        rdnd}|                                  d| d| d|                     |           S )	Nr  rx   r  z, <unallocated>r   z
null with rf  zvalue )	ra   r  rw   rh   r  r   r  r  r  )r   r   r  nullnesss       rM   rT   z&FixedSizeBinaryScalarPrinter.to_string  s    y'9TXg%677;;==>>;''))IIDIIII822L$$&& > > > >> >#'#3#3F#;#;> > 	?rO   Nr  rK   rO   rM   r"  r"    s-         ? ? ? ? ?rO   r"  c                       e Zd ZdZd ZdS )DictionaryScalarPrinterz5
    Pretty-printer for arrow::DictionaryScalar.
    c                     | j         s|                                 S t          | j        d         d                   }t          | j        d         d                   }|                                  d| d| S )Nrx   r#  r  z
 of index z, dictionary r  r  r|   rh   r  )r   r#  r  s      rM   rT   z!DictionaryScalarPrinter.to_string  s    } 	'$$&&&dhw'01148G,\:;;
$$&& + +% + +(+ + 	,rO   Nr  rK   rO   rM   r&  r&    s-         , , , , ,rO   r&  c                       e Zd ZdZd ZdS )BaseListScalarPrinterzB
    Pretty-printer for arrow::BaseListScalar and subclasses.
    c                     | j         s|                                 S t          | j        d                   }|                                  d| S r  r(  r  s     rM   rT   zBaseListScalarPrinter.to_string  sR    } 	'$$&&&dhw'((##%%88888rO   Nr  rK   rO   rM   r*  r*    s-         9 9 9 9 9rO   r*  c                   $    e Zd ZdZd Zd Zd ZdS )StructScalarPrinterz1
    Pretty-printer for arrow::StructScalar.
    c                     dS Nr}  rK   r   s    rM   display_hintz StructScalarPrinter.display_hint      urO   c              #   J  K   | j         sd S t          | j        d                   }t          | j        d                   }t	          ||          D ]R\  }}t          t          |          d                                                   }d|fV  dt          |          fV  Sd S )Nr  rx   rn  rv   )r  r;  ra   rh   zipr)  r|   r   )r   eval_fieldseval_valuesfieldrx   rv   s         rM   childrenzStructScalarPrinter.children  s      } 	4	+ 677 122[99 	* 	*LE5U5\\'233BBDDD4.   E%LL)))))	* 	*rO   c                 b    | j         s|                                 S |                                  S rJ   )r  r  r  r   s    rM   rT   zStructScalarPrinter.to_string  s3    } 	'$$&&&##%%''rO   N)r  r  r  r	  r0  r7  rT   rK   rO   rM   r-  r-    sK           * * *( ( ( ( (rO   r-  c                       e Zd ZdZd ZdS )SparseUnionScalarPrinter?
    Pretty-printer for arrow::UnionScalar and subclasses.
    c                    | j         d                             t          j        d                    }| j        s"|                                  d| j         d| dS t          | j         d                   }| j         d                             t          j        d                    }|                                  d| d	t          ||                    S )
N	type_coder   r  , type code r  rx   child_id of type code r   )	rh   r  rW   r/  r  r  ra   r;  r|   )r   r=  r5  r?  s       rM   rT   z"SparseUnionScalarPrinter.to_string  s    H[)..su/E/EFF	} 	:((** 9 9TY 9 9!*9 9 9 : 1228J',,S_U-C-CDD$$&& 8 8i 8 8{84558 8 	9rO   Nr  rK   rO   rM   r:  r:    s-         9 9 9 9 9rO   r:  c                       e Zd ZdZd ZdS )DenseUnionScalarPrinterr;  c                 $   | j         d                             t          j        d                    }| j        s"|                                  d| j         d| dS t          | j         d                   }|                                  d| d| S )	Nr=  r   r  r>  r  rx   r@  r   )rh   r  rW   r/  r  r  ra   r|   )r   r=  rx   s      rM   rT   z!DenseUnionScalarPrinter.to_string  s    H[)..su/E/EFF	} 	:((** 9 9TY 9 9!*9 9 9 :dhw'(($$&& ! !i ! !! ! 	"rO   Nr  rK   rO   rM   rB  rB    s-         " " " " "rO   rB  c                       e Zd ZdZd ZdS )MapScalarPrinterz.
    Pretty-printer for arrow::MapScalar.
    c                    | j         s|                                 S t          | j        d                   }t          |d                   }t	          d|          }|                                  d| j         d|                                 S )Nrx   r  arrow::ArrayDatar  r   )r  r  r|   rh   ArrayDataPrinterr  ra   _format_contents)r   arrayr   data_printers       rM   rT   zMapScalarPrinter.to_string  s    } 	'$$&&&dhw'((U7^$$'(:DAA$$&& ; ; ; ;%6688; ; 	<rO   Nr  rK   rO   rM   rE  rE    s-         < < < < <rO   rE  c                       e Zd ZdZd ZdS )ExtensionScalarPrinterz4
    Pretty-printer for arrow::ExtensionScalar.
    c                 h   t          | j                  }| j        s>|                                  d|                                                                 dS t          | j        d                   }|                                  d|                                                                 d| S )Nr  r  rx   r   )r  ra   r  r  rT   r   r|   rh   )r   r  rx   s      rM   rT   z ExtensionScalarPrinter.to_string  s     ++} 	L((** K K))++::<<K K K Ldhw'(($$&& J J%%''6688J JBGJ J 	KrO   Nr  rK   rO   rM   rM  rM    s2         K K K K KrO   rM  c                   p    e Zd ZdZd Zed             Zd ZddZddZ	ddZ
d	 Zd
 Zd Zd Zd Zd ZdS )rH  z.
    Pretty-printer for arrow::ArrayData.
    c                    t          t          |d                   d                   }t          |          }||j        } t	          | t
                    sJ t                              |           }||_        ||_	        ||_
        |j        |_        ||_        t          |j	        d                   |_        t          |j	        d                   |_        |S )Nra   r  r  r   )r   r|   r  array_data_printerr  rH  r  r  rv   rh   r  r  rQ   r  r   )r  rv   rh   rQ   r  r   s         rM   r  zArrayDataPrinter.__new__  s    eCK((/00&w//
!/Cc#344444~~c""	$#$(8,--$(8,--rO   c                     t          j        d| j                   }t          t	          | j        d                   |          S r  r  r  s     rM   ra   zArrayDataPrinter.type  s=    
 (B$.(B(BCCdhv&6 7 7GGGrO   c           	      \    d| j          d| j         dt          | j        d                    S )Nzlength z	, offset rf  r   )r   r  r   rh   r   s    rM   rI  z!ArrayDataPrinter._format_contents  sF    ?$+ ? ?+? ?$TXl%;<<? ? 	@rO   Nc                 N   t          | j        d                   }t          ||                                                   }t	          |          dk    rd S |-t
                              |                                |          S t          |                                          S )Nbuffersr   )	r;  rh   rw   r  r   r  r  ru   r{  )r   r#  rQ   rU  r  s        rM   _bufferzArrayDataPrinter._buffer"  s    DHY/0075>**..00v;;!4++F,>,>,@,@'JJJ&,,..///rO   c                 ~    |                      ||          }|dS || j        }|                    | j        |          S )z
        Return a typed view of values in the buffer with the given index.

        Values are returned as tuples since some types may decode to
        multiple values (for example day_time_interval).
        N)rV  r   r  r  )r   r#  rQ   r   r   s        rM   _buffer_valueszArrayDataPrinter._buffer_values,  sC     ll5'**;4>[FxxV,,,rO   c                 V    t          t          |                     |||                    S )zk
        Like _buffer_values(), but assumes values are 1-tuples
        and returns them unpacked.
        )r  rN   rX  )r   r#  rQ   r   s       rM   _unpacked_buffer_valuesz(ArrayDataPrinter._unpacked_buffer_values:  s0    
 h"11%&IIK K 	KrO   c                     t          | j                  r|                     d          nd }t                              || j        | j                  S r   )rR   rQ   rV  r  r  r  r   )r   r   s     rM   _null_bitmapzArrayDataPrinter._null_bitmapB  s@    !0!>!>Hdll1oooD%%c4;DDDrO   c                 $    t          |          dfS )Nr>  rb  r  s     rM   _null_childzArrayDataPrinter._null_childF  s    1vvv~rO   c                 $    t          |          |fS rJ   rb  )r   r8   rx   s      rM   _valid_childzArrayDataPrinter._valid_childI  s    1vvu}rO   c                     d S rJ   rK   r   s    rM   r0  zArrayDataPrinter.display_hintL  s    trO   c                     dS )NrK   rK   r   s    rM   r7  zArrayDataPrinter.childrenO  s    rrO   c                 R    | j         }| j         d| d|                                  S )Nr  rf  )ra   rv   rI  r   ri   s     rM   rT   zArrayDataPrinter.to_stringR  sB    Y9 - -r - -((**- - 	.rO   rJ   )r  r  r  r	  r  r
  ra   rI  rV  rX  rZ  r\  r^  r`  r0  r7  rT   rK   rO   rM   rH  rH    s           " H H XH@ @ @
0 0 0 0- - - -K K K KE E E        . . . . .rO   rH  c                   :    e Zd ZdZ ee          Zd Zd Zd Z	dS )NumericArrayDataPrinterzA
    ArrayDataPrinter specialization for numeric data types.
    c                 ^    t          | j        |                     d| j                            S NrF   )r  _format_valuerX  rQ   r   s    rM   _values_viewz$NumericArrayDataPrinter._values_view^  s1    d0"11!T\BBD D 	DrO   c                     dS NrJ  rK   r   s    rM   r0  z$NumericArrayDataPrinter.display_hintb      wrO   c              #   >  K   | j         dk    rd S |                                 }|                                 }t          t	          ||                    D ]G\  }\  }}|r&|                     |t          |                    V  0|                     |          V  Hd S r   )r   rj  r\  	enumerater3  r`  rb   r^  )r   r  	null_bitsr8   validrx   s         rM   r7  z NumericArrayDataPrinter.childrene  s      ;!F""$$%%''	!*3y&+A+A!B!B 	* 	*A~u *''3u::666666&&q))))))		* 	*rO   N)
r  r  r  r	  staticmethodrN   ri  rj  r0  r7  rK   rO   rM   rf  rf  X  s_          !L**MD D D  	* 	* 	* 	* 	*rO   rf  c                       e Zd ZdZd Zd ZdS )BooleanArrayDataPrinterz6
    ArrayDataPrinter specialization for boolean.
    c                 D    t          |                                          S rJ   )rb   lower)r   rL   s     rM   ri  z%BooleanArrayDataPrinter._format_valuev  s    1vv||~~rO   c                 ^    t          | j        |                     d| j                            S rh  )r  ri  rX  rQ   r   s    rM   rj  z$BooleanArrayDataPrinter._values_viewy  s1    $,--a>>@ @ 	@rO   N)r  r  r  r	  ri  rj  rK   rO   rM   rt  rt  q  sA           @ @ @ @ @rO   rt  c                   (    e Zd ZdZ ee          ZdS )Date32ArrayDataPrinterz5
    ArrayDataPrinter specialization for date32.
    N)r  r  r  r	  rr  r   ri  rK   rO   rM   ry  ry  ~  )          !L//MMMrO   ry  c                   (    e Zd ZdZ ee          ZdS )Date64ArrayDataPrinterz5
    ArrayDataPrinter specialization for date64.
    N)r  r  r  r	  rr  r   ri  rK   rO   rM   r|  r|    rz  rO   r|  c                       e Zd ZdZd Zd ZdS )TimeArrayDataPrinterz@
    ArrayDataPrinter specialization for time32 and time64.
    c                 \    | j         d         | _        t          | j                  | _        d S r  )ra   r   r   unit_stringr  s      rM   r   zTimeArrayDataPrinter.__init__  s(    Ig&	*4955rO   c                     | | j          S rJ   )r  r   s     rM   ri  z"TimeArrayDataPrinter._format_value  s    )t')))rO   Nr  r  r  r	  r   ri  rK   rO   rM   r~  r~    s<         6 6 6* * * * *rO   r~  c                       e Zd ZdZd Zd ZdS )TimestampArrayDataPrinterz8
    ArrayDataPrinter specialization for timestamp.
    c                 *    | j         d         | _        d S r  )ra   r   r  s      rM   r   z"TimestampArrayDataPrinter.__init__  s    Ig&			rO   c                 ,    t          || j                  S rJ   )r   r   r   s     rM   ri  z'TimestampArrayDataPrinter._format_value  s    TY///rO   Nr  rK   rO   rM   r  r    s<         ' ' '0 0 0 0 0rO   r  c                   (    e Zd ZdZ ee          ZdS )MonthIntervalArrayDataPrinterz=
    ArrayDataPrinter specialization for month_interval.
    N)r  r  r  r	  rr  r   ri  rK   rO   rM   r  r    s*          !L!677MMMrO   r  c                   (    e Zd ZdZ ee          ZdS )DayTimeIntervalArrayDataPrinter@
    ArrayDataPrinter specialization for day_time_interval.
    N)r  r  r  r	  rr  r   ri  rK   rO   rM   r  r    *          !L!9::MMMrO   r  c                   (    e Zd ZdZ ee          ZdS )$MonthDayNanoIntervalArrayDataPrinterr  N)r  r  r  r	  rr  r   ri  rK   rO   rM   r  r    r  rO   r  c                   $    e Zd ZdZd Zd Zd ZdS )DecimalArrayDataPrinterz7
    ArrayDataPrinter specialization for decimals.
    c                     | j         }t          |d                   | _        t          |d                   | _        t          | j                 | _        | j        j        j        dz  | _	        d S )Nr  r  r  )
ra   r   r  r  r  r  r  r   r  r  )r   rv   rh   ri   s       rM   r   z DecimalArrayDataPrinter.__init__  sX    YR-..H&&
24>B,3=BrO   c                     dS rl  rK   r   s    rM   r0  z$DecimalArrayDataPrinter.display_hint  rm  rO   c              #     K   | j         dk    rd S |                                 }|                     d          j        | j        | j        z  z   }t          |          D ]y\  }}|rQ| j                            |          }| 	                    ||
                    | j        | j                            V  n|                     |          V  || j        z  }zd S )Nr   rF   )r   r\  rV  r   r  r  ro  r  r  r`  rK  r  r  r^  )r   rp  rf   r8   rq  decs         rM   r7  z DecimalArrayDataPrinter.children  s      ;!F%%''	,,q//&t)FF!),, 	' 	'HAu *(55g>>''szz$.$*==? ? ? ? ? ? &&q)))))t&GG	' 	'rO   Nr  r  r  r	  r   r0  r7  rK   rO   rM   r  r    sN         C C C  ' ' ' ' 'rO   r  c                   $    e Zd ZdZd Zd Zd ZdS )FixedSizeBinaryArrayDataPrinterz@
    ArrayDataPrinter specialization for fixed_size_binary.
    c                 *    | j         d         | _        d S )Nr  )ra   r  r  s      rM   r   z(FixedSizeBinaryArrayDataPrinter.__init__  s    )M2rO   c                     dS rl  rK   r   s    rM   r0  z,FixedSizeBinaryArrayDataPrinter.display_hint  rm  rO   c              #     K   | j         dk    rd S |                                 }|                     d          j        | j        | j        z  z   }t          |          D ]t\  }}|rL| j        r,|                     |t          || j                            V  n0|                     |d          V  n| 	                    |          V  || j        z  }ud S )Nr   rF   r  )
r   r\  rV  r   r  r  ro  r`  r   r^  )r   rp  rf   r8   rq  s        rM   r7  z(FixedSizeBinaryArrayDataPrinter.children  s     ;!F%%''	,,q//&t)FF!),, 		' 		'HAu *? 5++=$/BBD D D D D D ++At444444&&q)))))t&GG		' 		'rO   Nr  rK   rO   rM   r  r    sK         3 3 3  ' ' ' ' 'rO   r  c                   $    e Zd ZdZd Zd Zd ZdS )BinaryArrayDataPrinterzD
    ArrayDataPrinter specialization for variable-sized binary.
    c                     | j         t          j        t          j        fv | _        | j         t          j        t          j        fv | _        | j        rt          nt          | _	        d S rJ   )
rQ   r/   r,   r+   is_larger   is_utf8r   r   format_stringr  s      rM   r   zBinaryArrayDataPrinter.__init__  sL    ):D<M(NN|T5F'GG-1\L\\}rO   c                     dS rl  rK   r   s    rM   r0  z#BinaryArrayDataPrinter.display_hint  rm  rO   c              #     K   | j         dk    rd S |                                 }|                     d| j        rt          j        nt          j        | j         dz             }|                     d          j        }t          |          D ]\  }}|ra||         }||dz            |z
  }|r0| 
                    ||                     ||z   |                    V  O| 
                    |d          V  h|                     |          V  d S )Nr   rF   r   r   r  )r   r\  rZ  r  r/   r   r   rV  r   ro  r`  r  r^  )r   rp  offsetsr  r8   rq  r0   r   s           rM   r7  zBinaryArrayDataPrinter.children  sH     ;!F%%''	..T]:tzz
;? / $ $ a%!),, 
	* 
	*HAu 	*
q1u~- 5++4--fundCCE E E E E E ++At444444&&q))))))
	* 
	*rO   Nr  rK   rO   rM   r  r    sN         M M M
  * * * * *rO   r  c                   0    e Zd ZdZd Zd Zd Zd Zd ZdS )ArrayPrinterz9
    Pretty-printer for arrow::Array and subclasses.
    c                     t          |d                   }t          d|          | _        t          | j        j                  | _        d S )Nr  rG  )r|   rH  rK  r   r  rv   )r   rh   r   s      rM   r   zArrayPrinter.__init__  s?    S\"",-?FF)$*;*EFF			rO   c                 4    | j                                         S rJ   )rK  rI  r   s    rM   rI  zArrayPrinter._format_contents   s     11333rO   c                     | j         j        j        r.| j         j        }d| j         d| d|                                  S d| j         d|                                  S )Nr  r  rf  z of )rK  r  r  ra   rv   rI  rd  s     rM   rT   zArrayPrinter.to_string#  so    '5 	F"'BPTYPPPPt7L7L7N7NPPPETYEED,A,A,C,CEEErO   c                 4    | j                                         S rJ   )rK  r0  r   s    rM   r0  zArrayPrinter.display_hint*  s     --///rO   c                 4    | j                                         S rJ   )rK  r7  r   s    rM   r7  zArrayPrinter.children-  s     ))+++rO   N)	r  r  r  r	  r   rI  rT   r0  r7  rK   rO   rM   r  r    so         G G G
4 4 4F F F0 0 0, , , , ,rO   r  c                   *    e Zd ZdZd Zd Zd Zd ZdS )ChunkedArrayPrinterz1
    Pretty-printer for arrow::ChunkedArray.
    c                 `    || _         || _        t          | j        d                   | _        d S )Nchunks_)rv   rh   r;  chunksr  s      rM   r   zChunkedArrayPrinter.__init__6  s*    	 344rO   c                     dS rl  rK   r   s    rM   r0  z ChunkedArrayPrinter.display_hint;  rm  rO   c              #      K   t          | j                  D ]F\  }}t          t          |                    }t	          |          |                                fV  Gd S rJ   )ro  r  r  r|   rb   rI  )r   r8   chunkprinters       rM   r7  zChunkedArrayPrinter.children>  sf      !$+.. 	5 	5HAu"5<<00Ga&&'224444444	5 	5rO   c                     t          | j        d                   }| j         d| d| j        d          dt          | j        d                    dt	          | j                   d
S )	Nrp  r  z	, length length_rf  null_count_ with z chunks)r|   rh   rv   r   r   r  rd  s     rM   rT   zChunkedArrayPrinter.to_stringC  s    48G$%%9 2 2r 2 2DHY4G 2 2$TXm%<==2 2DK((2 2 2 	3rO   Nr  r  r  r	  r   r0  r7  rT   rK   rO   rM   r  r  1  sZ         5 5 5
  5 5 5
3 3 3 3 3rO   r  c                       e Zd ZeZd ZdS )DataTypeClassc                     || _         d S rJ   r   )r   rv   s     rM   r   zDataTypeClass.__init__M  s    			rO   N)r  r  r  rH  rQ  r   rK   rO   rM   r  r  J  s)        )    rO   r  c                       e Zd ZdZeZeZdS )NullTypeClassFN)r  r  r  r  r  type_printerr  r  rK   rO   rM   r  r  Q  s        M'L&NNNrO   r  c                       e Zd ZdZeZeZeZ	dS )NumericTypeClassFN)
r  r  r  r  r  r  r  r  rf  rQ  rK   rO   rM   r  r  W  %        M'L)N0rO   r  c                       e Zd ZdZeZeZeZ	dS )BooleanTypeClassFN)
r  r  r  r  r  r  r  r  rt  rQ  rK   rO   rM   r  r  ^  r  rO   r  c                       e Zd ZdZeZeZeZ	dS )Date32TypeClassFN)
r  r  r  r  r  r  r  r  ry  rQ  rK   rO   rM   r  r  e  %        M'L(N/rO   r  c                       e Zd ZdZeZeZeZ	dS )Date64TypeClassFN)
r  r  r  r  r  r  r	  r  r|  rQ  rK   rO   rM   r  r  l  r  rO   r  c                       e Zd ZdZeZeZeZ	dS )TimeTypeClassTN
r  r  r  r  r  r  r  r  r~  rQ  rK   rO   rM   r  r  s  %        M"L&N-rO   r  c                       e Zd ZdZeZeZeZ	dS )TimestampTypeClassTN)
r  r  r  r  r  r  r  r  r  rQ  rK   rO   rM   r  r  z  s%        M'L+N2rO   r  c                       e Zd ZdZeZeZeZ	dS )DurationTypeClassTNr  rK   rO   rM   r  r    r  rO   r  c                       e Zd ZdZeZeZeZ	dS )MonthIntervalTypeClassFN)
r  r  r  r  r  r  r  r  r  rQ  rK   rO   rM   r  r    s%        M'L/N6rO   r  c                       e Zd ZdZeZeZeZ	dS )DayTimeIntervalTypeClassFN)
r  r  r  r  r  r  r  r  r  rQ  rK   rO   rM   r  r    s%        M'L)N8rO   r  c                       e Zd ZdZeZeZeZ	dS )MonthDayNanoIntervalTypeClassFN)
r  r  r  r  r  r  r  r  r  rQ  rK   rO   rM   r  r    s%        M'L)N=rO   r  c                       e Zd ZdZeZeZeZ	dS )DecimalTypeClassTN)
r  r  r  r  r  r  r  r  r  rQ  rK   rO   rM   r  r    s%        M%L)N0rO   r  c                       e Zd ZdZeZeZeZ	dS )BaseBinaryTypeClassFN)
r  r  r  r  r  r  r  r  r  rQ  rK   rO   rM   r  r    s%        M'L,N/rO   r  c                       e Zd ZdZeZeZeZ	dS )FixedSizeBinaryTypeClassTN)
r  r  r  r  r  r  r"  r  r  rQ  rK   rO   rM   r  r    s%        M-L1N8rO   r  c                       e Zd ZdZeZeZdS )BaseListTypeClassTN)r  r  r  r  r  r  r*  r  rK   rO   rM   r  r    s        M"L*NNNrO   r  c                       e Zd ZdZeZeZdS )FixedSizeListTypeClassTN)r  r  r  r  r  r  r*  r  rK   rO   rM   r  r    s        M+L*NNNrO   r  c                       e Zd ZdZeZeZdS )MapTypeClassTN)r  r  r  r  r  r  rE  r  rK   rO   rM   r  r    s        M!L%NNNrO   r  c                       e Zd ZdZeZeZdS )StructTypeClassTN)r  r  r  r  r  r  r-  r  rK   rO   rM   r  r    s        M$L(NNNrO   r  c                       e Zd ZdZeZeZdS )DenseUnionTypeClassTN)r  r  r  r  r  r  rB  r  rK   rO   rM   r  r    s        M#L,NNNrO   r  c                       e Zd ZdZeZeZdS )SparseUnionTypeClassTN)r  r  r  r  r  r  r:  r  rK   rO   rM   r  r    s        M#L-NNNrO   r  c                       e Zd ZdZeZeZdS )DictionaryTypeClassTN)r  r  r  r  r  r  r&  r  rK   rO   rM   r  r    s        M(L,NNNrO   r  c                       e Zd ZdZeZeZdS )ExtensionTypeClassTN)r  r  r  r  r  r  rM  r  rK   rO   rM   r  r    s        M'L+NNNrO   r  DataTypeTraits)factoryrv   r  r  r  c                 r    t                               |           }||                    |j                  S dS )zL
    Lookup a type class (an instance of DataTypeClass) by its type id.
    N)type_traits_by_idr  r  rv   )rQ   r   s     rM   r  r    s6     ""7++F~~fk***4rO   c                       e Zd ZdZi dddddddd	d
dddddddddddddddddddddd d!d"d#Zd$ Zd% Zd& Zd' Zd(S ))StatusPrinterz+
    Pretty-printer for arrow::Status.
    r   OKrF   OutOfMemoryr   KeyErrorr   rz   r  Invalid   IOErrorrG   CapacityError   rC  r  	CancelledrH   UnknownError
   NotImplemented   SerializationError   RError(   CodeGenError)   ExpressionValidationError*   ExecutionError-   AlreadyExistsc                     || _         d S rJ   r   r  s      rM   r   zStatusPrinter.__init__A  r   rO   c                    t          |d                                                   }t          |          dk    rd S t          t	          j        t          |           d                    }t          t	          j        t          |           d                    }d|                                 d|                                 S )Ndetailr   z->type_id()z->ToString().c_str()rO  z] )	rw   r  r   r   rW   r  rk   r   r   )r   state
detail_ptr	detail_id
detail_msgs        rM   _format_detailzStatusPrinter._format_detailD  s    uX//3355
z??a4C.j))6668 8 9 9	 S/j))???A A B B
F9##%%FF)B)B)D)DFFFrO   c                    t          |d                   }| j                            |          }|d| d}nd| d}|t          |d                                                   z  }|                     |          }|	|d| dz   S |dz   S )	Nrd   zarrow::Status::r  zarrow::Status(<unknown code z>, msgz	, detail=r  )r   _status_codes_by_idr  r)  r   r  )r   r  rd   codenamer^   r  s         rM   _format_errorzStatusPrinter._format_errorO  s    5=!!+//55-(---AA8t888A	YuU|$$33555((//
!0:00000s7NrO   c                     | j         d         }t          |          dk    rdS |                     |                                          S )Nstate_r   zarrow::Status::OK())rh   r   r  ru   )r   	state_ptrs     rM   rT   zStatusPrinter.to_string]  sE    HX&	y>>Q((!!)"7"7"9"9:::rO   N)	r  r  r  r	  r  r   r  r  rT   rK   rO   rM   r  r  )  s1        	4	= 	
: 	
;	
 	
9 	
9 	
? 	
< 	
; 	
> 	 	  	H 	N 	'  	!" 	O#(  	G 	G 	G  ; ; ; ; ;rO   r  c                       e Zd ZdZd ZdS )ResultPrinterz.
    Pretty-printer for arrow::Result<T>.
    c                 t   | j         j                            d          }| j         d         d         }t          |          dk    r|                     |          }nU| j         d         d         j        }|sJ |                    |                                                                          }d| d| dS )	Nr   status_r  storage_r  zarrow::Result<z>(r  )	rh   ra   r   r   r  rf   r   r   ru   )r   	data_typer  innerdata_ptrs        rM   rT   zResultPrinter.to_stringi  s    HM33A66	HY'1	y>>Q&&y11EEx
+G4<HOOO--!!##% %%0[]] 5	55U5555rO   Nr  rK   rO   rM   r  r  d  s-         
6 
6 
6 
6 
6rO   r  c                       e Zd ZdZd Zd ZdS )FieldPrinterz*
    Pretty-printer for arrow::Field.
    c                     || _         d S rJ   r   r  s      rM   r   zFieldPrinter.__init__{  r   rO   c                     t          | j                  }|j        }|rd|j         d|j         dS d|j         d|j         dS )Nzarrow::field(rf  r  z, nullable=false))r_  rh   ru  rv   ra   )r   r?   ru  s      rM   rT   zFieldPrinter.to_string~  sY    $(OO: 	G61666QV6666F16FFQVFFFFrO   Nr  r  r  r	  r   rT   rK   rO   rM   r$  r$  v  sA           G G G G GrO   r$  c                   *    e Zd ZdZd Zd Zd Zd ZdS )MetadataPrinterz5
    Pretty-printer for arrow::KeyValueMetadata.
    c                 F    || _         t          | j                   | _        d S rJ   )rh   r  r&  r  s      rM   r   zMetadataPrinter.__init__  s     **rO   c                     dS r/  rK   r   s    rM   r0  zMetadataPrinter.display_hint  r1  rO   c              #      K   | j         D ]5\  }}d|                                fV  d|                                fV  6d S )Nr  rx   )r&  r   )r   krL   s      rM   r7  zMetadataPrinter.children  s^      M 	/ 	/DAq!//++,,,,AOO--.....	/ 	/rO   c                 0    dt          | j                   S )Nz arrow::KeyValueMetadata of size )r   r&  r   s    rM   rT   zMetadataPrinter.to_string  s    F#dm2D2DFFFrO   Nr  rK   rO   rM   r)  r)    s_         + + +  / / /
G G G G GrO   r)  c                   *    e Zd ZdZd Zd Zd Zd ZdS )SchemaPrinterz+
    Pretty-printer for arrow::Schema.
    c                 <    || _         t          |          | _        d S rJ   )rh   r   r0  r  s      rM   r   zSchemaPrinter.__init__  s    SkkrO   c                     dS r/  rK   r   s    rM   r0  zSchemaPrinter.display_hint  r1  rO   c              #   x   K   | j         j        D ]*}d|j                                        fV  d|j        fV  +d S )Nrv   ra   )r0  r%  rv   r   ra   )r   r6  s     rM   r7  zSchemaPrinter.children  sY      [' 	' 	'E5:446677775:&&&&&	' 	'rO   c                     t          | j        j                  }t          | j        j                  }|dk    r	d| d| dS d| dS )Nr   zarrow::Schema with z fields and  metadata itemsz fields)r   r0  r%  r&  )r   
num_fieldsmd_itemss      rM   rT   zSchemaPrinter.to_string  sj    +,,
t{+,,a<<5* 5 5#5 5 5 6 =<<<<rO   Nr  rK   rO   rM   r0  r0    sZ         " " "
  ' ' '
= = = = =rO   r0  c                   &    e Zd Zd Zd Zd Zd ZdS )BaseColumnarPrinterc                 R    || _         || _        || _        | j        j        | _        d S rJ   )rv   rh   columnarr0  )r   rv   rh   r;  s       rM   r   zBaseColumnarPrinter.__init__  s'    	 m*rO   c                     dS r/  rK   r   s    rM   r0  z BaseColumnarPrinter.display_hint  r1  rO   c              #      K   t          | j        j        | j        j                  D ](\  }}d|j                                        fV  d|fV  )d S )Nrv   rx   )r3  r0  r%  r;  r1  rv   r   )r   r6  cols      rM   r7  zBaseColumnarPrinter.children  sn      dk0"m35 5 	! 	!JE35:44667777C.    	! 	!rO   c           	          t          | j        j                  }| j        j        }t          | j        j                  }|dk    rd| j         d| d| d| d	S d| j         d| d| dS )Nr   r  r  z
 columns, z rows, r5  z rows)r   r0  r%  r;  r5  r&  rv   )r   r6  r5  r7  s       rM   rT   zBaseColumnarPrinter.to_string  s    +,,
=)t{+,,a<<Bdi B Bz B BB B(0B B B C'di ' 'z ' '' ' ' (rO   N)r  r  r  r   r0  r7  rT   rK   rO   rM   r9  r9    sP        + + +  ! ! !	( 	( 	( 	( 	(rO   r9  c                       e Zd ZdZd ZdS )RecordBatchPrinterz0
    Pretty-printer for arrow::RecordBatch.
    c                 Z    t                               | d|t          |                     d S )Nr)  )r9  r   r)  r  s      rM   r   zRecordBatchPrinter.__init__  s*    $$T=#{3?O?OPPPPPrO   Nr'  rK   rO   rM   rA  rA    s2         Q Q Q Q QrO   rA  c                       e Zd ZdZd ZdS )TablePrinterz*
    Pretty-printer for arrow::Table.
    c                 Z    t                               | d|t          |                     d S )Nr9  )r9  r   r9  r  s      rM   r   zTablePrinter.__init__  s(    $$T7CsDDDDDrO   Nr'  rK   rO   rM   rD  rD    s2         E E E E ErO   rD  c                       e Zd ZdZd Zd ZdS )DatumPrinterz*
    Pretty-printer for arrow::Datum.
    c                 H    || _         t          |d                   | _        d S )Nrx   )rh   r   variantr  s      rM   r   zDatumPrinter.__init__  s     s7|,,rO   c                 ~    | j         j        dk    rdS | j         j        dS t          | j         j                  }d| S )Nr   zarrow::Datum (empty)z(arrow::Datum (uninitialized or corrupt?)zarrow::Datum of value )rI  r#  r$  r|   rx   r  s     rM   rT   zDatumPrinter.to_string  sI    <""))<"*==dl())////rO   Nr'  rK   rO   rM   rG  rG    s<         - - -0 0 0 0 0rO   rG  c                       e Zd ZdZd Zd ZdS )BufferPrinterz:
    Pretty-printer for arrow::Buffer and subclasses.
    c                 "    || _         || _        d S rJ   )rv   rh   r  s      rM   r   zBufferPrinter.__init__ 	  s    	rO   c                 2   t          | j        d                   rd}nd}t          | j        d                   }|dk    rd| j         d| S | j        d         sd| j         d	| d
| dS t	          | j        d         |          }d| j         d	| d
| d
| S )Nis_mutable_mutablez	read-onlyr}  r   r  z of size 0, is_cpu_r  rf  z, not on CPUr  )rt  rh   r   rv   r   )r   rP  r   r   s       rM   rT   zBufferPrinter.to_string	  s    '(( 	"GG!G48G$%%199=TY==G===x	" 	ONTYNNNNNNNNTXg.55FFFTFFWFFFFFrO   Nr'  rK   rO   rM   rL  rL    sA           G G G G GrO   rL  c                       e Zd ZdZd Zd ZdS )DayMillisecondsPrinterzI
    Pretty-printer for arrow::DayTimeIntervalType::DayMilliseconds.
    c                     || _         d S rJ   r   r  s      rM   r   zDayMillisecondsPrinter.__init__	  r   rO   c                 N    t          | j        d         | j        d                   S )Nr   r   )r   rh   r   s    rM   rT   z DayMillisecondsPrinter.to_string	  s*    '(8(,(@B B 	BrO   Nr'  rK   rO   rM   rS  rS  	  sA           B B B B BrO   rS  c                       e Zd ZdZd Zd ZdS )MonthDayNanosPrinterzL
    Pretty-printer for arrow::MonthDayNanoIntervalType::MonthDayNanos.
    c                     || _         d S rJ   r   r  s      rM   r   zMonthDayNanosPrinter.__init__$	  r   rO   c                 f    t          | j        d         | j        d         | j        d                   S )Nr   r   nanoseconds)r   rh   r   s    rM   rT   zMonthDayNanosPrinter.to_string'	  s4    '(:(,(8(,(?A A 	ArO   Nr'  rK   rO   rM   rW  rW  	  sA           A A A A ArO   rW  c                       e Zd ZdZd Zd ZdS )DecimalPrinterz2
    Pretty-printer for Arrow decimal values.
    c                 0    || _         || _        || _        d S rJ   )rv   rh   r  )r   r  rv   rh   s       rM   r   zDecimalPrinter.__init__2	  s    	"rO   c                     t           | j                                     | j                  }| j         dt          |           dS r  )decimal_bits_to_classr  r  rh   rv   r   )r   r  s     rM   rT   zDecimalPrinter.to_string7	  s=    #DN3>>txHH)))c#hh))))rO   Nr'  rK   rO   rM   r\  r\  -	  s<         # # #
* * * * *rO   r\  rG  zarrow::BasicDecimal128zarrow::BasicDecimal256zarrow::ChunkedArrayzarrow::Datumz+arrow::DayTimeIntervalType::DayMillisecondszarrow::Decimal128zarrow::Decimal256z.arrow::MonthDayNanoIntervalType::MonthDayNanoszarrow::Fieldzarrow::KeyValueMetadatazarrow::RecordBatchzarrow::Resultzarrow::Schemar+  r;  zarrow::Statuszarrow::Tablec                 B   | j                                         j        }|d S |                    d          d         }t                              |          }| |||           S |                    d          sd S |t          d          d          }|                    d          r*	 | d          t          ||           S # t          $ r Y d S w xY w|                    d          rU	 t          | d                   }t          |          }||                    |j        |           S d S # t          $ r Y d S w xY w|                    d          rt          |           S |                    d	          r)	 | d
          t          |           S # t          $ r Y d S w xY wd S )N<r   r  r{  r  r/   r  r   r   r  )ra   strip_typedefsrv   	partitionprintersr  rc   r   r   rL  	Exceptionr   r  r  r  r  )rh   rv   r  
arrow_namerQ   r  s         rM   arrow_pretty_printrg  R	  s   8""$$)D|>>#q!Dll4  GwtS!!!??9%% c)nnoo&J8$$  &	2LL
 !S111	  	 	 	DD	 
		V	$	$ &	E#e*ooG
 +733J%!..zDDD &%  	 	 	DD	 
		W	%	% 
&C   			X	&	& &	&
OO
 !%%%	  	 	 	DD	& &s6   *C 
CC)D, ,
D:9D:7F 
FFc                  |    t          j                    } | t           } | j                            t                     d S rJ   )rW   current_objfilepretty_printersappendrg  )objfiles    rM   mainrm  	  s:     !##G""#566666rO   __main__rJ   )collectionsr   collections.abcr   r   r  enum	functoolsr   r   	itertoolsr  operatorr   r\   rZ   rW   	gdb.typesr   version_info	_type_idsIntEnumr/   r1   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r.   r*   r   r  rC   r2   r3   r4   r5   r   rN   rR   r_   rk   rp   r|   ordr   rP  cr   r   r   r   r   r   r   r   r   r   r   r   	toordinalr   r   r   r   r   r   r   r   rw   ry   r   r)  r;  rU  r]  r_  rx  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r_  itemsr  r  r   r)  r9  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r  r  r"  r&  r*  r-  r:  rB  rE  rM  rH  rf  rt  ry  r|  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	   r
   r   r   r+   r,   r   r    r!   r"   r-   r)   r'   r#   r$   r%   r&   r(   r  r   max_type_idr  r  r  r$  r)  r0  r9  rA  rD  rG  rL  rS  rW  r\  rd  rg  rm  r  rK   rO   rM   <module>r~     sj  $ # " " " " " $ $ $ $ $ $    ( ( ( ( ( ( ( (        



  



 $ $ $ $ $ $ a!F= = =	 t|FIQ/// 4<
$H$H$H! ! !IsJ 	J 	J	
 	J 	K 	K 	K 	OS 	J 	K 	K 	K 	K 	K  	D!" 	##$ 	 %M3NC)  . , /D E E O^^Aq))NNN5!,,NNN9a00M>>-33	   I I I   0 0 0 0,< < <E E E  CIIuCIIuCIIuCIIuCHHe  
q" 3 3A'''%21]]]"@ @ @0 0 0 0
 
 
 
& & &G G G  ' ' '- - -  & & &( ( ( X]4A&&0022

% 
% 
%& & & + + +(! ! !
       ) ) ) ) ) ) ) )D' ' ' ' ' ' ' '8' ' ' ' ' ' ' '4       <&) &) &) &) &) &) &) &)R2 2 2 2 2 2 2 2j1 1 1 1 19 1 1 1
( 
( 
( 
( 
() 
( 
( 
(       0% % % % %u % % %" " " " " " " "J( ( ( ( ( ( ( (8(7 (7 (7 (7 (7& (7 (7 (7V9 9 9 9 9 9 9 9:' ' ' ' 'X ' ' 'D
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+
, 
, 
, 
, 
,X 
, 
, 
,8 8 8 8 8 8 8 8& :j"233L L L L Lx L L L"    (   & 
?,MNN 
sD	!	!	sF	#	# 
:: :: :: :: :: :: :: ::z! ! ! ! ! ! ! !! ! ! ! ! ! ! !
 
	  
 ,2244   7 7 7 7 7 7 7 7(	7 	7 	7 	7 	7 	7 	7 	7% % % % % % % %&% % % % % % % %$&&9& & 	&
 (& & (& & (& & Y& & )& (& (&  (!&" (#& &$ [%&& )'&( .)&*  9+&, J-&. l/&0 l1&2 &3&4 |5&6 (7&8 ~9&: .;&< =&> \?&@ *A&B uC&D )E& &F &#"K& & &
R3 3 3 3 3 3 3 30* * * * *; * * *	< 	< 	< 	< 	<k 	< 	< 	<
@ 
@ 
@ 
@ 
@? 
@ 
@ 
@1 1 1 1 1 1 1 1> > > > > > > >5 5 5 5 5k 5 5 5&
> 
> 
> 
> 
> 
> 
> 
>< < < < <_ < < <$
' 
' 
' 
' 
'K 
' 
' 
'7 7 7 7 7 7 7 7	W 	W 	W 	W 	W{ 	W 	W 	W> > > > >; > > >*( *( *( *( *( *( *( *(Z# # # # # # # #9 9 9 9 9= 9 9 9"
? 
? 
? 
? 
? 
? 
? 
?	H 	H 	H 	H 	H+ 	H 	H 	H	H 	H 	H 	H 	H+ 	H 	H 	HF F F F F] F F F	P 	P 	P 	P 	P 	P 	P 	PB B B B B= B B B*5 5 5 5 5m 5 5 5,? ? ? ? ?#: ? ? ?, , , , ,m , , ,	9 	9 	9 	9 	9M 	9 	9 	9( ( ( ( (- ( ( (09 9 9 9 9} 9 9 9"" " " " "m " " "< < < < <} < < < K K K K K] K K KV. V. V. V. V. V. V. V.r* * * * *. * * *2
@ 
@ 
@ 
@ 
@5 
@ 
@ 
@0 0 0 0 04 0 0 00 0 0 0 04 0 0 0
* 
* 
* 
* 
*2 
* 
* 
*	0 	0 	0 	0 	0 7 	0 	0 	08 8 8 8 8$; 8 8 8; ; ; ; ;&= ; ; ;; ; ; ; ;+B ; ; ;' ' ' ' '. ' ' '<' ' ' ' '&6 ' ' '8* * * * *- * * *D, , , , , , , ,63 3 3 3 3 3 3 32       ' ' ' ' 'M ' ' '1 1 1 1 1} 1 1 11 1 1 1 1} 1 1 10 0 0 0 0m 0 0 00 0 0 0 0m 0 0 0. . . . .M . . .3 3 3 3 3 3 3 3. . . . . . . .7 7 7 7 7] 7 7 79 9 9 9 9} 9 9 9> > > > >M > > >1 1 1 1 1} 1 1 10 0 0 0 0- 0 0 09 9 9 9 9} 9 9 9+ + + + + + + ++ + + + +] + + +& & & & &= & & &) ) ) ) )m ) ) )- - - - -- - - -. . . . .= . . .- - - - -- - - -, , , , , , , , ,.ABB5G^^M:665 	I~~.>>5
 	J/==5 	I~~.
;;5 	K 0,??5 	J/==5 	K 0,??5 	J/==5 	K 0,??5 	J/==5 	O^^$4oFF5 	J/==5 	K 0,??5" 	K 3\BB#5$ 	K 3\BB%5& 	~~&9;LMM'5( 	~~&9;LMM)5 5, 	NN+C+@B B-52 	K>>354 	K>>556 	NNN#5GG758 	K|<<95: 	K|<<;5< 	M>>"3^DD=5> 	..)?)<> >?5B 	NN+C+@B BC5F 	 ..1N1K#M #MG5L 	O^^$46FGGM5N 	O^^$46FGGO5R 	I~~/<<S5T 	O^^$5GGU5V 	..)?)<> >W5Z 	Hnn\955[5^ 	K>>_5 5` 	~~&:<MNNnn%8:JKKO^^$79IJJNNN#5GGi5 5 n c#$$q(  8; 8; 8; 8; 8; 8; 8; 8;v6 6 6 6 6M 6 6 6$G G G G G G G G"G G G G G G G G*= = = = = = = =8( ( ( ( ( ( ( (:Q Q Q Q Q, Q Q QE E E E E& E E E0 0 0 0 0 0 0 0(G G G G G G G G.
B 
B 
B 
B 
B 
B 
B 
BA A A A A A A A* * * * * * * *(ggnc:: ggnc:: .	
 L 23I 55 55 56J L  , ] ]  2  ,!" ]#$ L% ,-& -& -&`
7 
7 
7 zDFFFFF rO   