§
    è‘j  ã                  óÂ   — U d dl mZ d dlmZmZ d dlmZ erd dlmZ d dlm	Z	 ed         Z
ded<   ed	         Zded
<   ed         Zded<   daded<    G d„ d¦  «        ZdS )é    )Úannotations)ÚTYPE_CHECKINGÚLiteral)Úissue_unstable_warning)Ú
Collection)Ú	TypeAlias)ÚupcastÚdowncastr   ÚFloatCastOption)r	   zallow-floatÚIntegerCastOption)únanosecond-downcastúconvert-timezoneÚDatetimeCastOptionNzScanCastOptions | NoneÚ_DEFAULT_CAST_OPTIONS_ICEBERGc                  ó\   — e Zd ZdZddddddddœdd„Zedd„¦   «         Zedd„¦   «         ZdS )ÚScanCastOptionszOptions for scanning files.ÚforbidÚraiseF©Úinteger_castÚ
float_castÚdatetime_castÚmissing_struct_fieldsÚextra_struct_fieldsÚcategorical_to_stringÚ_internal_callr   úELiteral['forbid'] | IntegerCastOption | Collection[IntegerCastOption]r   úALiteral['forbid'] | FloatCastOption | Collection[FloatCastOption]r   úGLiteral['forbid'] | DatetimeCastOption | Collection[DatetimeCastOption]r   úLiteral['insert', 'raise']r   úLiteral['ignore', 'raise']r   úLiteral['allow', 'forbid']r   ÚboolÚreturnÚNonec               ó|   — |st          d¦  «         || _        || _        || _        || _        || _        || _        dS )a§  
        Common configuration for scanning files.

        .. warning::
            This functionality is considered **unstable**. It may be changed
            at any point without it being considered a breaking change.

        Parameters
        ----------
        integer_cast
            Configuration for casting from integer types:

            * `upcast`: Allow lossless casting to wider integer types.
            * `forbid`: Raises an error if dtypes do not match.

        float_cast
            Configuration for casting from float types:

            * `upcast`: Allow casting to higher precision float types.
            * `downcast`: Allow casting to lower precision float types.
            * `forbid`: Raises an error if dtypes do not match.

        datetime_cast
            Configuration for casting from datetime types:

            * `nanosecond-downcast`: Allow nanosecond precision datetime to be             downcasted to any lower precision. This has a similar effect to             PyArrow's `coerce_int96_timestamp_unit`.
            * `convert-timezone`: Allow casting to a different timezone.
            * `forbid`: Raises an error if dtypes do not match.

        missing_struct_fields
            Configuration for behavior when struct fields defined in the schema
            are missing from the data:

            * `insert`: Inserts the missing fields.
            * `raise`: Raises an error.

        extra_struct_fields
            Configuration for behavior when extra struct fields outside of the
            defined schema are encountered in the data:

            * `ignore`: Silently ignores.
            * `raise`: Raises an error.

        categorical_to_string
            Configuration for behavior when reading in a column whose expected
            type is string, but type in the file is categorical.

            * `allow`: Categorical is casted to string.
            * `forbid`: Raises an error.

        z'ScanCastOptions is considered unstable.N)r   r   r   r   r   r   r   )Úselfr   r   r   r   r   r   r   s           úh/home/longshao/multi-rider-rag/.venv/lib/python3.11/site-packages/polars/io/scan_options/cast_options.pyÚ__init__zScanCastOptions.__init__   sR   € ðL ð 	NÝ"Ð#LÑMÔMÐMà(ˆÔØ$ˆŒØ*ˆÔØ%:ˆÔ"Ø#6ˆÔ Ø%:ˆÔ"Ð"Ð"ó    c                 ó"   — t          d¬¦  «        S )NT)r   )r   © r*   r(   Ú_defaultzScanCastOptions._defaultg   s   € å¨dÐ3Ñ3Ô3Ð3r*   c           	     óR   — t           €t          dddgddgdddd	¬
¦  «        a t           S )zÓ
        Default options suitable for Iceberg / Deltalake.

        This in general has all casting options enabled. Note: do not modify the
        returned config object, it is a cached global object.
        Nr	   r
   r   r   ÚinsertÚignoreÚallowTr   )r   r   )Úclss    r(   Ú_default_icebergz ScanCastOptions._default_icebergk   sG   € õ )Ð0Ý,;Ø%Ø$ jÐ1Ø4Ð6HÐIØ&.Ø$,Ø&-Ø#ð-ñ -ô -Ð)õ -Ð,r*   N)r   r   r   r   r   r   r   r    r   r!   r   r"   r   r#   r$   r%   )r$   r   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r)   Ústaticmethodr-   Úclassmethodr3   r,   r*   r(   r   r      sš   € € € € € Ø%Ð%ð +3ð )1ð ,4Ø<CØ:AØ<DØ$ðN;ð N;ð N;ð N;ð N;ð N;ðb ð4ð 4ð 4ñ „\ð4ð ð-ð -ð -ñ „[ð-ð -ð -r*   r   )Ú
__future__r   Útypingr   r   Úpolars._utils.unstabler   Úcollections.abcr   r   r   Ú__annotations__r   r   r   r   r,   r*   r(   ú<module>r?      s  ðØ "Ð "Ð "Ð "Ð "Ð "Ð "à )Ð )Ð )Ð )Ð )Ð )Ð )Ð )à 9Ð 9Ð 9Ð 9Ð 9Ð 9àð !Ø*Ð*Ð*Ð*Ð*Ð*Ø Ð Ð Ð Ð Ð ð %Ð%9Ô:€Ð :Ð :Ð :Ñ :Ø&Ð'>Ô?Ð Ð ?Ð ?Ð ?Ñ ?Ø 'Ð(QÔ RÐ Ð RÐ RÐ RÑ Rà8<Ð Ð <Ð <Ð <Ñ <ðm-ð m-ð m-ð m-ð m-ñ m-ô m-ð m-ð m-ð m-r*   