
    ɯeiv                        d Z ddlZddlZddlZddlZddlmZ ddlmZm	Z	 ddl
mZ ddlmZ ddlmZ ddlmZmZmZmZmZmZ  G d d	eed
      Z G d dee      Zee_         G d dee      Zee_         G d dee      Z G d dee      Zee_        ee_         G d dee      Z  G d dee      Z! G d dee      Z" G d dee      Z# G d dee      Z$ G d d ee      Z% G d! d"ee      Z& G d# d$ee      Z' G d% d&ee      Z( G d' d(ee      Z) G d) d*ee      Z* G d+ d,ee      Z+ G d- d.ee      Z, G d/ d0ee      Z- G d1 d2ee      Z. G d3 d4ee      Z/ G d5 d6ee      Z0 G d7 d8ee      Z1 G d9 d:ee      Z2 G d; d<ee      Z3 G d= d>ee      Z4 G d? d@ee      Z5 G dA dBee      Z6 G dC dDee      Z7 G dE dFee8      Z9 G dG dHee      Z: G dI dJee      Z; G dK dLee      Z< G dM dNee      Z= G dO dPe e      Z> G dQ dRe e      Z? ee?e>      e?_@         G dS dTe e      ZA G dU dVe e      ZB eeBeA      eB_@         G dW dXee      ZC G dY dZee      ZD G d[ d\ee      ZE G d] d^ee      ZF G d_ d`ee      ZG G da dbee      ZH G dc ddee      ZI G de dfee      ZJdhdgZK eK        y)izBModule houses Modin configs originated from environment variables.    N)dedent)AnyOptional)version)doc)_TYPE_PARAMS_UNSETDeprecationDescriptorExactStr	ParameterValueSourcec                   R    e Zd ZU dZdZee   ed<   edefd       Z	edefd       Z
y)EnvironmentVariablez9Base class for environment variables-based configuration.Nvarnamereturnc                 j    | j                   t        d      t        j                  | j                      S )a
  
        Read the value from environment variable.

        Returns
        -------
        str
            Config raw value.

        Raises
        ------
        TypeError
            If `varname` is None.
        KeyError
            If value is absent.
        zvarname should not be None)r   	TypeErrorosenvironclss    i/var/www/html/glpi_dashboard/venv/lib/python3.12/site-packages/snowflake/snowpark/modin/config/envvars.py_get_raw_from_configz(EnvironmentVariable._get_raw_from_config-   s-    " ;;899zz#++&&    c                    | j                    dt        | j                  xs d      j                          dt        | j
                     j                   }| j                  r)|ddj                  d | j                  D               dz  }|S )zm
        Generate user-presentable help for the config.

        Returns
        -------
        str
        z: Unknownz

	Provide z (valid examples are: , c              3   2   K   | ]  }t        |        y w)N)str).0cs     r   	<genexpr>z/EnvironmentVariable.get_help.<locals>.<genexpr>M   s     6S!s1v6Ss   ))	r   r   __doc__stripr   typehelpchoicesjoin)r   r'   s     r   get_helpzEnvironmentVariable.get_helpB   s     ++b(@y!A!G!G!I J,WcdgdldlWmWrWrVst;;,TYY6Ss{{6S-S,TTUVVDr   )__name__
__module____qualname__r$   r   r   r   __annotations__classmethodr   r*    r   r   r   r   (   sG    C!GXc]!'S ' '(   r   r   T)r&   abstractc                       e Zd ZdZdZdZy)$SnowflakeModinTelemetryFlushIntervalz
    Minimum number of seconds between a flush of telemetry to snowflake
    from metrics generated in the client modin layer.
    (SNOWFLAKE_MODIN_TELEMETRY_FLUSH_INTERVAL   Nr+   r,   r-   r$   r   defaultr0   r   r   r3   r3   Q   s    
 9GGr   r3   )r&   c                       e Zd ZdZdZdZy)SnowflakeModinTelemetryEnabledz
    Enable or disable telemetry sent to Snowflake from the modin
    client. This only includes telemetry sent through the modin
    metrics events, not all snowpark telemetry generated through lazily
    evaluated queries on the Snowflake backend.
    !SNOWFLAKE_MODIN_TELEMETRY_ENABLEDTNr6   r0   r   r   r9   r9   ^   s     2GGr   r9   c                       e Zd ZdZdZdZy) SnowflakePandasTransferThresholdz{
    Targeted max number of dataframe rows which should be transferred from
    Snowflake when using hybrid execution.
    SNOWFLAKE_PANDAS_MAX_XFER_ROWSi Nr6   r0   r   r   r<   r<   m   s    
 /GGr   r<   c                       e Zd ZdZdZdZy)&PandasToSnowflakeParquetThresholdBytesz
    When a pandas-backend dataframe's shallow memory usage exceeds this
    threshold, implement to_snowflake() by writing the dataframe to a parquet
    file and loading the parquet file into Snowflake.
    .SNOWFLAKE_PANDAS_MAX_TO_SNOWFLAKE_MEMORY_BYTESi- Nr6   r0   r   r   r?   r?   w   s     ?G Gr   r?   c                   p     e Zd ZdZdZeded    fd       Zedef fd       Z	ededdf fd       Z
 xZS )	EnvWithSibilingsz9Ensure values synchronization between sibling parameters.Tr   c                     t               )zReturn a sibling parameter.)NotImplementedErrorr   s    r   _siblingzEnvWithSibilings._sibling   s     "##r   c                    | j                         }|j                  t        u r| j                  t        u rt        |           t        j                         5  t        j                  dt               t        t        |          ddd       | j                  |j                  cxk(  rt        j                  k(  r)n n&t        d| j                   d|j                   d      ddlm} | j                  t        j                  k(  rT|j#                  |j                  t        j$                  k7  	       | j                  |_        t        j                  |_
        n|j                  t        j                  k(  rT|j#                  | j                  t        j$                  k7  	       |j                  | _        t        j                  | _
        n]|j#                  | j                  t        j$                  k7  xs |j                  t        j$                  k7  	       | j                  |_        t        |          S # 1 sw Y   xY w)
z
        Get parameter's value and ensure that it's equal to the sibling's value.

        Returns
        -------
        Any
        ignorecategoryNz,Configuration is ambiguous. You cannot set 'z' and 'z' at the same time.r   )ErrorMessage)failure_condition)rE   _valuer	   supergetwarningscatch_warningsfilterwarningsFutureWarningrB   _value_sourcer   GOT_FROM_CFG_SOURCE
ValueErrorr   3snowflake.snowpark.modin.plugin.utils.error_messagerJ   catch_bugs_and_request_emailDEFAULT)r   siblingrJ   	__class__s      r   rN   zEnvWithSibilings.get   s    ,,.>>V#

f(<GKM((* 7''=I&467 !!((3223 !B3;;-wW^WfWfVggz{  Y  K$C$CC99&-&;&;{?R?R&R :  "%(3(G(G%&&+*I*II99&)&7&7;;N;N&N :  %^^
$/$C$C!99&)&7&7;;N;N&N 'D,,0C0CC : 
 "%w{}M7 7s   .H99IvalueNc                 :   t         |   |       | j                  rgd| _        	 t        j                         5  t        j
                  dt               | j                         j                  |       ddd       d| _        yy# 1 sw Y   xY w# d| _        w xY w)z
        Set a new value to this parameter as well as to its sibling.

        Parameters
        ----------
        value : Any
        FrG   rH   NT)rM   put_update_siblingrO   rP   rQ   rR   rE   r   r[   rZ   s     r   r]   zEnvWithSibilings.put   s     	E"'C+,,. .++H}MLLN&&u-.
 '+# . .
 '+#s"   B ;B4B B
B 	B)r+   r,   r-   r$   r^   r/   r&   rE   r   rN   r]   __classcell__rZ   s   @r   rB   rB      sk     DO$01 $ $ 2C 2 2h + + + +r   rB   c                       e Zd ZdZdZy)IsDebugzDForce Modin engine to be "Python" unless specified by $MODIN_ENGINE.MODIN_DEBUGNr+   r,   r-   r$   r   r0   r   r   rc   rc      s
    NGr   rc   c                        e Zd ZdZdZdZdhZdZede	fd       Z
e eej                  j                        dedef fd	              Z xZS )
Enginez&Distribution engine to run queries by.MODIN_ENGINE)RayDaskPythonNativeUnidistrk   Fr   c                    ddl m}m}m} t        j                         s| j                  ry	 ddl}t        j                  |j                        |k  rt        dd| dz         y# t        $ r Y nw xY w	 ddl}ddl}t        j                  |j                        |k  s"t        j                  |j                        |k  rt        d	| d      y
# t        $ r Y nw xY w	 ddlm} y# t        $ r Y nw xY w	 ddl}t        j                  |j                        |k  rt        dd| dz         y# t        $ r Y t        d      w xY w)z_
        Get default value of the config.

        Returns
        -------
        str
        r   )MIN_DASK_VERSIONMIN_RAY_VERSIONMIN_UNIDIST_VERSIONrk   NzDPlease `pip install "modin[ray]"` to install compatible Ray version z(>=z).ri   zIPlease `pip install "modin[dask]"` to install compatible Dask version (>=rj   )DbWorkerrl   zQPlease `pip install "unidist[mpi]"` to install compatible unidist on MPI version rm   zDPlease refer to installation documentation page to install an engine)snowflake.snowpark.modin.utilsro   rp   rq   rc   rN   has_custom_enginerayr   parse__version__ImportErrordaskdistributedPmodin.experimental.core.execution.native.implementations.hdk_on_native.db_workerrr   unidist)	r   ro   rp   rq   ru   ry   rz   rr   r|   s	            r   _get_defaultzEngine._get_default   s   	
 	
 ;;=C11	
 }}S__-?!!O,B/0 
   			 d../2BB==!8!89<LL!_`p_qqst    				   			
 }}W0014GG!!/034 
   	 R
 	
	sG   A& &	A21A26C 	CC"C) )	C54C59D2 2	EEchoicec                 j    t         |   |      }| j                  j                  |       d| _        |S )NT)rM   
add_optionNOINIT_ENGINESaddrt   )r   r~   rZ   s     r   r   zEngine.add_optionB  s5     #F+v& $r   )r+   r,   r-   r$   r   r(   r   rt   r/   r   r}   r   r   r   r   r`   ra   s   @r   rg   rg      s|    0G<G 	N G
S G
 G
R 			%	%&   ' r   rg   c                       e Zd ZdZdZdZdZy)StorageFormatz/Engine to run on a single node of distribution.MODIN_STORAGE_FORMATPandas)r   HdkCudfNr+   r,   r-   r$   r   r7   r(   r0   r   r   r   r   K  s    9$GG'Gr   r   c                       e Zd ZdZdZy)IsExperimentalz)Whether to Turn on experimental features.MODIN_EXPERIMENTALNre   r0   r   r   r   r   S  s
    3"Gr   r   c                       e Zd ZdZdZy)IsRayClusterz8Whether Modin is running on pre-initialized Ray cluster.MODIN_RAY_CLUSTERNre   r0   r   r   r   r   Y  s
    B!Gr   r   c                       e Zd ZdZdZy)RayRedisAddressz8Redis address to connect to when running in Ray cluster.MODIN_REDIS_ADDRESSNre   r0   r   r   r   r   _  s
    B#Gr   r   c                   8    e Zd ZdZdZ ej                  d      Zy)RayRedisPasswordz-What password to use for connecting to Redis.MODIN_REDIS_PASSWORD    N)r+   r,   r-   r$   r   secrets	token_hexr7   r0   r   r   r   r   e  s    7$Gg#Gr   r   c                   *    e Zd ZdZdZedefd       Zy)CpuCountzDHow many CPU cores to use during initialization of the Modin engine.
MODIN_CPUSr   c                 *    ddl }|j                         S )_
        Get default value of the config.

        Returns
        -------
        int
        r   N)multiprocessing	cpu_count)r   r   s     r   r}   zCpuCount._get_defaultq  s     	((**r   N)r+   r,   r-   r$   r   r/   intr}   r0   r   r   r   r   l  s#    NG
+S 
+ 
+r   r   c                       e Zd ZdZdZy)GpuCountz=How may GPU devices to utilize across the whole distribution.
MODIN_GPUSNre   r0   r   r   r   r     s
    GGr   r   c                       e Zd ZdZdZy)Memorya  
    How much memory (in bytes) give to an execution engine.

    Notes
    -----
    * In Ray case: the amount of memory to start the Plasma object store with.
    * In Dask case: the amount of memory that is given to each worker depending on CPUs used.
    MODIN_MEMORYNre   r0   r   r   r   r     s     Gr   r   c                   D    e Zd ZdZdZededdfd       Zedefd       Zy)NPartitionszCHow many partitions to use for a Modin DataFrame (along each axis).MODIN_NPARTITIONSr[   r   Nc                 j    | j                         t        j                  k(  r| j                  |       yy)aC  
        Put specific value if NPartitions wasn't set by a user yet.

        Parameters
        ----------
        value : int
            Config value to set.

        Notes
        -----
        This method is used to set NPartitions from cluster resources internally
        and should not be called by a user.
        N)get_value_sourcer   rX   r]   )r   r[   s     r   _putzNPartitions._put  s+     ![%8%88GGEN 9r   c                     t         j                         dk(  rt        j                         S t        j                         S )r   r   )r   rN   r   r   r   s    r   r}   zNPartitions._get_default  s-     &(<<>!<<>!r   )	r+   r,   r-   r$   r   r/   r   r   r}   r0   r   r   r   r     sE    M!G   " "S " "r   r   c                       e Zd ZdZdZy)HdkFragmentSizezDHow big a fragment in HDK should be when creating a table (in rows).MODIN_HDK_FRAGMENT_SIZENre   r0   r   r   r   r     s
    N'Gr   r   c                       e Zd ZdZdZdZy)DoUseCalcitez1Whether to use Calcite for HDK queries execution.MODIN_USE_CALCITETNr6   r0   r   r   r   r     s    ;!GGr   r   c                       e Zd ZdZdZdZy)TestDatasetSizez$Dataset size for running some tests.MODIN_TEST_DATASET_SIZE)SmallNormalBigN)r+   r,   r-   r$   r   r(   r0   r   r   r   r     s    .'G(Gr   r   c                   2    e Zd ZdZdZej                  dk7  Zy)TrackFileLeaksz>Whether to track for open file handles leakage during testing.MODIN_TEST_TRACK_FILE_LEAKSwin32N)r+   r,   r-   r$   r   sysplatformr7   r0   r   r   r   r     s    H+G llg%Gr   r   c                       e Zd ZdZdZdZdZy)AsvImplementationzDAllows to select a library that we will use for testing performance.MODIN_ASV_USE_IMPL)modinpandasr   Nr+   r,   r-   r$   r   r(   r7   r0   r   r   r   r     s    N"G!GGr   r   c                       e Zd ZdZdZdZy)AsvDataSizeConfigz1Allows to override default size of data (shapes).MODIN_ASV_DATASIZE_CONFIGNr6   r0   r   r   r   r     s    ;)GGr   r   c                   b     e Zd ZdZdZdZed
d       Zed
d       Zede	ddf fd	       Z
 xZS )ProgressBarz(Whether or not to show the progress bar.MODIN_PROGRESS_BARFr   Nc                 &    | j                  d       y)zEnable ``ProgressBar`` feature.TNr]   r   s    r   enablezProgressBar.enable  s     	r   c                 &    | j                  d       y)z Disable ``ProgressBar`` feature.FNr   r   s    r   disablezProgressBar.disable  s     	r   r[   c                 f    |rt         j                         rt        d      t        |   |       y)z
        Set ``ProgressBar`` value only if synchronous benchmarking is disabled.

        Parameters
        ----------
        value : bool
            Config value to set.
        z/ProgressBar isn't compatible with BenchmarkModeN)BenchmarkModerN   rU   rM   r]   r_   s     r   r]   zProgressBar.put  s+     ]&&(NOOEr   r   N)r+   r,   r-   r$   r   r7   r/   r   r   boolr]   r`   ra   s   @r   r   r     sX    2"GG       r   r   c                   >     e Zd ZdZdZdZededdf fd       Z xZ	S )r   z5Whether or not to perform computations synchronously.MODIN_BENCHMARK_MODEFr[   r   Nc                 f    |rt         j                         rt        d      t        |   |       y)z
        Set ``BenchmarkMode`` value only if progress bar feature is disabled.

        Parameters
        ----------
        value : bool
            Config value to set.
        z/BenchmarkMode isn't compatible with ProgressBarN)r   rN   rU   rM   r]   r_   s     r   r]   zBenchmarkMode.put  s)     [__&NOOEr   )
r+   r,   r-   r$   r   r7   r/   r   r]   r`   ra   s   @r   r   r     s0    ?$GG   r   r   c                   R    e Zd ZdZdZdZdZed	d       Zed	d       Z	ed	d       Z
y)
LogModez.Set ``LogMode`` value if users want to opt-in.MODIN_LOG_MODE)r   r   enable_api_onlyr   Nc                 &    | j                  d       y)zEnable all logging levels.r   Nr   r   s    r   r   zLogMode.enable!  s     	r   c                 &    | j                  d       y)zDisable logging feature.r   Nr   r   s    r   r   zLogMode.disable&  s     		r   c                 &    | j                  d       y)zEnable API level logging.r   Nr   r   s    r   r   zLogMode.enable_api_only+  s     	!"r   r   )r+   r,   r-   r$   r   r(   r7   r/   r   r   r   r0   r   r   r   r     sN    8G6GG    # #r   r   c                   X     e Zd ZdZdZdZededdf fd       Zedef fd       Z	 xZ
S )	LogMemoryIntervalz@Interval (in seconds) to profile memory utilization for logging.MODIN_LOG_MEMORY_INTERVALr5   r[   r   Nc                 J    |dk  rt        d|       t        | 	  |       y)z
        Set ``LogMemoryInterval`` with extra checks.

        Parameters
        ----------
        value : int
            Config value to set.
        r   z0Log memory Interval should be > 0, passed value NrU   rM   r]   r_   s     r   r]   zLogMemoryInterval.put7  s,     A:OPUwWXXEr   c                 <    t         |          }|dkD  sJ d       |S )zk
        Get ``LogMemoryInterval`` with extra checks.

        Returns
        -------
        int
        r   z!`LogMemoryInterval` should be > 0rM   rN   )r   log_memory_intervalrZ   s     r   rN   zLogMemoryInterval.getE  s+     $gkm"Q&K(KK&""r   r+   r,   r-   r$   r   r7   r/   r   r]   rN   r`   ra   s   @r   r   r   1  sK    J)GG    
#C 
# 
#r   r   c                   X     e Zd ZdZdZdZededdf fd       Zedef fd       Z	 xZ
S )	LogFileSizez1Max size of logs (in MBs) to store per Modin job.MODIN_LOG_FILE_SIZE
   r[   r   Nc                 J    |dk  rt        d|       t        | 	  |       y)z
        Set ``LogFileSize`` with extra checks.

        Parameters
        ----------
        value : int
            Config value to set.
        r   z-Log file size should be > 0 MB, passed value Nr   r_   s     r   r]   zLogFileSize.putY  s+     A:LUGTUUEr   c                 <    t         |          }|dkD  sJ d       |S )ze
        Get ``LogFileSize`` with extra checks.

        Returns
        -------
        int
        r   z`LogFileSize` should be > 0r   )r   log_file_sizerZ   s     r   rN   zLogFileSize.getg  s*     q ?"?? r   r   ra   s   @r   r   r   S  sK    ;#GG    
C 
 
r   r   c                       e Zd ZdZdZdZy)PersistentPicklez+Whether serialization should be persistent.MODIN_PERSISTENT_PICKLEFNr6   r0   r   r   r   r   u  s    5'G
 Gr   r   c                   L     e Zd ZdZdZedef fd       Zedefd       Z	 xZ
S )HdkLaunchParametersa  
    Additional command line options for the HDK engine.

    Please visit OmniSci documentation for the description of available parameters:
    https://docs.omnisci.com/installation-and-configuration/config-parameters#configuration-parameters-for-omniscidb
    MODIN_HDK_LAUNCH_PARAMETERSr   c           
          t         |          }| j                         j                         }|j	                  |j                         D ci c]  \  }}|j                  dd      | c}}       |S c c}}w )z
        Get the resulted command-line options.

        Decode and merge specified command-line options with the default one.

        Returns
        -------
        dict
            Decoded and verified config value.
        -_)rM   rN   r}   copyupdateitemsreplace)r   custom_parametersresultkeyr[   rZ   s        r   rN   zHdkLaunchParameters.get  sl     "GKM!!#((*<M<S<S<UVjc5S[[c"E)V	
  Ws   A3
c           	          t        | dd      x}Xdddddddddx| _        }	 ddl}t        j                  |j
                        t        j                  d      k\  r
d|d<   d|d	<   |S |S # t        $ r Y |S w xY w)
z
        Get default value of the config. Checks the pyhdk version and omits variables unsupported in prior versions.

        Returns
        -------
        dict
            Config keys and corresponding values.
        r7   N   r   )enable_unionenable_columnar_outputenable_lazy_fetchnull_div_by_zeroenable_watchdogenable_thrift_logs!enable_multifrag_execution_resultcpu_onlyz0.6.1 enable_lazy_dict_materialization	pyhdk_loglog_dir)getattrr7   pyhdkr   rv   rw   rx   )r   r7   r  s      r   r}   z HdkLaunchParameters._get_default  s     sIt44G= !*+%&$%#$&'56	% 	CK'==!2!23w}}W7MMBCG>?)4GI& w  s   AA* *	A76A7)r+   r,   r-   r$   r   r/   dictrN   r   r}   r`   ra   s   @r   r   r     sC     ,GD  $ S  r   r   c                   X     e Zd ZdZdZdZededdf fd       Zedef fd       Z	 xZ
S )	MinPartitionSizez
    Minimum number of rows/columns in a single pandas partition split.

    Once a partition for a pandas dataframe has more than this many elements,
    Modin adds another partition.
    MODIN_MIN_PARTITION_SIZEr   r[   r   Nc                 J    |dk  rt        d|       t        | 	  |       y)z
        Set ``MinPartitionSize`` with extra checks.

        Parameters
        ----------
        value : int
            Config value to set.
        r   z/Min partition size should be > 0, passed value Nr   r_   s     r   r]   zMinPartitionSize.put  s+     A:NugVWWEr   c                 <    t         |          }|dkD  sJ d       |S )zj
        Get ``MinPartitionSize`` with extra checks.

        Returns
        -------
        int
        r   z"`min_partition_size` should be > 0r   )r   min_partition_sizerZ   s     r   rN   zMinPartitionSize.get  s+     #W[]!A%K'KK%!!r   r   ra   s   @r   r  r    sO     )GG    
"C 
" 
"r   r  c                       e Zd ZdZdZdZy)TestReadFromSqlServerz,Set to true to test reading from SQL server.MODIN_TEST_READ_FROM_SQL_SERVERFNr6   r0   r   r   r  r    s    6/GGr   r  c                       e Zd ZdZdZdZy)TestReadFromPostgresz*Set to true to test reading from Postgres.MODIN_TEST_READ_FROM_POSTGRESFNr6   r0   r   r   r  r    s    4-GGr   r  c                       e Zd ZdZdZdZy)GithubCIz,Set to true when running Modin in GitHub CI.MODIN_GITHUB_CIFNr6   r0   r   r   r  r    s    6GGr   r  c                   4    e Zd ZdZdZdZedee   fd       Z	y)
ModinNumpyz7Set to true to use Modin's implementation of NumPy API.MODIN_NUMPYFr   c                     t         S zGet a parameter sibling.)ExperimentalNumPyAPIr   s    r   rE   zModinNumpy._sibling  s
     $#r   N
r+   r,   r-   r$   r   r7   r/   r&   rB   rE   r0   r   r   r  r    s.    AGG$./ $ $r   r  c                   4    e Zd ZdZdZdZedee   fd       Z	y)r#  z
    Set to true to use Modin's implementation of NumPy API.

    This parameter is deprecated. Use ``ModinNumpy`` instead.
    MODIN_EXPERIMENTAL_NUMPY_APIFr   c                     t         S r"  )r  r   s    r   rE   zExperimentalNumPyAPI._sibling  s
     r   Nr$  r0   r   r   r#  r#    s2     -GG./  r   r#  c                   4    e Zd ZdZdZdZedee   fd       Z	y)RangePartitioningGroupbya  
    Set to true to use Modin's range-partitioning group by implementation.

    Experimental groupby is implemented using a range-partitioning technique,
    note that it may not always work better than the original Modin's TreeReduce
    and FullAxis implementations. For more information visit the according section
    of Modin's documentation: TODO: add a link to the section once it's written.
     MODIN_RANGE_PARTITIONING_GROUPBYFr   c                     t         S r"  )ExperimentalGroupbyImplr   s    r   rE   z!RangePartitioningGroupby._sibling+  s
     '&r   Nr$  r0   r   r   r)  r)    s2     1GG'./ ' 'r   r)  c                   4    e Zd ZdZdZdZedee   fd       Z	y)r,  z
    Set to true to use Modin's range-partitioning group by implementation.

    This parameter is deprecated. Use ``RangePartitioningGroupby`` instead.
    MODIN_EXPERIMENTAL_GROUPBYFr   c                     t         S r"  )r)  r   s    r   rE   z ExperimentalGroupbyImpl._sibling;  s
     ('r   Nr$  r0   r   r   r,  r,  1  s2     +GG(./ ( (r   r,  c                       e Zd ZdZdZdZy)RangePartitioninga  
    Set to true to use Modin's range-partitioning implementation where possible.

    Please refer to documentation for cases where enabling this options would be beneficial:
    https://modin.readthedocs.io/en/stable/flow/modin/experimental/range_partitioning_groupby.html
    MODIN_RANGE_PARTITIONINGFNr6   r0   r   r   r1  r1  H  s     )GGr   r1  c                       e Zd ZdZdZdZy)CIAWSSecretAccessKeyzOSet to AWS_SECRET_ACCESS_KEY when running mock S3 tests for Modin in GitHub CI.AWS_SECRET_ACCESS_KEYfoobar_secretNr6   r0   r   r   r4  r4  T  s    Y%GGr   r4  c                       e Zd ZdZdZdZy)CIAWSAccessKeyIDzKSet to AWS_ACCESS_KEY_ID when running mock S3 tests for Modin in GitHub CI.AWS_ACCESS_KEY_ID
foobar_keyNr6   r0   r   r   r8  r8  [  s    U!GGr   r8  c                       e Zd ZdZdZdZy)AsyncReadModea`  
    It does not wait for the end of reading information from the source.

    It basically means, that the reading function only launches tasks for the dataframe
    to be read/created, but not ensures that the construction is finalized by the time
    the reading function returns a dataframe.

    This option was brought to improve performance of reading/construction
    of Modin DataFrames, however it may also:

    1. Increase the peak memory consumption. Since the garbage collection of the
    temporary objects created during the reading is now also lazy and will only
    be performed when the reading/construction is actually finished.

    2. Can break situations when the source is manually deleted after the reading
    function returns a result, for example, when reading inside of a context-block
    that deletes the file on ``__exit__()``.
    MODIN_ASYNC_READ_MODEFNr6   r0   r   r   r<  r<  b  s    & &GGr   r<  c                       e Zd ZdZdZdZdZy)ReadSqlEnginezEngine to run `read_sql`.MODIN_READ_SQL_ENGINEr   )r   
ConnectorxNr   r0   r   r   r?  r?  z  s    #%GG&Gr   r?  c                       e Zd ZdZdZdZdZy)LazyExecutiona  
    Lazy execution mode.

    Supported values:
        `Auto` - the execution mode is chosen by the engine for each operation (default value).
        `On`   - the lazy execution is performed wherever it's possible.
        `Off`  - the lazy execution is disabled.
    MODIN_LAZY_EXECUTION)AutoOnOffrE  Nr   r0   r   r   rC  rC    s     %G#GGr   rC  c                       e Zd ZdZdZdZy)	DocModulez
    The module to use that will be used for docstrings.

    The value set here must be a valid, importable module. It should have
    a `DataFrame`, `Series`, and/or several APIs directly (e.g. `read_csv`).
    MODIN_DOC_MODULEr   Nr6   r0   r   r   rI  rI    s     !GGr   rI  c                       e Zd ZdZdZdZy)DaskThreadsPerWorkerz"Number of threads per Dask worker.MODIN_DASK_THREADS_PER_WORKERr   Nr6   r0   r   r   rL  rL    s    ,-GGr   rL  c                     t               j                         D  ch c]:  } t        | t              r(t	        | t
              r| j                  s| j                  < }} |j                  g d       t        j                  D ch c]  }|j                  d      s| }}||z
  }t               j                         D  ci c]]  } t        | t              rKt	        | t
              r;| j                  s/| j                  #| j                  | j                  | j                  _ }} ||j                         z  }|r[t        j                  dt!        |      dkD  rdnd dd	t!        |      dkD  rd
nd dz   dj#                  t%        |            z          |D ]/  }t        j                  ||   j'                  d      t(               1 yc c} w c c}w c c} w )z
    Check validity of environment variables.

    Look out for any environment variables that start with "MODIN_" prefix
    that are unknown - they might be a typo, so warn a user.
    )MODIN_PYTEST_CMDMODIN_PYTEST_DAILY_CMDMODIN_PYTEST_NO_COV_CMDMODIN_Nz"Found unknown environment variabler   s ,z please check theiritsz spelling: r   T)use_envvar_names)globalsvalues
isinstancer&   
issubclassr   is_abstractr   r   r   r   
startswith_deprecation_descriptorkeysrO   warnlenr)   sorteddeprecation_messagerR   )objvalid_namesnamefound_namesunknown
deprecatedfound_deprecateddepr_vars           r   _check_varsrm    s    9##%c4 s/0	 	K  Q %'JJLD$//(2K4LKLK'G 9##%4c4 s/0KK#''3 	S0004J 4 #Z__%660Gq8Hb0QQRS#g,*:wFkRSiiw()	

 % 
x 44d4K	

9 M4s   ?GGG=A"Gr   )Lr$   r   r   r   rO   textwrapr   typingr   r   modin.configconfigmodin_config	packagingr   pandas.util._decoratorsr   &snowflake.snowpark.modin.config.pubsubr   r	   r
   r   r   r   r   r   r   r3   r   r9   r<   r?   rB   rc   rg   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,  r1  r4  r8  r<  r?  rC  rI  rL  rm  r0   r   r   <module>rv     sX  $ I 	  
     #  ' &)# &R+>S  5Y 1	%8t 	 /M +': 
-@s 
 1Q -*  3
W+ 
	W+t! \ s \~('c (#(t #"&T "$) $$* $+" +&" 
 s 
#"%C #"L() (&T )) )&(t &+( +( %D >'d *#! #.#+# #D%C D* <-D <~$"* $"N/d .T " 	$! 	$+$ $ 0E*0  ,
'/d '&(.T ($ 3H53  /
	+$ 	.S * 'd 0''c ''c 	#( 	.S '
T r   