σ
    ώφh
  γ                  σ    S SK Jr  S SKJr  S SKJr  S SKJr  \(       a  S SKJ	r	  S SK
Jr  \" 5       SSS	.       SS
 jj5       rg)ι    )Ϊannotations)ΪTYPE_CHECKING)Ϊunstable©Ϊ_scan_pyarrow_dataset)Ϊ	LazyFrame)ΪpyarrowTN©Ϊallow_pyarrow_filterΪ
batch_sizec               σ    [        U UUS9$ )uj  
Scan a pyarrow dataset.

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

This can be useful to connect to cloud or partitioned datasets.

Parameters
----------
source
    Pyarrow dataset to scan.
allow_pyarrow_filter
    Allow predicates to be pushed down to pyarrow. This can lead to different
    results if comparisons are done with null values as pyarrow handles this
    different than polars does.
batch_size
    The maximum row count for scanned pyarrow record batches.

Warnings
--------
Don't use this if you accept untrusted user inputs. Predicates will be evaluated
with python 'eval'. There is sanitation in place, but it is a possible attack
vector.
This method can only can push down predicates that are allowed by PyArrow
(e.g. not the full Polars API).

If :func:`scan_parquet` works for your source, you should use that instead.

Notes
-----
When using partitioning, the appropriate `partitioning` option must be set on
`pyarrow.dataset.dataset` before passing to Polars or the partitioned-on column(s)
may not get passed to Polars.

Examples
--------
>>> import pyarrow.dataset as ds
>>> dset = ds.dataset("s3://my-partitioned-folder/", format="ipc")  # doctest: +SKIP
>>> (
...     pl.scan_pyarrow_dataset(dset)
...     .filter("bools")
...     .select("bools", "floats", "date")
...     .collect()
... )  # doctest: +SKIP
shape: (1, 3)
βββββββββ¬βββββββββ¬βββββββββββββ
β bools β floats β date       β
β ---   β ---    β ---        β
β bool  β f64    β date       β
βββββββββͺβββββββββͺβββββββββββββ‘
β true  β 2.0    β 1970-05-04 β
βββββββββ΄βββββββββ΄βββββββββββββ
r
   r   )Ϊsourcer   r   s      Ϊ]/home/james-whalen/.local/lib/python3.13/site-packages/polars/io/pyarrow_dataset/functions.pyΪscan_pyarrow_datasetr      s    τ| !ΨΨ1Ψρπ σ    )r   zpa.dataset.Datasetr   Ϊboolr   z
int | NoneΪreturnr   )Ϊ
__future__r   Ϊtypingr   Ϊpolars._utils.unstabler   Ϊ(polars.io.pyarrow_dataset.anonymous_scanr   Ϊpolarsr   Ϊpolars._dependenciesr	   Ϊpar   © r   r   Ϊ<module>r      sd   πέ "ε  ε +έ Jζέ έ2ρ 
π "&Ψ!ρ	AΨπAπ πAπ π	Aπ
 τAσ ρAr   