§
    Ò¬¸jÊ  ã                  ó   — U d dl mZ d dlmZ d dlmZmZmZ d dlm	Z	 erd dlm
Z
 ed         Zded<   ed	         Zded
<   ed         Zded<    ede¬¦  «        Zeee         z  Zded<   daded<    G d„ d¦  «        ZdS )é    )Úannotations)Ú
Collection)ÚTYPE_CHECKINGÚLiteralÚTypeVar)Úissue_unstable_warning)Ú	TypeAlias)ÚupcastÚdowncastÚforbidr	   ÚFloatCastOption)r
   zallow-floatr   ÚIntegerCastOption)úconvert-timezoneúnanosecond-downcastzmicrosecond-downcastzmicrosecond-upcastzmillisecond-upcastr   r
   r   ÚDatetimeCastOptionÚ_OptionT)ÚboundÚ_CastConfigNzScanCastOptions | NoneÚ_DEFAULT_CAST_OPTIONS_ICEBERGc                  óš   — e Zd ZU dZded<   ded<   ded<   ded	<   d
ed<   ded<   ddddddddœdd„Zedd„¦   «         Zedd„¦   «         Z	dS )ÚScanCastOptionsz)Cast options applied when scanning files.ú_CastConfig[IntegerCastOption]Úinteger_castú_CastConfig[FloatCastOption]Ú
float_castú_CastConfig[DatetimeCastOption]Údatetime_castúLiteral['insert', 'raise']Úmissing_struct_fieldsúLiteral['ignore', 'raise']Úextra_struct_fieldsúLiteral['allow', 'forbid']Úcategorical_to_stringr   ÚraiseF©r   r   r   r   r!   r#   Ú_internal_callr&   Ú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.
            * `allow-float`: Allow casting integers to float 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`.
            * `microsecond-downcast`: Allow microsecond precision datetime to be
              downcasted to millisecond precision.
            * `microsecond-upcast`: Allow microsecond precision datetime to be
              upcasted to nanosecond precision.
            * `millisecond-upcast`: Allow millisecond precision datetime to be
              upcasted to microsecond or nanosecond precision.
            * `downcast`: Allow downcasting to any lower precision (convenience
              aggregate of `nanosecond-downcast` and `microsecond-downcast`).
            * `upcast`: Allow upcasting to any higher precision (convenience
              aggregate of `millisecond-upcast` and `microsecond-upcast`).
            * `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           ús/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/polars/io/scan_options/cast_options.pyÚ__init__zScanCastOptions.__init__)   sR   € ðV ð 	NÝ"Ð#LÑMÔMÐMà(ˆÔØ$ˆŒØ*ˆÔØ%:ˆÔ"Ø#6ˆÔ Ø%:ˆÔ"Ð"Ð"ó    c                 ó"   — t          d¬¦  «        S )NT)r&   )r   © r.   r,   Ú_defaultzScanCastOptions._default   s   € å¨dÐ3Ñ3Ô3Ð3r.   c           	     óN   — t           €t          dddgd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_icebergƒ   sA   € õ )Ð0Ý,;Ø%Ø$ jÐ1Ø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__Ú__annotations__r-   Ústaticmethodr1   Úclassmethodr7   r0   r.   r,   r   r      sá   € € € € € € Ø3Ð3à0Ð0Ð0Ñ0Ø,Ð,Ð,Ñ,Ø2Ð2Ð2Ñ2Ø5Ð5Ð5Ñ5Ø3Ð3Ð3Ñ3Ø5Ð5Ð5Ñ5ð
 8@Ø3;Ø9AØ<CØ:AØ<DØ$ðS;ð S;ð S;ð S;ð S;ð S;ðl ð4ð 4ð 4ñ „\ð4ð ð-ð -ð -ñ „[ð-ð -ð -r.   r   )Ú
__future__r   Úcollections.abcr   Útypingr   r   r   Úpolars._utils.unstabler   r	   r   r<   r   r   Ústrr   r   r   r   r0   r.   r,   ú<module>rD      sJ  ðØ "Ð "Ð "Ð "Ð "Ð "Ð "à &Ð &Ð &Ð &Ð &Ð &Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2à 9Ð 9Ð 9Ð 9Ð 9Ð 9àð !Ø Ð Ð Ð Ð Ð ð %Ð%CÔD€Ð DÐ DÐ DÑ DØ&Ð'HÔIÐ Ð IÐ IÐ IÑ IØ 'ðô	!Ð ð 	ð 	ð 	ñ 	ð ˆ7�: SÐ)Ñ)Ô)€Ø! J¨xÔ$8Ñ8€Ð 8Ð 8Ð 8Ñ 8à8<Ð Ð <Ð <Ð <Ñ <ðy-ð y-ð y-ð y-ð y-ñ y-ô y-ð y-ð y-ð y-r.   