ó
    Ñ]j%  ã                   óD  • S SK Jr  S SKJr  S SKJr  S SKJr  \" S5       SSSSSSSSS.S	\S
\S-  S\	\\4   S-  S\
\   S-  S\S-  S\S\S-  S\S-  S\	\\4   S-  S\4S jjj5       r SSSSSS.S\S	\S
\S-  S\	\\4   S-  S\S-  S\S\	\\4   S-  SS4S jjjrg)é    )ÚAny)Úimport_optional_dependency)Ú
set_module)Ú	DataFrameÚpandasNT)Úcatalog_propertiesÚcolumnsÚ
row_filterÚcase_sensitiveÚsnapshot_idÚlimitÚscan_propertiesÚtable_identifierÚcatalog_namer   r	   r
   r   r   r   r   Úreturnc          	      ó  • [        S5      n	[        S5      n
Uc  0 nU	R                  " U40 UD6nUR                  U 5      nUc  U
R                  5       nUc  SnO[	        U5      nUc  0 nUR                  UUUUUUS9nUR                  5       $ )a  
Read an Apache Iceberg table into a pandas DataFrame.

.. versionadded:: 3.0.0

.. warning::

   read_iceberg is experimental and may change without warning.

Parameters
----------
table_identifier : str
    Table identifier.
catalog_name : str, optional
    The name of the catalog.
catalog_properties : dict of {str: str}, optional
    The properties that are used next to the catalog configuration.
columns : list of str, optional
    A list of strings representing the column names to return in the output
    dataframe.
row_filter : str, optional
    A string that describes the desired rows.
case_sensitive : bool, default True
    If True column matching is case sensitive.
snapshot_id : int, optional
    Snapshot ID to time travel to. By default the table will be scanned as of the
    current snapshot ID.
limit : int, optional
    An integer representing the number of rows to return in the scan result.
    By default all matching rows will be fetched.
scan_properties : dict of {str: obj}, optional
    Additional Table properties as a dictionary of string key value pairs to use
    for this scan.

Returns
-------
DataFrame
    DataFrame based on the Iceberg table.

See Also
--------
read_parquet : Read a Parquet file.

Examples
--------
>>> df = pd.read_iceberg(
...     table_identifier="my_table",
...     catalog_name="my_catalog",
...     catalog_properties={"s3.secret-access-key": "my-secret"},
...     row_filter="trip_distance >= 10.0",
...     columns=["VendorID", "tpep_pickup_datetime"],
... )  # doctest: +SKIP
úpyiceberg.catalogzpyiceberg.expressions)Ú*)r
   Úselected_fieldsr   r   Úoptionsr   )r   Úload_catalogÚ
load_tableÚ
AlwaysTrueÚtupleÚscanÚ	to_pandas)r   r   r   r	   r
   r   r   r   r   Úpyiceberg_catalogÚpyiceberg_expressionsÚcatalogÚtabler   Úresults                  ÚN/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pandas/io/iceberg.pyÚread_icebergr#      s¸   € ôD 3Ð3FÓGÐÜ6Ð7NÓOÐØÑ!ØÐØ×,Ò,¨\ÑPÐ=OÑP€GØ×ÑÐ/Ó0€EØÑØ*×5Ñ5Ó7ˆ
Ø�Ø ‰ä ›.ˆØÑØˆØ�Z‰ZØØ'Ø%ØØØð ð €Fð ×ÑÓÐó    F)r   ÚlocationÚappendÚsnapshot_propertiesÚdfr%   r&   r'   c                ó"  • [        S5      n[        S5      nUc  0 nUR                  " U40 UD6n	UR                  R                  U 5      n
U	R	                  UU
R
                  US9nUc  0 nU(       a  UR                  X¦S9  gUR                  X¦S9  g)aÄ  
Write a DataFrame to an Apache Iceberg table.

.. versionadded:: 3.0.0

Parameters
----------
table_identifier : str
    Table identifier.
catalog_name : str, optional
    The name of the catalog.
catalog_properties : dict of {str: str}, optional
    The properties that are used next to the catalog configuration.
location : str, optional
    Location for the table.
append : bool, default False
    If ``True``, append data to the table, instead of replacing the content.
snapshot_properties : dict of {str: str}, optional
    Custom properties to be added to the snapshot summary

See Also
--------
read_iceberg : Read an Apache Iceberg table.
DataFrame.to_parquet : Write a DataFrame in Parquet format.
Úpyarrowr   N)Ú
identifierÚschemar%   )r'   )r   r   ÚTableÚfrom_pandasÚcreate_table_if_not_existsr,   r&   Ú	overwrite)r(   r   r   r   r%   r&   r'   Úpar   r   Úarrow_tabler    s               r"   Ú
to_icebergr3   f   s¢   € ôF 
$ IÓ	.€BÜ2Ð3FÓGÐØÑ!ØÐØ×,Ò,¨\ÑPÐ=OÑP€GØ—(‘(×&Ñ& rÓ*€KØ×.Ñ.Ø#Ø×!Ñ!Øð /ð €Eð Ñ"Ø ÐÞØ�‰�[ˆÒJà�‰˜ˆÒMr$   )N)Útypingr   Úpandas.compat._optionalr   Úpandas.util._decoratorsr   r   r   ÚstrÚdictÚlistÚboolÚintr#   r3   © r$   r"   Ú<module>r=      s…  ðõõ ?Ý .å ñ ˆHÓð  $ðWð 15Ø $Ø!ØØ"ØØ-1òWØðWà˜‘*ðWð ˜S #˜X™¨Ñ-ð	Wð
 �#‰Y˜ÑðWð �d‘
ðWð ðWð �t‘ðWð �‰:ðWð ˜#˜s˜(‘^ dÑ*ðWð õWó ðWðz  $ð5Nð
 15ØØØ15ò5NØð5Nàð5Nð ˜‘*ð5Nð
 ˜S #˜X™¨Ñ-ð5Nð �D‰jð5Nð ð5Nð ˜c 3˜h™¨$Ñ.ð5Nð 
÷5Nr$   