§
    q-Phƒ  ã                  óX   — d dl mZ d dlmZ d dlmZ d dlmZ erd dlm	Z	m
Z
 edœdd„ZdS )é    )Úannotations)ÚTYPE_CHECKINGN)ÚDEFAULT_QUERY_OPT_FLAGS)Ú	LazyFrameÚQueryOptFlags)ÚoptimizationsÚlfr   r   r   ÚreturnÚbytesc               ó¨   — |                      ¦   «         }d|j        _        | j                             |j        ¦  «        }t          j        |¦  «        S )aO  
    Prepare the given LazyFrame for execution on Polars Cloud.

    Parameters
    ----------
    lf
        The LazyFrame to prepare.
    optimizations
        Optimizations to enable or disable in the query optimizer.

    Raises
    ------
    InvalidOperationError
        If the given LazyFrame is not eligible to be run on Polars Cloud.
        The following conditions will disqualify a LazyFrame from being eligible:

        - Contains a user-defined function
        - Scans or sinks to a local filesystem
    ComputeError
        If the given LazyFrame cannot be serialized.
    T)Ú__copy__Ú_pyoptflagsÚold_streamingÚ_ldfÚwith_optimizationsÚplrÚprepare_cloud_plan)r	   r   Úpylfs      úS/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/polars/_utils/cloud.pyr   r      sI   € ð4 "×*Ò*Ñ,Ô,€MØ.2€MÔÔ+ØŒ7×%Ò% mÔ&?Ñ@Ô@€DÝÔ! $Ñ'Ô'Ð'ó    )r	   r   r   r   r
   r   )Ú
__future__r   Útypingr   Úpolars.polarsÚpolarsr   Úpolars.lazyframe.opt_flagsr   r   r   r   © r   r   ú<module>r      sš   ðØ "Ð "Ð "Ð "Ð "Ð "à  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð Ð Ð Ø >Ð >Ð >Ð >Ð >Ð >àð 0Ø/Ð/Ð/Ð/Ð/Ð/Ð/Ð/ð $;ð(ð (ð (ð (ð (ð (ð (ð (r   